        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            /* КРИТИЧНО: убираем 300ms delay на iOS/Android */
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            touch-action: manipulation;
        }
        
        /* GPU acceleration для контейнеров */
        /* ВАЖНО: НЕ ставить transform или contain:layout на .screen!
           Это ломает position:fixed у bottom-nav и cart-footer внутри */
        .screen { 
            /* contain и transform убраны — они создают containing block,
               превращая position:fixed в position:absolute */
        }
        .product-card { 
            contain: layout style paint;
            transform: translate3d(0,0,0);
            will-change: transform;
        }
        
        :root {
            --bg-primary: #0c1220;
            --bg-secondary: #111827;
            --bg-card: rgba(26, 35, 50, 0.85);
            --bg-card-solid: #1a2332;
            --bg-input: rgba(31, 45, 63, 0.7);
            --accent: #F97316;
            --accent-dim: #EA580C;
            --accent-glow: rgba(249, 115, 22, 0.15);
            --text-primary: #F1F5F9;
            --text-secondary: #94A3B8;
            --text-muted: #64748B;
            --border: rgba(30, 58, 95, 0.6);
            --border-light: rgba(30, 58, 95, 0.3);
            --success: #34D399;
            --danger: #F87171;
            --warning: #fbbf24;
            --blue: #60A5FA;
            --purple: #A78BFA;
        }
        
        html {
            /* Убираем scroll bounce на iOS для лучшей производительности */
            overscroll-behavior: none;
            -webkit-overflow-scrolling: touch;
        }
        
        body {
            font-family: 'Exo 2', -apple-system, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            min-height: 100vh;
            overflow-x: hidden;
            /* GPU acceleration убран — ломал position:fixed у модалок */
            -webkit-font-smoothing: antialiased;
        }
        
        /* ============================================ */
        /* Confetti Canvas                              */
        /* ============================================ */
        #confettiCanvas {
            position: fixed;
            inset: 0;
            z-index: 9998;
            pointer-events: none;
        }

        /* ============================================ */
        /* Loading Screen                               */
        /* ============================================ */
        .loading-screen {
            position: fixed;
            inset: 0;
            background: var(--bg-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 28px;
            z-index: 9999;
            transition: opacity 0.6s ease, visibility 0.6s;
        }
        
        .loading-screen.hidden {
            opacity: 0;
            visibility: hidden;
        }

        .loading-screen::before {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(circle at 50% 40%, rgba(249, 115, 22, 0.1) 0%, transparent 60%);
        }
        
        .loading-logo {
            font-size: 42px;
            font-weight: 900;
            letter-spacing: 8px;
            color: var(--accent);
            position: relative;
            z-index: 1;
            text-shadow: 0 0 40px rgba(249, 115, 22, 0.4);
        }
        
        .loading-spinner {
            width: 40px;
            height: 40px;
            border: 2px solid var(--border);
            border-top-color: var(--accent);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        #app {
            display: flex;
            flex-direction: column;
        }
        
        .screen {
            display: none;
            flex-direction: column;
            min-height: 100vh;
            animation: fadeIn 0.3s ease;
        }
        
        .screen.active {
            display: flex;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        /* ============================================ */
        /* Gamification: Animated Status Icons           */
        /* ============================================ */
        @keyframes pulse-glow {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.15); opacity: 0.8; }
        }
        @keyframes bounce-in {
            0% { transform: scale(0); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }
        @keyframes rocket-fly {
            0%, 100% { transform: translateY(0) rotate(-5deg); }
            50% { transform: translateY(-3px) rotate(5deg); }
        }
        @keyframes check-pop {
            0% { transform: scale(0) rotate(-45deg); }
            60% { transform: scale(1.3) rotate(5deg); }
            100% { transform: scale(1) rotate(0); }
        }
        @keyframes streak-fire {
            0%, 100% { transform: scaleY(1); }
            50% { transform: scaleY(1.15); }
        }
        .status-icon-animated {
            display: inline-block;
        }
        .status-icon-animated.reserve {
            animation: pulse-glow 2s ease-in-out infinite;
        }
        .status-icon-animated.shipping {
            animation: rocket-fly 1.5s ease-in-out infinite;
        }
        .status-icon-animated.completed {
            animation: check-pop 0.6s ease forwards;
        }

        /* ============================================ */
        /* Gamification: Streak Badge                    */
        /* ============================================ */
        .streak-card {
            background: var(--bg-card);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(249, 115, 22, 0.2);
            border-radius: 14px;
            padding: 14px 16px;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 12px;
            overflow: hidden;
            position: relative;
            animation: slideUp 0.3s ease both;
            animation-delay: 0.2s;
        }
        .streak-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.06), transparent);
            animation: streak-shimmer 3s ease-in-out infinite;
        }
        @keyframes streak-shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }
        .streak-fire-icon {
            font-size: 32px;
            animation: streak-fire 1s ease-in-out infinite;
            flex-shrink: 0;
            position: relative;
            z-index: 1;
        }
        .streak-info {
            flex: 1;
            position: relative;
            z-index: 1;
        }
        .streak-count {
            font-size: 22px;
            font-weight: 700;
            color: var(--accent);
        }
        .streak-label {
            font-size: 12px;
            color: var(--text-secondary);
            margin-top: 2px;
        }
        .streak-best {
            font-size: 11px;
            color: var(--text-muted);
            padding: 4px 10px;
            background: var(--bg-input);
            border-radius: 20px;
            position: relative;
            z-index: 1;
            white-space: nowrap;
        }

        /* ============================================ */
        /* Gamification: Enhanced Toast                  */
        /* ============================================ */
        .toast { 
            position: fixed; 
            bottom: 100px; 
            left: 50%; 
            transform: translateX(-50%) translateY(100px); 
            background: var(--bg-card); 
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--border-light); 
            border-radius: 14px; 
            padding: 12px 20px; 
            display: flex; 
            align-items: center; 
            gap: 10px; 
            opacity: 0; 
            transition: all 0.3s ease; 
            z-index: 2000;
            box-shadow: 0 8px 32px rgba(0,0,0,0.4);
        }
        .toast.show { 
            transform: translateX(-50%) translateY(0); 
            opacity: 1; 
        }
        .toast.success { border-color: rgba(74, 222, 128, 0.3); }
        .toast.success .toast-icon { color: var(--success); }
        .toast.error { border-color: rgba(248, 113, 113, 0.3); }
        .toast.error .toast-icon { color: var(--danger); }
        .toast-icon { font-size: 18px; animation: bounce-in 0.4s ease; }
        .toast-message { font-size: 14px; }
        
        /* ============================================ */
        /* Gamification: Fun Empty States                */
        /* ============================================ */
        .no-results { text-align: center; padding: 40px 20px; color: var(--text-secondary); }
        .no-results-icon { font-size: 48px; margin-bottom: 12px; animation: bounce-in 0.5s ease; }
        .no-results-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 8px; font-style: italic; }

        /* ============================================ */
        /* Enhanced Product Card Prices                  */
        /* ============================================ */
        .product-prices { 
            display: flex; 
            flex-direction: column;
            gap: 4px; 
            margin-bottom: 4px; 
        }
        .product-price-row {
            display: flex;
            align-items: baseline;
            gap: 8px;
        }
        .product-price-main {
            font-size: 17px;
            font-weight: 900;
            color: var(--text-primary);
            line-height: 1;
            font-family: 'JetBrains Mono', monospace;
        }
        .product-price-main-label {
            font-size: 11px;
            color: var(--text-muted);
        }
        .product-price-wholesale {
            font-size: 11px;
            font-weight: 500;
            color: var(--success);
            line-height: 1;
            font-family: 'JetBrains Mono', monospace;
        }
        .product-price-wholesale-label {
            font-size: 10px;
            color: var(--text-muted);
        }
        .product-pack-hint { 
            font-size: 10px; 
            color: var(--success); 
            background: rgba(74, 222, 128, 0.12); 
            padding: 3px 8px; 
            border-radius: 6px; 
            display: inline-block;
            font-weight: 500;
        }
        .product-no-price {
            color: var(--danger);
            font-size: 13px;
        }

        /* Акционные цены */
        .promo-badge {
            display: inline-block;
            font-size: 9px;
            font-weight: 800;
            background: var(--accent);
            color: #000;
            padding: 2px 6px;
            border-radius: 4px;
            letter-spacing: 0.5px;
            vertical-align: middle;
            margin-left: 4px;
            animation: promo-pulse 2s ease-in-out infinite;
        }
        @keyframes promo-pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }
        .price-old {
            text-decoration: line-through;
            color: var(--text-muted);
            font-size: 13px;
            font-weight: 500;
            font-family: 'JetBrains Mono', monospace;
        }
        .price-promo {
            color: var(--accent);
            font-weight: 800;
            font-family: 'JetBrains Mono', monospace;
        }
        .price-promo-secondary {
            color: var(--accent);
            font-weight: 600;
            font-size: 18px;
            font-family: 'JetBrains Mono', monospace;
        }
        .promo-savings-box {
            background: rgba(249, 115, 22, 0.08);
            border: 1px solid rgba(249, 115, 22, 0.2);
            border-radius: 10px;
            padding: 10px 14px;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        /* Корзина — подсветка акционного товара */
        .cart-item-promo {
            border-left: 3px solid var(--accent) !important;
            background: rgba(249, 115, 22, 0.04) !important;
        }
        .ci-hint.promo-active {
            background: rgba(249, 115, 22, 0.12);
            color: var(--accent);
            font-weight: 700;
            font-size: 11px;
            padding: 3px 10px;
            border-radius: 6px;
            margin-top: 4px;
        }

        .header {
            padding: 14px 20px;
            background: rgba(17, 24, 39, 0.92);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-bottom: 1px solid var(--border-light);
            display: flex;
            align-items: center;
            gap: 14px;
            position: sticky;
            top: 0;
            z-index: 100;
        }
        
        .header-back {
            width: 36px;
            height: 36px;
            border: none;
            background: var(--bg-card);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--border-light);
            border-radius: 11px;
            color: var(--text-primary);
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.1s;
        }
        
        .header-back:active {
            transform: scale(0.95);
        }
        
        .header-title {
            flex: 1;
            font-size: 20px;
            font-weight: 700;
        }
        
        .header-action {
            width: 42px;
            height: 42px;
            border: none;
            background: linear-gradient(135deg, var(--accent), var(--accent-dim));
            border-radius: 12px;
            color: white;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            position: relative;
            box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
        }
        
        .header-action:active {
            transform: scale(0.95);
        }
        
        .cart-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            background: var(--danger);
            color: white;
            font-size: 10px;
            font-weight: 700;
            min-width: 18px;
            height: 18px;
            border-radius: 9px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 5px;
            transition: transform 0.2s;
        }
        .cart-badge.pop { animation: badge-pop 0.5s ease; }
        @keyframes badge-pop { 0% { transform: scale(1); } 30% { transform: scale(1.6); } 60% { transform: scale(0.85); } 100% { transform: scale(1); } }
        .cart-fly-badge {
            position: fixed; z-index: 9999; pointer-events: none;
            background: var(--primary); color: #fff; font-weight: 700; font-size: 16px;
            width: 36px; height: 36px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            box-shadow: 0 4px 16px rgba(249,115,22,0.5);
            transition: all 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
            opacity: 1;
        }
        .cart-fly-badge.fly { opacity: 0; transform: scale(0.3);
        }
        .product-card.added-flash { animation: card-flash 0.5s ease; }
        @keyframes card-flash { 0% { box-shadow: 0 0 0 0 rgba(249,115,22,0.6); } 50% { box-shadow: 0 0 0 8px rgba(249,115,22,0.2); } 100% { box-shadow: 0 0 0 0 rgba(249,115,22,0); }
        }
        
        .auth-screen {
            padding: 40px 24px;
            justify-content: center;
            align-items: center;
            text-align: center;
            background: var(--bg-primary);
            position: relative;
            overflow: hidden;
        }
        
        .auth-logo {
            font-size: 44px;
            font-weight: 900;
            letter-spacing: 10px;
            color: var(--accent);
            margin-bottom: 8px;
            position: relative;
            z-index: 1;
            text-shadow: 0 0 40px rgba(249, 115, 22, 0.3);
        }
        
        .auth-subtitle {
            color: var(--text-secondary);
            font-size: 14px;
            margin-bottom: 48px;
        }
        
        .auth-form {
            width: 100%;
            max-width: 320px;
        }
        
        .input-group {
            margin-bottom: 16px;
        }
        
        .input-label {
            display: block;
            text-align: left;
            font-size: 12px;
            font-weight: 500;
            color: var(--text-secondary);
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        .input {
            width: 100%;
            padding: 16px;
            background: var(--bg-input);
            border: 1px solid var(--border);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 16px;
            font-family: inherit;
            transition: all 0.2s;
        }
        
        .input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--accent-glow);
        }
        
        .input::placeholder {
            color: var(--text-muted);
        }
        
        .input-code {
            text-align: center;
            font-family: 'JetBrains Mono', monospace;
            font-size: 24px;
            letter-spacing: 8px;
        }
        
        .auth-code-sent {
            color: var(--text-secondary);
            font-size: 14px;
            margin-bottom: 24px;
        }
        
        .btn {
            width: 100%;
            padding: 16px 24px;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            /* GPU acceleration */
            transform: translate3d(0,0,0);
            will-change: transform;
            /* Только transform - быстрая анимация */
            transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .btn:active {
            transform: translate3d(0,0,0) scale(0.97);
        }
        
        .btn-primary {
            background: linear-gradient(135deg, var(--accent), var(--accent-dim));
            color: white;
            box-shadow: 0 4px 20px rgba(249, 115, 22, 0.3);
        }
        
        .btn-primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .btn-secondary {
            background: var(--bg-card);
            color: var(--text-primary);
            border: 1px solid var(--border);
        }
        
        .mt-16 { margin-top: 16px; }
        .mb-16 { margin-bottom: 16px; }
        
        /* bottom-nav moved to prototype section */
        
        /* nav-item moved to prototype section */
        
        /* nav-item.active moved */
        
        /* nav-item-icon removed — now using SVG nav-icon */
        
        .dashboard-content {
            flex: 1;
            padding: 20px;
            padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
        }
        
        .user-card {
            background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 24px;
            margin-bottom: 20px;
        }
        
        .user-greeting { font-size: 14px; color: var(--text-secondary); margin-bottom: 4px; }
        .user-name { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
        .user-warehouse { font-size: 13px; color: var(--accent); }
        
        .progress-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-bottom: 20px; }
        .progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
        .progress-title { font-size: 14px; color: var(--text-secondary); }
        .progress-percent { font-size: 20px; font-weight: 700; color: var(--accent); }
        .progress-bar { height: 8px; background: var(--bg-input); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
        .progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent), #FB923C); border-radius: 4px; transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 0 12px rgba(249, 115, 22, 0.3); }
        .progress-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
        
        .stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
        .stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: center; }
        .stat-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
        .stat-value { font-size: 20px; font-weight: 700; }
        .stat-value.accent { color: var(--accent); }
        
        .section-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
        
        /* quick-actions replaced by dash-actions */
        .quick-action { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 8px; text-align: center; cursor: pointer; transition: all 0.2s; }
        .quick-action:active { transform: scale(0.95); background: var(--bg-input); }
        .quick-action-icon { font-size: 28px; margin-bottom: 8px; }
        .quick-action-label { font-size: 11px; color: var(--text-secondary); }
        
        .customer-content { flex: 1; padding: 20px; padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }
        
        .search-box { background: var(--bg-input); border: 1px solid var(--border-light); border-radius: 12px; padding: 0 16px; display: flex; align-items: center; gap: 12px; margin-bottom: 16px; transition: border-color 0.2s, box-shadow 0.2s; }
        .search-box:focus-within { border-color: rgba(249,115,22,0.4); box-shadow: 0 0 0 3px rgba(249,115,22,0.08); }
        .search-icon { font-size: 18px; color: var(--text-muted); }
        .search-input { flex: 1; background: none; border: none; padding: 16px 0; color: var(--text-primary); font-size: 16px; font-family: inherit; }
        .search-input:focus { outline: none; }
        .search-input::placeholder { color: var(--text-muted); }
        
        .customer-result { 
            background: var(--bg-card); 
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--border-light); 
            border-radius: 14px; 
            padding: 14px; 
            margin-bottom: 10px; 
            cursor: pointer; 
            transform: translate3d(0,0,0);
            will-change: transform;
            transition: all 0.15s;
            animation: slideUp 0.3s ease both;
            position: relative;
        }
        .customer-result:active { transform: translate3d(0,0,0) scale(0.985); }
        .customer-result:hover { border-color: rgba(249,115,22,0.2); }
        .c-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
        .c-avatar { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; flex-shrink: 0; letter-spacing: -0.5px; }
        .c-avatar.company { background: linear-gradient(135deg, rgba(96,165,250,0.2), rgba(96,165,250,0.08)); border: 1px solid rgba(96,165,250,0.25); color: #60a5fa; }
        .c-avatar.person { background: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(249,115,22,0.08)); border: 1px solid rgba(249,115,22,0.25); color: var(--accent); }
        .c-main { flex: 1; min-width: 0; }
        .c-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
        .c-type-badge { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.3px; flex-shrink: 0; }
        .c-type-badge.toc { background: rgba(96,165,250,0.12); color: #60a5fa; border: 1px solid rgba(96,165,250,0.2); }
        .c-type-badge.ip { background: rgba(249,115,22,0.1); color: var(--accent); border: 1px solid rgba(249,115,22,0.2); }
        .c-type-badge.fiz { background: rgba(148,163,184,0.1); color: var(--text-secondary); border: 1px solid rgba(148,163,184,0.15); }
        .c-iin { font-size: 11px; font-family: 'JetBrains Mono', monospace; color: var(--text-muted); font-weight: 500; letter-spacing: 0.3px; }
        .c-contacts { display: flex; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
        .c-contact { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-secondary); font-weight: 500; }
        .c-contact svg { width: 13px; height: 13px; color: var(--text-muted); flex-shrink: 0; }
        .c-contact.empty { color: var(--text-muted); font-style: italic; }
        .c-stats { display: flex; gap: 6px; }
        .c-stat { flex: 1; background: rgba(31, 45, 63, 0.5); border-radius: 8px; padding: 7px 8px; text-align: center; }
        .c-stat-value { font-size: 13px; font-weight: 800; font-family: 'JetBrains Mono', monospace; line-height: 1; margin-bottom: 2px; letter-spacing: -0.3px; }
        .c-stat-label { font-size: 8px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
        .c-last-order { margin-top: 6px; display: flex; justify-content: space-between; font-size: 9px; color: var(--text-secondary); font-weight: 600; }
        .c-last-order strong { color: var(--text); }
        .c-days-ago { color: var(--text-muted); font-style: italic; }
        .c-debt-strip { margin-top: 6px; padding: 5px 8px; border-radius: 6px; display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; }
        .c-debt-strip.debt { background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.15); color: var(--danger); }
        .c-debt-strip.clear { background: rgba(52, 211, 153, 0.06); border: 1px solid rgba(52, 211, 153, 0.12); color: var(--success); }
        .c-debt-strip.no-iin { background: rgba(249,115,22,0.08); border: 1px solid rgba(249,115,22,0.25); color: #F97316; }
        .c-no-iin-badge { background: rgba(249,115,22,0.15); border: 1px solid rgba(249,115,22,0.3); color: #F97316; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; display: inline-block; }
        .customer-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
        .customer-info { font-size: 12px; color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; }
        .customer-type { display: inline-block; margin-top: 8px; padding: 4px 8px; background: var(--accent-glow); color: var(--accent); border-radius: 6px; font-size: 11px; font-weight: 600; }
        .retail-badge { background: #ff6b35; color: white; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; margin-left: 6px; vertical-align: middle; }
        .retail-price-banner { background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%); color: white; text-align: center; padding: 8px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; margin: 0 0 12px; animation: retailPulse 0.5s ease-out; }
        @keyframes retailPulse { 0% { transform: scale(0.95); opacity: 0; } 50% { transform: scale(1.02); } 100% { transform: scale(1); opacity: 1; } }
        .retail-indicator { background: #ff6b35; color: white; padding: 2px 8px; border-radius: 8px; font-size: 10px; font-weight: 700; letter-spacing: 0.3px; margin-left: 6px; }
        
        .customer-reset-btn { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px; color: var(--danger); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
        .customer-reset-btn:hover { background: var(--danger); color: white; border-color: var(--danger); }

        /* Профиль клиента при выборе */
        .cprof { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
        .cprof-title { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
        .cprof-products { display: flex; flex-direction: column; gap: 6px; }
        .cprof-product { display: flex; align-items: center; gap: 8px; }
        .cprof-product-bar-wrap { flex: 1; background: rgba(255,255,255,0.05); border-radius: 3px; height: 4px; overflow: hidden; }
        .cprof-product-bar { height: 4px; border-radius: 3px; background: var(--accent); }
        .cprof-product-name { font-size: 12px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
        .cprof-product-pct { font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; min-width: 30px; text-align: right; }
        .cprof-orders { display: flex; flex-direction: column; gap: 5px; }
        .cprof-order { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
        .cprof-order:last-child { border-bottom: none; }
        .cprof-order-date { color: var(--text-muted); }
        .cprof-order-amt { color: var(--text-primary); font-family: 'JetBrains Mono', monospace; font-weight: 700; }
        .cprof-order.this-month .cprof-order-amt { color: var(--success); }
        .cprof-order.this-month .cprof-order-date::before { content: '✓ '; color: var(--success); }
        .cprof-loading { text-align: center; padding: 20px; color: var(--text-muted); font-size: 13px; }
        .cprof-upsell { background: rgba(249,115,22,0.08); border: 1px solid rgba(249,115,22,0.2); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
        .cprof-upsell-title { font-size: 10px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
        .cprof-upsell-items { display: flex; flex-wrap: wrap; gap: 5px; }
        .cprof-upsell-tag { background: rgba(249,115,22,0.12); border: 1px solid rgba(249,115,22,0.25); color: #F97316; font-size: 11px; padding: 3px 8px; border-radius: 6px; font-weight: 600; }
        
        .form-section { background: var(--bg-card); backdrop-filter: blur(12px); border: 1px solid var(--border-light); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
        .form-section-title { font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
        .form-row { margin-bottom: 12px; }
        .form-row:last-child { margin-bottom: 0; }
        .radio-group { display: flex; gap: 12px; }
        .radio-option { flex: 1; padding: 12px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px; text-align: center; cursor: pointer; transition: all 0.2s; font-size: 14px; }
        .radio-option.selected { border-color: var(--accent); background: var(--accent-glow); color: var(--accent); }
        
        .catalog-content { flex: 1; padding: 20px; padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }
        .categories-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 12px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
        .categories-scroll::-webkit-scrollbar { display: none; }
        .category-chip { flex-shrink: 0; padding: 8px 16px; background: var(--bg-card); backdrop-filter: blur(12px); border: 1px solid var(--border-light); border-radius: 20px; font-size: 13px; color: var(--text-secondary); cursor: pointer; transition: transform 0.1s; }
        .category-chip:active { transform: scale(0.95); }
        .category-chip.active { background: linear-gradient(135deg, var(--accent), var(--accent-dim)); border-color: var(--accent); color: white; box-shadow: 0 3px 12px rgba(249, 115, 22, 0.3); }
        
        .products-grid { display: flex; flex-direction: column; gap: 10px; }
        .product-card { 
            background: var(--bg-card); 
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--border-light); 
            border-radius: 14px; 
            padding: 14px; 
            display: flex; 
            gap: 12px; 
            transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
            animation: slideUp 0.25s ease both;
        }
        .product-card:active { 
            transform: translate3d(0,0,0) scale(0.98);
        }
        .product-image { width: 56px; height: 56px; background: var(--bg-input); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 28px; flex-shrink: 0; overflow: hidden; }
        .product-image img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 2px; }
        .product-details { flex: 1; min-width: 0; }
        .product-name { font-size: 12px; font-weight: 400; color: var(--text-muted); margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
        .product-sku { font-size: 11px; color: var(--accent); font-family: 'JetBrains Mono', monospace; margin-bottom: 4px; background: rgba(249,115,22,0.12); border: 1px solid rgba(249,115,22,0.2); padding: 2px 8px; border-radius: 6px; display: inline-block; font-weight: 700; letter-spacing: 0.5px; }
        .product-stock { font-size: 11px; display: flex; flex-wrap: wrap; gap: 6px; }
        .stock-badge { padding: 2px 6px; border-radius: 4px; font-weight: 500; display: inline-flex; align-items: center; gap: 3px; }
        .stock-available { background: rgba(52,211,153,0.15); color: var(--success); border: 1px solid rgba(52,211,153,0.2); }
        .stock-reserved { background: rgba(96,165,250,0.12); color: var(--blue); border: 1px solid rgba(96,165,250,0.15); }
        .stock-other { background: rgba(251,191,36,0.12); color: var(--warning); border: 1px solid rgba(251,191,36,0.15); }
        .stock-none { background: rgba(248,113,113,0.1); color: var(--danger); border: 1px solid rgba(248,113,113,0.15); }
        
        .search-container { position: relative; }
        .autocomplete-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-card); border: 1px solid var(--border); border-top: none; border-radius: 0 0 12px 12px; max-height: 300px; overflow-y: auto; z-index: 50; display: none; }
        .autocomplete-dropdown.show { display: block; }
        .autocomplete-item { padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--border); transition: background 0.15s; }
        .autocomplete-item:last-child { border-bottom: none; }
        .autocomplete-item:hover, .autocomplete-item.active { background: var(--bg-input); }
        .autocomplete-item-name { font-size: 11px; font-weight: 400; color: var(--text-muted); margin-top: 2px; }
        .autocomplete-item-sku { font-size: 14px; color: var(--accent); font-family: 'JetBrains Mono', monospace; font-weight: 700; }
        .autocomplete-item-stock { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
        
        .product-card.out-of-stock { opacity: 0.6; border-color: var(--border); }
        .product-card.out-of-stock .product-image { filter: grayscale(50%); }
        
        /* Skeleton Loading Screens */
        @keyframes shimmer {
            0% { background-position: -200% 0; }
            100% { background-position: 200% 0; }
        }
        @keyframes breathe { 0%,100%{box-shadow:0 0 15px rgba(249,115,22,0.2)} 50%{box-shadow:0 0 30px rgba(249,115,22,0.4)} }
        @keyframes slideUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
        @keyframes gradShift { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
        @keyframes borderGlow { 0%,100%{border-color:rgba(52,211,153,0.2)} 50%{border-color:rgba(52,211,153,0.5)} }
        @keyframes heroPulse { 0%{box-shadow:0 0 0 0 rgba(249,115,22,0.5)} 70%{box-shadow:0 0 0 12px rgba(249,115,22,0)} 100%{box-shadow:0 0 0 0 rgba(249,115,22,0)} }
        @keyframes confettiPop { 0%{transform:translateY(0) rotate(0deg);opacity:1} 100%{transform:translateY(-60px) rotate(720deg);opacity:0} }
        .skeleton-card { background: var(--bg-card); backdrop-filter: blur(12px); border: 1px solid var(--border-light); border-radius: 14px; padding: 14px; display: flex; gap: 12px; }
        .skeleton-bone { background: linear-gradient(90deg, rgba(31,45,63,0.7) 25%, rgba(42,58,79,0.7) 50%, rgba(31,45,63,0.7) 75%); background-size: 800px 100%; animation: shimmer 1.5s infinite linear; border-radius: 8px; }
        .skeleton-image { width: 60px; height: 60px; border-radius: 10px; flex-shrink: 0; }
        .skeleton-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
        .skeleton-sku { width: 80px; height: 12px; }
        .skeleton-name { width: 70%; height: 14px; }
        .skeleton-price { width: 100px; height: 18px; }
        .skeleton-stock { width: 60px; height: 14px; }
        .skeleton-btn { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; align-self: center; }
        
        /* Infinite scroll loader */
        .scroll-loader { text-align: center; padding: 16px; }
        .scroll-loader .loading-spinner { margin: 0 auto; width: 28px; height: 28px; }
        .products-end { text-align: center; padding: 12px; color: var(--text-muted); font-size: 12px; }
        
        .product-actions { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; }
        .catalog-qty-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; touch-action: none; -webkit-user-select: none; user-select: none; }
        .catalog-qty-btn { width: 38px; height: 32px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 18px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; touch-action: none; transition: transform 0.1s, background 0.1s; }
        .catalog-qty-btn.plus { background: linear-gradient(135deg, var(--accent), var(--accent-dim)); border: none; color: #fff; }
        .catalog-qty-btn.minus { font-size: 16px; }
        .catalog-qty-btn:active { transform: scale(0.88); }
        .catalog-qty-btn.plus:active { background: var(--accent-dim); }
        .catalog-qty-val { font-size: 13px; font-weight: 800; color: var(--accent); font-family: 'JetBrains Mono', monospace; min-width: 38px; text-align: center; padding: 2px 0; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: none; }
        .add-to-cart { 
            width: 44px; 
            height: 44px; 
            background: linear-gradient(135deg, var(--accent), var(--accent-dim)); 
            border: none; 
            border-radius: 12px; 
            color: white; 
            font-size: 22px; 
            cursor: pointer; 
            display: flex; 
            align-items: center; 
            justify-content: center; 
            box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3); 
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .add-to-cart:active { 
            transform: scale(0.88); 
        }
        .add-to-cart:disabled { opacity: 0.3; cursor: not-allowed; }
        
        .cart-content { flex: 1; padding: 0 16px; padding-top: 10px; padding-bottom: calc(200px + env(safe-area-inset-bottom, 0px)); }
        .cart-summary-cards { display: flex; gap: 8px; margin-bottom: 10px; }
        .cart-summary-card { flex: 1; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 8px; text-align: center; }
        .cart-summary-card-value { font-size: 17px; font-weight: 900; font-family: 'JetBrains Mono', monospace; }
        .cart-summary-card-label { font-size: 9px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
        .ci-top { display: flex; gap: 10px; margin-bottom: 8px; }
        .ci-img { width: 48px; height: 48px; background: rgba(31,45,63,0.6); border-radius: 10px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .ci-img svg { width: 22px; height: 22px; color: var(--text-muted); opacity: 0.5; }
        .ci-nfo { flex: 1; min-width: 0; }
        .ci-sku { display: inline-block; font-size: 10px; font-weight: 700; font-family: 'JetBrains Mono', monospace; color: var(--accent); background: rgba(249,115,22,0.12); border: 1px solid rgba(249,115,22,0.2); padding: 1px 6px; border-radius: 5px; margin-bottom: 2px; }
        .ci-nm { font-size: 11px; color: var(--text-secondary); font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
        .ci-x { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.15); border-radius: 9px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
        .ci-x:active { transform: scale(0.85); background: rgba(248,113,113,0.25); }
        .ci-x svg { width: 14px; height: 14px; color: var(--danger); }
        .ci-bot { display: flex; justify-content: space-between; align-items: center; }
        .ci-qty { display: flex; align-items: center; background: rgba(31,45,63,0.5); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
        .ci-qty .qb { width: 44px; height: 44px; background: none; border: none; color: var(--text-secondary); font-size: 20px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: 'JetBrains Mono', monospace; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
        .ci-qty .qb:active { background: rgba(249,115,22,0.15); color: var(--accent); }
        .ci-qty .qb.m:active { background: rgba(248,113,113,0.15); color: var(--danger); }
        .ci-qty .qv { width: 48px; text-align: center; font-size: 15px; font-weight: 800; font-family: 'JetBrains Mono', monospace; color: var(--text-primary); border-left: 1px solid var(--border); border-right: 1px solid var(--border); height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
        .ci-pr { text-align: right; }
        .ci-tot { font-size: 17px; font-weight: 900; font-family: 'JetBrains Mono', monospace; color: var(--accent); letter-spacing: -0.5px; }
        .ci-u { font-size: 9px; color: var(--text-muted); font-weight: 600; font-family: 'JetBrains Mono', monospace; }
        .ci-actions { display: flex; gap: 6px; margin-top: 8px; }
        .ci-discount { font-size: 12px; font-weight: 800; padding: 6px 12px; border-radius: 8px; cursor: pointer; background: rgba(249,115,22,0.1); border: 1.5px solid rgba(249,115,22,0.3); color: var(--accent); transition: all 0.2s; user-select: none; }
        .ci-discount.active { background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.35); color: var(--success); font-size: 13px; }
        .ci-disc-sum { font-size: 11px; color: var(--success); font-weight: 700; font-family: 'JetBrains Mono', monospace; }
        .ci-hint { margin-top: 6px; padding: 4px 7px; border-radius: 5px; display: flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 600; }
        .ci-hint.pack { background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.15); color: var(--success); }
        .ci-hint.hint { background: rgba(251,191,36,0.06); border: 1px solid rgba(251,191,36,0.12); color: var(--warning); }
        .ci-hint.preorder { background: rgba(248,113,113,0.12); border: 2px solid rgba(248,113,113,0.4); color: #F87171; font-size: 11px; font-weight: 800; padding: 6px 10px; animation: preorderPulse 2s infinite; }
        .ci-hint.overstock { background: rgba(251,191,36,0.12); border: 2px solid rgba(251,191,36,0.4); color: #FBBF24; font-size: 11px; font-weight: 800; padding: 6px 10px; }
        @keyframes preorderPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }
        .header-cart-pill { display: flex; align-items: center; gap: 8px; padding: 8px 14px; min-height: 40px; background: linear-gradient(135deg, rgba(249,115,22,0.15), rgba(249,115,22,0.05)); border: 1px solid rgba(249,115,22,0.3); border-radius: 12px; cursor: pointer; -webkit-tap-highlight-color: transparent; position: relative; box-sizing: border-box; transition: transform 0.15s; font-family: inherit; }
        .header-cart-pill:active { transform: scale(0.95); }
        .header-cart-pill .hcp-icon { font-size: 16px; line-height: 1; }
        .header-cart-pill .hcp-amount { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 800; color: var(--accent); white-space: nowrap; }
        .cart-totals { margin-top: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; position: relative; overflow: hidden; }
        .cart-totals::before { content: ''; position: absolute; bottom: -20px; right: -20px; width: 140px; height: 140px; background: radial-gradient(circle, rgba(249,115,22,0.07), transparent 70%); pointer-events: none; }
        .cart-totals-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 11px; color: var(--text-muted); position: relative; z-index: 1; }
        .cart-totals-row span:last-child { font-weight: 700; color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; }
        .cart-totals-divider { height: 1px; background: var(--border); margin: 6px 0; position: relative; z-index: 1; }
        .cart-totals-main { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; padding-top: 2px; }
        .cart-totals-main-label { font-size: 15px; font-weight: 800; }
        .cart-totals-main-amount { font-size: 26px; font-weight: 900; font-family: 'JetBrains Mono', monospace; color: var(--accent); text-shadow: 0 0 20px rgba(249,115,22,0.25); letter-spacing: -1px; }
        .cart-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin-bottom: 8px; position: relative; overflow: hidden; animation: slideUp 0.3s ease-out both; }
        .cart-item-image { width: 56px; height: 56px; background: var(--bg-input); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
        .cart-item-details { flex: 1; min-width: 0; }
        .cart-item-name { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
        .cart-item-price { font-size: 13px; color: var(--text-secondary); }
        .cart-item-total { font-size: 15px; font-weight: 600; color: var(--accent); margin-top: 4px; }
        .cart-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
        .cart-item-remove { width: 28px; height: 28px; background: var(--bg-input); border: none; border-radius: 6px; color: var(--danger); font-size: 16px; cursor: pointer; }
        .qty-control { display: flex; align-items: center; gap: 8px; background: var(--bg-input); border-radius: 8px; padding: 4px; }
        .qty-btn { width: 28px; height: 28px; background: var(--bg-card); border: none; border-radius: 6px; color: var(--text-primary); font-size: 16px; cursor: pointer; }
        .qty-value { min-width: 28px; text-align: center; font-weight: 600; font-size: 14px; cursor: pointer; }
        .qty-input { width: 52px; height: 44px; text-align: center; font-weight: 700; font-size: 16px; background: var(--bg-input); border: 2px solid var(--accent); border-radius: 10px; color: var(--text-primary); outline: none; font-family: 'JetBrains Mono', monospace; -moz-appearance: textfield; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
        .qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
        .qty-value { min-width: 28px; text-align: center; font-weight: 600; }
        .cart-empty { text-align: center; padding: 60px 20px; }
        .cart-empty-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.5; }
        .cart-empty-text { color: var(--text-secondary); margin-bottom: 24px; }
        
        .cart-footer { position: fixed; bottom: calc(56px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; background: rgba(17,24,39,0.95); backdrop-filter: blur(20px); border-top: 1px solid var(--border); padding: 8px 16px; z-index: 400; }
        .cart-footer .btn-cancel-cart { background: none; border: none; color: var(--danger); font-size: 13px; font-weight: 600; font-family: inherit; padding: 8px 0 2px; width: 100%; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
        .cart-footer .btn-primary { width: 100%; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), var(--accent-dim)); color: #fff; font-family: 'Exo 2', sans-serif; font-size: 16px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 5px 20px rgba(249,115,22,0.35); border: none; }
        .cart-footer-sub { font-size: 10px; color: rgba(255,255,255,0.6); text-align: center; margin-top: 5px; font-family: 'JetBrains Mono', monospace; }
        .cart-summary { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
        .cart-summary-label { font-size: 14px; color: var(--text-secondary); }
        .cart-summary-value { font-size: 20px; font-weight: 700; color: var(--accent); }
        
        .orders-content { flex: 1; padding: 20px; padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }
        
        .orders-tabs { display: flex; gap: 0; background: var(--bg-input); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
        .orders-tab { flex: 1; padding: 10px 8px; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; transition: transform 0.1s; background: transparent; color: var(--text-muted); text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; }
        .orders-tab:active { transform: scale(0.97); }
        .orders-tab.active { background: linear-gradient(135deg, var(--accent), var(--accent-dim)); color: white; box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3); }
        .orders-tab-count { font-size: 11px; background: rgba(255,255,255,0.2); padding: 2px 7px; border-radius: 10px; font-weight: 700; }
        .orders-tab.active .orders-tab-count { background: rgba(255,255,255,0.3); }
        .orders-tab:not(.active) .orders-tab-count { background: var(--bg-card); color: var(--text-secondary); }
        
        .preorder-payment-info { margin-top: 8px; padding: 8px 10px; background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.15); border-radius: 8px; }
        .preorder-payment-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 2px 0; }
        .preorder-payment-label { color: var(--text-muted); }
        .preorder-payment-value { font-weight: 600; font-family: 'JetBrains Mono', monospace; font-size: 11px; }
        .preorder-payment-value.paid { color: var(--success); }
        .preorder-payment-value.pending { color: var(--warning); }
        .preorder-payment-value.overdue { color: var(--danger); }
        .order-card { background: var(--bg-card); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--border-light); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; position: relative; overflow: hidden; animation: slideUp 0.3s ease both; }
        .order-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.03) 50%, transparent 70%); background-size: 200% 100%; animation: shimmer 4s ease-in-out infinite; pointer-events: none; }
        .order-card.status-reserve { border-left: 3px solid var(--warning); background: linear-gradient(135deg, rgba(251,191,36,0.08) 0%, var(--bg-card) 40%); }
        .order-card.status-shipping { border-left: 3px solid var(--success); background: linear-gradient(135deg, rgba(52,211,153,0.1) 0%, var(--bg-card) 40%); animation: slideUp 0.3s ease both, borderGlow 3s ease-in-out infinite; }
        .order-card.status-completed { border-left: 3px solid var(--blue); background: linear-gradient(135deg, rgba(96,165,250,0.08) 0%, var(--bg-card) 40%); }
        .order-card.status-cancelled { border-left: 3px solid var(--danger); opacity: 0.7; }
        /* ВЕРК: акционный заказ (Ликвидатор-промо). Перебивает border-left любого статуса. */
        .order-card.has-werk-promo { border-left: 3px solid #F97316 !important; box-shadow: inset 8px 0 24px -16px rgba(249,115,22,0.5); }
        .werk-promo-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; margin: 6px 0 0; background: rgba(249,115,22,0.12); border: 1px solid rgba(249,115,22,0.3); border-radius: 6px; font: 700 11px 'Inter', sans-serif; color: #FB923C; position: relative; z-index: 1; }
        .werk-promo-chip .werk-promo-icon { font-size: 13px; line-height: 1; }
        .order-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
        .order-number { font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 900; color: var(--accent); margin-bottom: 2px; }
        .order-card.status-reserve .order-number { color: var(--warning); }
        .order-card.status-shipping .order-number { color: var(--success); }
        .order-card.status-completed .order-number { color: var(--blue); }
        .order-date { font-size: 12px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
        .order-status { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
        .order-status.new { background: var(--accent-glow); color: var(--accent); }
        .order-status.reserve { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
        .order-status.shipping { background: rgba(52, 211, 153, 0.2); color: var(--success); }
        .order-status.completed { background: rgba(96, 165, 250, 0.2); color: var(--blue); }
        .order-status.cancelled { background: rgba(248, 113, 113, 0.2); color: var(--danger); }
        .order-customer { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
        .order-manager { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
        .order-total { font-size: 24px; font-weight: 900; color: var(--text-primary); font-family: 'JetBrains Mono', monospace; text-shadow: 0 0 20px rgba(249,115,22,0.15); }
        /* Order progress mini bar */
        .order-progress-mini { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; margin: 8px 0 6px; overflow: hidden; position: relative; }
        .order-progress-fill { height: 100%; border-radius: 2px; transition: width 0.6s ease; position: relative; }
        .order-progress-fill::after { content: ''; position: absolute; right: 0; top: -2px; width: 8px; height: 8px; border-radius: 50%; }
        .order-card.status-reserve .order-progress-fill { background: var(--warning); width: 35%; }
        .order-card.status-reserve .order-progress-fill::after { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
        .order-card.status-shipping .order-progress-fill { background: var(--success); width: 85%; }
        .order-card.status-shipping .order-progress-fill::after { background: var(--success); box-shadow: 0 0 6px var(--success); }
        .order-card.status-completed .order-progress-fill { background: var(--blue); width: 100%; }
        .order-card.status-completed .order-progress-fill::after { display: none; }
        .order-stepper-text { font-size: 10px; color: var(--text-muted); font-weight: 500; }
        .order-stepper-text .step-done { color: var(--success); }
        .order-stepper-text .step-active { color: var(--warning); font-weight: 700; }
        /* Shipping ribbon */
        .order-ribbon { margin-top: 8px; padding: 6px 10px; background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.2); border-radius: 8px; font-size: 11px; color: var(--success); font-weight: 600; display: flex; align-items: center; gap: 6px; position: relative; overflow: hidden; }
        .order-ribbon::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(52,211,153,0.08), transparent); background-size: 200% 100%; animation: shimmer 3s ease-in-out infinite; }
        
        .modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); display: flex; align-items: flex-end; z-index: 1000; opacity: 0; visibility: hidden; pointer-events: none; transition: all 0.3s; }
        .modal-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
        .modal { 
            width: 100%; 
            background: var(--bg-secondary); 
            border-radius: 24px 24px 0 0; 
            padding: 24px; 
            padding-bottom: calc(24px + env(safe-area-inset-bottom)); 
            max-height: 90vh; 
            overflow-y: auto; 
            /* GPU acceleration */
            transform: translate3d(0, 100%, 0);
            will-change: transform;
            transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .modal-overlay.show .modal { 
            transform: translate3d(0, 0, 0); 
        }
        .modal-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 20px; }
        .modal-title { font-size: 20px; font-weight: 600; margin-bottom: 20px; text-align: center; }
        
        .product-modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85); display: flex; align-items: flex-end; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; pointer-events: none; transition: all 0.3s; }
        .product-modal-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
        .product-modal { background: var(--bg-secondary); border-radius: 24px 24px 0 0; width: 100%; max-width: 480px; max-height: 95vh; display: flex; flex-direction: column; transform: translateY(100%); transition: transform 0.3s ease; }
        .product-modal-overlay.show .product-modal { transform: translateY(0); }
        .product-modal-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 12px auto; }
        .product-modal-gallery { position: relative; height: 260px; background: var(--bg-card); margin: 0 16px; border-radius: 16px; overflow: hidden; }
        .product-modal-image { max-width: 80%; max-height: 80%; object-fit: contain; }
        .product-modal-image-placeholder { font-size: 64px; opacity: 0.3; }
        .gallery-slider { display: flex; height: 100%; transition: transform 0.3s ease; }
        .gallery-slide { min-width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 16px; }
        .gallery-slide img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; background: #fff; }
        .gallery-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; }
        .gallery-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.3); border: none; padding: 0; cursor: pointer; transition: all 0.2s; }
        .gallery-dot.active { background: var(--accent); width: 20px; border-radius: 4px; }
        .gallery-counter { position: absolute; top: 10px; left: 14px; background: rgba(0,0,0,0.55); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 6px; z-index: 2; font-family: 'JetBrains Mono', monospace; }
        .product-modal-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; background: rgba(0,0,0,0.6); border: none; border-radius: 50%; color: white; font-size: 18px; cursor: pointer; }
        .product-modal-info { padding: 20px; }
        .product-modal-sku { font-family: 'JetBrains Mono', monospace; font-size: 16px; color: var(--accent); background: var(--accent-glow); padding: 5px 12px; border-radius: 6px; display: inline-block; margin-bottom: 12px; font-weight: 700; }
        .product-modal-title { font-size: 20px; font-weight: 600; margin-bottom: 8px; line-height: 1.3; }
        .product-modal-description { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 20px; }
        .product-pricing-section { background: var(--bg-card); border-radius: 16px; padding: 16px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
        .product-price-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px; }
        .product-price-main-modal { font-size: 28px; font-weight: 700; color: var(--accent); }
        .product-price-unit { font-size: 18px; color: var(--text-primary); }
        .product-price-pack-secondary { font-size: 18px; font-weight: 600; color: var(--success); font-family: 'JetBrains Mono', monospace; }
        .product-stock-section { background: var(--bg-card); border-radius: 16px; padding: 16px; margin-bottom: 16px; }
        .product-section-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
        .product-stock-total { display: flex; gap: 8px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
        .warehouse-list { display: flex; flex-direction: column; gap: 8px; }
        .warehouse-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: var(--bg-input); border-radius: 10px; }
        .warehouse-item.current { border: 1px solid var(--accent); background: var(--accent-glow); }
        .warehouse-info { display: flex; align-items: center; gap: 10px; }
        .warehouse-icon { width: 36px; height: 36px; background: var(--bg-card); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
        .warehouse-item.current .warehouse-icon { background: var(--accent); }
        .warehouse-name { font-size: 14px; font-weight: 500; }
        .warehouse-label { font-size: 11px; color: var(--text-muted); }
        .warehouse-item.current .warehouse-label { color: var(--accent); }
        .warehouse-stock { text-align: right; }
        .warehouse-qty { font-size: 16px; font-weight: 600; }
        .warehouse-qty.available { color: var(--success); }
        .warehouse-qty.reserved { color: var(--warning); }
        .warehouse-qty.zero { color: var(--text-muted); }
        .warehouse-status { font-size: 11px; color: var(--text-muted); }
        .warehouse-item.mft { border: 1px solid rgba(96,165,250,0.15); background: rgba(96,165,250,0.05); }
        .product-modal-actions { display: flex; gap: 12px; padding: 16px 20px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); background: var(--bg-secondary); border-top: 1px solid var(--border); flex-shrink: 0; touch-action: none; -webkit-user-select: none; user-select: none; }
        .product-qty-selector { display: flex; align-items: center; gap: 0; background: var(--bg-card); padding: 4px; border-radius: 14px; border: 1px solid var(--border); }
        .product-qty-btn { width: 48px; height: 48px; background: var(--bg-input); border: none; border-radius: 12px; color: var(--text-primary); font-size: 24px; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: none; transition: transform 0.1s, background 0.15s; display: flex; align-items: center; justify-content: center; }
        .product-qty-btn:active { transform: scale(0.85); background: var(--accent); color: #fff; }
        .product-qty-value { font-size: 20px; font-weight: 800; min-width: 48px; text-align: center; font-family: 'JetBrains Mono', monospace; cursor: pointer; padding: 8px 4px; -webkit-tap-highlight-color: transparent; touch-action: none; }
        .product-add-btn { flex: 1; padding: 16px; background: linear-gradient(135deg, var(--accent), var(--accent-dim)); border: none; border-radius: 14px; color: white; font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3); -webkit-tap-highlight-color: transparent; touch-action: none; transition: transform 0.1s; }
        .product-add-btn:active { transform: scale(0.96); }
        .product-modal-loading { display: flex; align-items: center; justify-content: center; padding: 60px 20px; }

        /* ============================================ */
        /* Barcode Scanner                              */
        /* ============================================ */
        .scan-btn { width: 48px; height: 48px; background: var(--accent); border: none; border-radius: 14px; color: #fff; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; -webkit-tap-highlight-color: transparent; transition: transform 0.1s; }
        .scan-btn:active { transform: scale(0.9); }
        .scan-btn svg { width: 24px; height: 24px; }

        .scanner-overlay { position: fixed; inset: 0; background: #000; z-index: 1100; display: none; flex-direction: column; }
        .scanner-overlay.show { display: flex; }
        .scanner-header { display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); background: rgba(0,0,0,0.8); z-index: 2; position: relative; }
        .scanner-header-title { flex: 1; color: #fff; font-size: 17px; font-weight: 600; }
        .scanner-close-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.15); border: none; color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
        .scanner-torch-btn{width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,0.15);border:none;color:#fff;font-size:22px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s;-webkit-tap-highlight-color:transparent}
        .scanner-torch-btn.on{background:rgba(255,193,7,0.9);box-shadow:0 0 16px rgba(255,193,7,0.5)}
        .scanner-camera { flex: 1; position: relative; overflow: hidden; background: #000; }
        .scanner-manual { display: flex; gap: 8px; padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); background: rgba(0,0,0,0.8); }
        .scanner-manual input { flex: 1; padding: 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1); color: #fff; font-size: 16px; font-family: 'JetBrains Mono', monospace; }
        .scanner-manual input::placeholder { color: rgba(255,255,255,0.4); }
        .scanner-manual button { padding: 12px 20px; border-radius: 10px; background: var(--accent); color: #000; border: none; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }

        .scanner-result { position: absolute; bottom: 0; left: 0; right: 0; background: var(--bg-secondary); border-radius: 20px 20px 0 0; padding: 20px 16px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform 0.3s ease; z-index: 5; max-height: 70vh; overflow-y: auto; }
        .scanner-result.show { transform: translateY(0); }
        .scanner-result-code { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--accent); margin-bottom: 12px; text-align: center; }
        .scanner-result-product { background: var(--bg-card); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
        .scanner-result-sku { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; font-family: 'JetBrains Mono', monospace; }
        .scanner-result-name { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
        .scanner-result-price { font-size: 20px; font-weight: 700; color: var(--accent); font-family: 'JetBrains Mono', monospace; }
        .scanner-result-stock { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
        .scanner-result-stock.in-stock { color: var(--success); }
        .scanner-result-actions { display: flex; gap: 10px; margin-top: 12px; }
        .scanner-result-actions .btn { flex: 1; padding: 14px; border-radius: 12px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; text-align: center; }
        .scanner-result-actions .btn-cart { background: linear-gradient(135deg, var(--accent), var(--accent-dim)); color: #fff; }
        .scanner-result-actions .btn-detail { background: var(--bg-input); color: var(--text-primary); }
        .scanner-result-actions .btn-rescan { background: var(--bg-input); color: var(--accent); }
        .scanner-not-found { text-align: center; padding: 20px; }
        .scanner-not-found-icon { font-size: 40px; margin-bottom: 8px; }
        .scanner-not-found-text { color: var(--text-muted); font-size: 14px; }

        /* ═══ Visual Search (Поиск по фото) ═══ */
        .scanner-mode-tabs { display:flex; gap:4px; background:rgba(255,255,255,0.08); border-radius:10px; padding:3px; margin-left:8px; flex:1; }
        .scanner-mode-tab { flex:1; padding:7px 0; border-radius:8px; border:none; background:transparent; color:rgba(255,255,255,0.5); font-size:13px; font-weight:600; cursor:pointer; transition:all 0.2s; text-align:center; -webkit-tap-highlight-color:transparent; }
        .scanner-mode-tab.active { background:var(--accent); color:#fff; }
        .visual-capture-area { display:none; gap:12px; padding:16px; padding-bottom:calc(16px + env(safe-area-inset-bottom)); background:rgba(0,0,0,0.8); align-items:center; justify-content:center; }
        .visual-capture-btn { width:72px; height:72px; border-radius:50%; border:4px solid #fff; background:transparent; cursor:pointer; position:relative; -webkit-tap-highlight-color:transparent; transition:transform 0.1s; }
        .visual-capture-btn:active { transform:scale(0.9); }
        .visual-capture-btn::after { content:''; position:absolute; inset:4px; border-radius:50%; background:#fff; transition:background 0.15s; }
        .visual-capture-btn.loading::after { background:var(--accent); animation:vs-pulse 1s infinite; }
        @keyframes vs-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
        .visual-gallery-btn { width:44px; height:44px; border-radius:12px; border:none; background:rgba(255,255,255,0.15); color:#fff; font-size:22px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
        .visual-crosshair { position:absolute; top:25%; bottom:25%; left:8%; right:8%; border:2px solid rgba(249,115,22,0.5); border-radius:16px; pointer-events:none; z-index:3; }
        .visual-hint { position:absolute; bottom:12px; left:50%; transform:translateX(-50%); background:rgba(0,0,0,0.7); color:rgba(255,255,255,0.7); font-size:12px; padding:6px 14px; border-radius:20px; z-index:4; white-space:nowrap; }
        .visual-result-card { display:flex; gap:12px; align-items:center; cursor:pointer; padding:10px 12px; border-radius:12px; background:var(--bg-card); margin-bottom:8px; transition:transform 0.1s; -webkit-tap-highlight-color:transparent; }
        .visual-result-card:active { transform:scale(0.98); }
        .visual-result-thumb { width:56px; height:56px; border-radius:10px; background:var(--bg-input); flex-shrink:0; overflow:hidden; display:flex; align-items:center; justify-content:center; }
        .visual-result-thumb img { width:100%; height:100%; object-fit:contain; background:#fff; padding:2px; }
        .visual-result-info { flex:1; min-width:0; }
        .visual-result-sku { font-size:11px; color:var(--accent); font-family:'JetBrains Mono',monospace; font-weight:700; background:rgba(249,115,22,0.1); border:1px solid rgba(249,115,22,0.2); padding:2px 8px; border-radius:6px; display:inline-block; margin-bottom:3px; }
        .visual-result-name { font-size:13px; font-weight:600; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
        .visual-result-reason { font-size:11px; color:var(--text-muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
        .visual-result-arrow { color:var(--text-muted); font-size:18px; flex-shrink:0; }
        .visual-analysis { text-align:center; margin-bottom:12px; padding:10px; background:rgba(249,115,22,0.06); border-radius:12px; border:1px solid rgba(249,115,22,0.12); }
        .visual-analysis-desc { font-size:13px; color:var(--text-primary); font-weight:500; }
        .visual-analysis-conf { font-size:11px; color:var(--accent); margin-top:4px; font-family:'JetBrains Mono',monospace; }

        /* ═══ Receiving (Приёмка) — New Design ═══ */
        .rcv-overlay { position:fixed;inset:0;background:#0B0F19;z-index:1050;display:none;flex-direction:column;overflow:hidden;overscroll-behavior:none; }
        .rcv-overlay.show { display:flex; }
        .rcv-screen { position:absolute;inset:0;display:none;flex-direction:column;overflow:hidden; }
        .rcv-screen.active { display:flex; }
        .rcv-hdr { padding:14px 16px;padding-top:max(14px,env(safe-area-inset-top));display:flex;align-items:center;gap:12px;background:rgba(11,15,25,.97);backdrop-filter:blur(20px);border-bottom:1px solid rgba(255,255,255,.05);z-index:10;flex-shrink:0; }
        .rcv-hdr-back { width:38px;height:38px;border-radius:11px;background:rgba(255,255,255,.05);border:none;display:flex;align-items:center;justify-content:center;color:#8896AB;cursor:pointer; }
        .rcv-hdr-title { flex:1; }
        .rcv-hdr-title h1 { color:#F1F5F9;font-size:17px;font-weight:700;margin:0; }
        .rcv-hdr-title p { color:#6B7A92;font-size:12px;margin:1px 0 0; }
        .rcv-body { flex:1;overflow-y:auto;padding:12px 16px;padding-bottom:calc(140px + env(safe-area-inset-bottom, 0px));-webkit-overflow-scrolling:touch;overscroll-behavior:contain; }
        .rcv-ftr { padding:12px 16px;padding-bottom:max(12px,env(safe-area-inset-bottom));background:rgba(11,15,25,.97);backdrop-filter:blur(20px);border-top:1px solid rgba(255,255,255,.05);display:flex;gap:10px;flex-shrink:0;position:relative;z-index:10; }
        .rcv-btn-orange { flex:1;background:linear-gradient(135deg,#F97316,#DC5F0A);box-shadow:0 6px 28px rgba(249,115,22,.35);border:none;border-radius:14px;padding:16px;color:#fff;font-size:16px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:10px;font-family:inherit;min-height:52px;touch-action:manipulation;-webkit-tap-highlight-color:rgba(255,255,255,.18); }
        .rcv-btn-green { flex:1;background:linear-gradient(135deg,#22C55E,#16A34A);box-shadow:0 6px 24px rgba(34,197,94,.3);border:none;border-radius:14px;padding:16px;color:#fff;font-size:16px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:10px;font-family:inherit;min-height:52px;touch-action:manipulation;-webkit-tap-highlight-color:rgba(255,255,255,.18); }
        .rcv-btn-orange > *, .rcv-btn-green > *, .rcv-btn-ghost > * { pointer-events:none; }
        .rcv-btn-ghost { flex:1;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:16px;color:#CBD5E1;font-size:14px;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;font-family:inherit; }
        .rcv-btn-yellow { flex:1;background:rgba(234,179,8,.08);border:1px solid rgba(234,179,8,.2);border-radius:14px;padding:14px;color:#EAB308;font-size:14px;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;font-family:inherit; }
        .rcv-btn-wa { flex:1;background:linear-gradient(135deg,#25D366,#128C7E);box-shadow:0 6px 24px rgba(37,211,102,.3);border:none;border-radius:14px;padding:18px;color:#fff;font-size:16px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:10px;font-family:inherit; }
        .rcv-card { background:#131929;border:1px solid rgba(255,255,255,.05);border-radius:16px;margin-bottom:8px; }
        .rcv-badge { font-size:11px;font-weight:600;padding:3px 10px;border-radius:8px;display:inline-flex;align-items:center;gap:4px; }
        .rcv-chip { display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:8px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.06);color:#6B7A92;font-size:11px;font-weight:500; }
        .rcv-section-label { color:#8896AB;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:1px;margin-bottom:10px;padding-left:4px; }
        .rcv-pill { display:inline-flex;align-items:center;gap:8px;background:rgba(249,115,22,.1);padding:5px 14px;border-radius:10px; }
        .rcv-mono { font-family:'JetBrains Mono',monospace; }
        /* Confirm overlay */
        .rcv-confirm { position:fixed;inset:0;z-index:1200;background:rgba(0,0,0,.7);backdrop-filter:blur(8px);display:none;align-items:flex-end; }
        .rcv-confirm.show { display:flex; }
        .rcv-confirm-sheet { width:100%;border-radius:28px 28px 0 0;padding:24px 20px;padding-bottom:max(24px,env(safe-area-inset-bottom));transition:background .3s ease; }
        /* Scan flash */
        .rcv-flash { position:fixed;inset:0;background:rgba(249,115,22,.1);opacity:0;pointer-events:none;z-index:1150;transition:opacity .15s; }
        .rcv-flash.show { opacity:1; }
        /* Progress bar */
        .rcv-progress { height:4px;background:rgba(255,255,255,.05);border-radius:2px;overflow:hidden;margin-top:8px; }
        .rcv-progress-fill { height:100%;border-radius:2px;transition:width .4s ease; }
        /* Scan line animation */
        @keyframes rcvScanLine { 0%,100%{transform:translateY(-35px);opacity:.2} 50%{transform:translateY(35px);opacity:.8} }
        @keyframes rcvBlink { 0%,100%{opacity:1} 50%{opacity:.3} }

        .order-detail-overlay { position: fixed; inset: 0; background: var(--bg-primary); z-index: 1000; opacity: 0; visibility: hidden; pointer-events: none; transition: all 0.3s; display: flex; flex-direction: column; overflow: hidden; height: 100vh; height: 100dvh; overscroll-behavior: contain; }
        .order-detail-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
        /* ============================================ */
        /* Edit Order Screen (Variant A)                */
        /* ============================================ */
        .edit-order-overlay { position: fixed; inset: 0; background: var(--bg-primary); z-index: 1001; opacity: 0; visibility: hidden; pointer-events: none; transition: all 0.3s; overflow-y: auto; display: flex; flex-direction: column; }
        .edit-order-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
        .edit-order-header { background: linear-gradient(135deg, #F97316, #EA580C); padding: 16px 20px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
        .edit-order-header .back-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.2); border: none; color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
        .edit-order-header-info { flex: 1; }
        .edit-order-header-title { color: #fff; font-weight: 700; font-size: 18px; }
        .edit-order-header-sub { color: rgba(255,255,255,0.8); font-size: 13px; }
        .edit-order-status { background: rgba(255,255,255,0.15); padding: 6px 14px; border-radius: 20px; color: #fff; font-size: 12px; font-weight: 600; }
        .edit-order-client { margin: 12px 16px 0; background: var(--bg-card); border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 12px; }
        .edit-order-client-avatar { width: 40px; height: 40px; border-radius: 10px; background: var(--bg-input); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
        .edit-order-client-name { color: var(--text-primary); font-weight: 600; font-size: 15px; flex: 1; }
        .edit-order-body { flex: 1; overflow-y: auto; padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }
        .edit-order-section { padding: 0 16px; }
        .edit-order-section-header { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 10px; }
        .edit-order-section-title { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
        .edit-order-add-btn { background: var(--bg-input); border: none; color: var(--text-primary); padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.2s; }
        .edit-order-add-btn.active { background: var(--accent); color: #fff; }
        .edit-order-search { background: var(--bg-card); border-radius: 14px; padding: 12px; margin-bottom: 10px; animation: editSlideDown 0.2s ease; }
        @keyframes editSlideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
        .edit-order-search input { width: 100%; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; color: var(--text-primary); font-size: 14px; outline: none; font-family: inherit; box-sizing: border-box; }
        .edit-order-search input:focus { border-color: var(--accent); }
        .edit-order-search-results { max-height: 200px; overflow-y: auto; margin-top: 8px; }
        .edit-order-search-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--bg-input); cursor: pointer; transition: background 0.15s; }
        .edit-order-search-item:active { background: var(--accent-glow); }
        .edit-order-search-item-name { color: var(--text-muted); font-size: 11px; margin-top: 2px; }
        .edit-order-search-item-sku { color: var(--accent); font-size: 13px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
        .edit-order-search-item-price { color: var(--accent); font-weight: 700; font-size: 13px; }
        .edit-order-search-item-add { background: var(--accent); color: #fff; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex-shrink: 0; }
        .edit-order-item { background: var(--bg-card); border-radius: 14px; padding: 12px 14px; margin-bottom: 6px; }
        .edit-order-item-row { display: flex; gap: 10px; }
        .edit-order-item-info { flex: 1; min-width: 0; }
        .edit-order-item-name { color: var(--text-muted); font-size: 11px; font-weight: 400; line-height: 1.3; }
        .edit-order-item-sku { color: var(--accent); font-size: 13px; font-weight: 700; margin-bottom: 2px; font-family: 'JetBrains Mono', monospace; }
        .edit-order-item-unit-price { color: var(--text-muted); font-size: 11px; margin-top: 3px; }
        .edit-order-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
        .edit-order-item-sum { color: var(--accent); font-weight: 700; font-size: 15px; }
        .edit-order-qty { display: flex; align-items: center; background: var(--bg-primary); border-radius: 10px; overflow: hidden; }
        .edit-order-qty button { width: 34px; height: 34px; border: none; background: transparent; color: var(--text-primary); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: inherit; }
        .edit-order-qty button:active { background: var(--accent-glow); }
        .edit-order-qty .qty-danger { color: var(--danger); font-size: 15px; }
        .edit-order-qty .qty-accent { color: var(--accent); }
        .edit-order-qty span { width: 36px; text-align: center; color: #fff; font-weight: 700; font-size: 15px; }
        .edit-order-footer { position: fixed; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, var(--bg-primary) 80%, transparent); padding: 16px 16px 24px; z-index: 1002; }
        .edit-order-total-row { display: flex; justify-content: space-between; margin-bottom: 12px; padding: 0 4px; }
        .edit-order-total-label { color: var(--text-muted); font-size: 14px; }
        .edit-order-total-value { color: #fff; font-weight: 700; font-size: 20px; }
        .edit-order-save-btn { width: 100%; padding: 15px; background: linear-gradient(135deg, #F97316, #ff7b1c); border: none; border-radius: 14px; color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit; box-shadow: 0 4px 20px rgba(249,115,22,0.35); }
        .edit-order-save-btn:disabled { opacity: 0.6; }
        .edit-order-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 14px; }
        .edit-order-search-empty { text-align: center; padding: 16px; color: var(--text-muted); font-size: 13px; }
        .order-detail-header { display: flex; align-items: center; padding: 16px 20px; background: var(--bg-secondary); border-bottom: 1px solid var(--border); flex-shrink: 0; z-index: 10; }
        .order-detail-back { width: 40px; height: 40px; background: var(--bg-card); border: none; border-radius: 12px; color: var(--text-primary); font-size: 20px; cursor: pointer; margin-right: 16px; }
        .order-detail-title { flex: 1; }
        .order-detail-title h1 { font-size: 18px; font-weight: 600; }
        .order-detail-subtitle { font-size: 13px; color: var(--text-muted); }
        .order-detail-actions { display: flex; gap: 8px; }
        .order-detail-action-btn { width: 40px; height: 40px; background: var(--bg-card); border: none; border-radius: 12px; color: var(--text-secondary); font-size: 18px; cursor: pointer; }
        .order-detail-content { padding: 20px; padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)); flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: none; min-height: 0; }
        
        .order-status-banner { display: flex; align-items: center; padding: 16px; border-radius: 16px; margin-bottom: 20px; }
        .order-status-banner.reserve { background: rgba(251, 191, 36, 0.15); border: 1px solid rgba(251, 191, 36, 0.3); }
        .order-status-banner.shipping { background: rgba(52, 211, 153, 0.15); border: 1px solid rgba(52, 211, 153, 0.3); }
        .order-status-banner.completed { background: rgba(74, 222, 128, 0.15); border: 1px solid rgba(74, 222, 128, 0.3); }
        .order-status-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-right: 12px; }
        .order-status-banner.reserve .order-status-icon { background: rgba(251, 191, 36, 0.2); }
        .order-status-banner.shipping .order-status-icon { background: rgba(52, 211, 153, 0.2); }
        .order-status-banner.completed .order-status-icon { background: rgba(74, 222, 128, 0.2); }
        .order-status-text { font-size: 16px; font-weight: 600; }
        .order-status-banner.reserve .order-status-text { color: var(--warning); }
        .order-status-banner.shipping .order-status-text { color: var(--success); }
        .order-status-banner.completed .order-status-text { color: var(--success); }
        
        .order-info-card { background: var(--bg-card); border-radius: 16px; padding: 16px; margin-bottom: 16px; }
        .order-info-title { font-size: 12px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
        .order-info-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
        .order-info-row:last-child { border-bottom: none; padding-bottom: 0; }
        .order-info-label { font-size: 14px; color: var(--text-secondary); }
        .order-info-value { font-size: 14px; font-weight: 500; }
        .order-customer-card { display: flex; align-items: center; gap: 14px; }
        .order-customer-avatar { width: 48px; height: 48px; background: var(--accent-glow); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--accent); }
        .order-customer-name { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
        .order-customer-meta { font-size: 13px; color: var(--text-muted); }
        
        .order-items-section { background: var(--bg-card); border-radius: 16px; overflow: hidden; margin-bottom: 16px; }
        .order-items-header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--border); }
        .order-items-title { font-size: 14px; font-weight: 600; }
        .order-items-count { background: var(--bg-input); padding: 4px 10px; border-radius: 20px; font-size: 12px; color: var(--text-secondary); }
        .order-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
        .order-item:last-child { border-bottom: none; }
        .order-item-image { width: 48px; height: 48px; background: var(--bg-input); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
        .order-item-details { flex: 1; min-width: 0; }
        .order-item-name { font-size: 12px; font-weight: 400; color: var(--text-muted); margin-bottom: 2px; }
        .order-item-sku { font-size: 14px; color: var(--accent); font-family: 'JetBrains Mono', monospace; font-weight: 700; }
        .order-item-pricing { text-align: right; flex-shrink: 0; }
        .order-item-total { font-size: 15px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
        .order-item-meta { font-size: 12px; color: var(--text-muted); }
        
        .order-summary { background: var(--bg-card); border-radius: 16px; padding: 16px; margin-bottom: 16px; }
        .order-summary-row { display: flex; justify-content: space-between; padding: 8px 0; }
        .order-summary-label { font-size: 14px; color: var(--text-secondary); }
        .order-summary-value { font-size: 14px; font-weight: 500; }
        .order-summary-total { display: flex; justify-content: space-between; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--border); }
        .order-summary-total .order-summary-label { font-size: 16px; font-weight: 600; color: var(--text-primary); }
        .order-summary-total .order-summary-value { font-size: 22px; font-weight: 700; color: var(--accent); }
        
        .order-comment { background: var(--bg-card); border-radius: 16px; padding: 16px; margin-bottom: 16px; border-left: 4px solid var(--accent); }
        .order-comment-title { font-size: 12px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
        .order-comment-text { font-size: 14px; color: var(--text-secondary); }
        
        .order-actions-bar { flex-shrink: 0; padding: 16px 20px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); background: var(--bg-secondary); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; z-index: 1001; }
        .order-inline-actions { margin-top: 16px; padding-bottom: 16px; }
        .order-action-btn { flex: 1; padding: 14px; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
        .order-action-btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-dim)); color: white; box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3); }
        .order-action-btn.secondary { background: var(--bg-card); color: var(--text-primary); }
        .order-action-btn.success { background: linear-gradient(135deg, var(--success), #059669); color: white; box-shadow: 0 4px 12px rgba(52, 211, 153, 0.3); }
        .order-action-btn.danger { background: linear-gradient(135deg, #EF4444, #DC2626); color: white; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); }
        
        /* Edit Mode Banner */
        .edit-mode-banner { display: none; background: linear-gradient(135deg, #EA580C, #F97316); padding: 16px; border-radius: 16px; margin-bottom: 20px; box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4); }
        .edit-mode-content { display: flex; align-items: center; gap: 12px; color: white; }
        .edit-mode-icon { font-size: 24px; }
        .edit-mode-text { flex: 1; font-weight: 600; font-size: 16px; }
        .edit-mode-cancel { background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.3); color: white; padding: 8px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
        .edit-mode-cancel:hover { background: rgba(255, 255, 255, 0.3); }
        .order-action-btn.success:disabled { opacity: 0.6; cursor: not-allowed; }
        .order-action-btn.confirming { background: linear-gradient(135deg, #F59E0B, #D97706) !important; animation: pulse-confirm 0.6s ease-in-out infinite; }
        @keyframes pulse-confirm { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
        
        .receipt-overlay { position: fixed; inset: 0; background: linear-gradient(135deg, #0c1220 0%, #111827 50%, #0c1220 100%); z-index: 1100; opacity: 0; visibility: hidden; pointer-events: none; transition: all 0.3s; overflow-y: auto; padding: 20px; display: flex; justify-content: center; align-items: flex-start; }
        .receipt-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
        .receipt { background: #ffffff; border-radius: 24px; max-width: 400px; width: 100%; overflow: hidden; box-shadow: 0 25px 80px rgba(0,0,0,0.4); margin: 20px 0; color: #1a1a2e; }
        .receipt-header { background: linear-gradient(135deg, #F97316 0%, #EA580C 100%); padding: 32px 24px; text-align: center; position: relative; }
        .receipt-header::after { content: ''; position: absolute; bottom: -12px; left: 0; right: 0; height: 24px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 24'%3E%3Cpath d='M0 0 Q25 24 50 0 T100 0 V24 H0 Z' fill='%23ffffff'/%3E%3C/svg%3E") repeat-x; background-size: 50px 24px; }
        .receipt-logo { font-size: 30px; font-weight: 900; color: white; letter-spacing: 6px; text-shadow: 0 2px 10px rgba(0,0,0,0.2); }
        .receipt-logo-sub { font-size: 12px; color: rgba(255, 255, 255, 0.8); letter-spacing: 3px; }
        .receipt-order-info { padding: 28px 24px 20px; text-align: center; border-bottom: 2px dashed #e5e5e5; }
        .receipt-order-label { font-size: 14px; color: #888; }
        .receipt-order-number { font-size: 24px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
        .receipt-order-date { font-size: 13px; color: #999; margin-top: 8px; }
        .receipt-status { padding: 20px 24px; display: flex; justify-content: center; }
        .receipt-status-badge { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 50px; font-size: 14px; font-weight: 600; }
        .receipt-status-badge.reserve { background: #fff8e6; color: #b8860b; }
        .receipt-status-badge.shipping { background: #e6f3ff; color: #0066cc; }
        .receipt-status-badge.completed { background: #e6fff0; color: #00875a; }
        .receipt-customer { padding: 16px 24px; background: #fafafa; margin: 0 16px; border-radius: 12px; }
        .receipt-customer-label { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
        .receipt-customer-name { font-size: 16px; font-weight: 600; }
        .receipt-warehouse { padding: 12px 24px; display: flex; justify-content: space-between; font-size: 13px; color: #999; border-bottom: 1px solid #f0f0f0; }
        .receipt-items { padding: 24px; }
        .receipt-items-title { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
        .receipt-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
        .receipt-item:last-child { border-bottom: none; }
        .receipt-item-info { flex: 1; padding-right: 16px; }
        .receipt-item-name { font-size: 12px; font-weight: 400; color: var(--text-muted); margin-bottom: 2px; line-height: 1.3; }
        .receipt-item-sku { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: #F97316; font-weight: 700; }
        .receipt-item-price { text-align: right; }
        .receipt-item-total { font-size: 15px; font-weight: 600; }
        .receipt-item-calc { font-size: 11px; color: #bbb; margin-top: 2px; }
        .receipt-comment { padding: 16px 24px; background: #fff8f0; margin: 0 16px 16px; border-radius: 12px; border-left: 4px solid #F97316; }
        .receipt-comment-label { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
        .receipt-comment-text { font-size: 14px; color: #666; font-style: italic; }
        .receipt-summary { padding: 20px 24px; background: #fafafa; border-top: 2px dashed #e5e5e5; }
        .receipt-summary-row { display: flex; justify-content: space-between; padding: 6px 0; }
        .receipt-summary-label { font-size: 14px; color: #666; }
        .receipt-summary-value { font-size: 14px; }
        .receipt-summary-total { display: flex; justify-content: space-between; padding-top: 16px; margin-top: 12px; border-top: 2px solid #e5e5e5; }
        .receipt-summary-total .receipt-summary-label { font-size: 18px; font-weight: 600; }
        .receipt-summary-total .receipt-summary-value { font-size: 28px; font-weight: 700; color: #F97316; }
        .receipt-footer { padding: 24px; text-align: center; background: #111827; color: white; }
        .receipt-thanks { font-size: 16px; font-weight: 500; margin-bottom: 8px; }
        .receipt-contact { font-size: 13px; color: rgba(255,255,255,0.6); margin-bottom: 16px; }
        .receipt-powered { font-size: 11px; color: rgba(255,255,255,0.4); }
        .receipt-close { position: fixed; top: 20px; right: 20px; width: 44px; height: 44px; background: rgba(255,255,255,0.2); border: none; border-radius: 50%; color: white; font-size: 24px; cursor: pointer; z-index: 1101; }
        .receipt-share-btn { margin-top: 16px; padding: 14px 24px; background: linear-gradient(135deg, #F97316, #EA580C); border: none; border-radius: 12px; color: white; font-size: 15px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4); }
        
        .payment-type-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); display: flex; align-items: flex-end; z-index: 1050; opacity: 0; visibility: hidden; pointer-events: none; transition: all 0.3s; }
        .payment-type-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
        .payment-type-modal { width: 100%; background: var(--bg-secondary); border-radius: 24px 24px 0 0; padding: 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform 0.3s ease; }
        .payment-type-overlay.show .payment-type-modal { transform: translateY(0); }
        .payment-type-title { font-size: 20px; font-weight: 600; text-align: center; margin-bottom: 8px; }
        .payment-type-subtitle { font-size: 14px; color: var(--text-secondary); text-align: center; margin-bottom: 24px; }
        .payment-type-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
        .payment-type-option { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--bg-card); border: 2px solid var(--border); border-radius: 16px; cursor: pointer; transition: all 0.2s; }
        .payment-type-option:active { transform: scale(0.98); }
        .payment-type-option.selected { border-color: var(--accent); background: var(--accent-glow); }
        .payment-type-icon { width: 52px; height: 52px; background: var(--bg-input); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; }
        .payment-type-option.selected .payment-type-icon { background: var(--accent); }
        .payment-type-label { font-size: 17px; font-weight: 600; margin-bottom: 2px; }
        .payment-type-desc { font-size: 13px; color: var(--text-secondary); }
        .payment-type-amount { text-align: center; margin-bottom: 20px; padding: 12px; background: var(--bg-card); border-radius: 12px; }
        .payment-type-amount-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
        .payment-type-amount-value { font-size: 24px; font-weight: 700; color: var(--accent); }

        /* Kaspi QR Payment Screen */
        .kaspi-qr-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10001; background: #ffffff; display: none; flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch; }
        .kaspi-qr-overlay.show { display: flex; }
        .kaspi-qr-screen { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 20px 24px env(safe-area-inset-bottom); max-width: 420px; margin: 0 auto; width: 100%; }
        .kaspi-qr-header { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
        .kaspi-qr-back { width: 40px; height: 40px; border-radius: 12px; border: none; background: #f3f4f6; color: #374151; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
        .kaspi-qr-back:active { background: #e5e7eb; }
        .kaspi-qr-badge { display: inline-flex; align-items: center; gap: 6px; background: #fef3c7; color: #92400e; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 20px; }
        .kaspi-qr-amount-block { text-align: center; margin-bottom: 20px; }
        .kaspi-qr-amount-label { font-size: 14px; color: #6b7280; margin-bottom: 4px; }
        .kaspi-qr-amount { font-size: 40px; font-weight: 800; color: #111827; letter-spacing: -1px; }
        .kaspi-qr-amount span { font-size: 24px; font-weight: 600; color: #9ca3af; }
        .kaspi-qr-card { background: #ffffff; border: 2px solid #e5e7eb; border-radius: 24px; padding: 20px; width: 100%; text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,0.06); margin-bottom: 20px; }
        .kaspi-qr-card-logo { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 16px; }
        .kaspi-qr-card-logo svg { width: 28px; height: 28px; }
        .kaspi-qr-card-logo span { font-size: 18px; font-weight: 800; color: #dc2626; }
        .kaspi-qr-img-wrap { position: relative; width: 220px; height: 220px; margin: 0 auto 12px; border-radius: 16px; overflow: hidden; background: #fff; }
        .kaspi-qr-img-wrap img { width: 100%; height: 100%; object-fit: contain; }
        .kaspi-qr-merchant { font-size: 15px; font-weight: 700; color: #111827; margin-bottom: 2px; }
        .kaspi-qr-address { font-size: 13px; color: #6b7280; }
        .kaspi-qr-steps { width: 100%; background: #f9fafb; border-radius: 16px; padding: 16px 20px; margin-bottom: 24px; }
        .kaspi-qr-steps-title { font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
        .kaspi-qr-step { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
        .kaspi-qr-step-num { width: 28px; height: 28px; border-radius: 50%; background: #dc2626; color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .kaspi-qr-step-text { font-size: 14px; color: #374151; }
        .kaspi-qr-step-text strong { color: #111827; font-weight: 700; }
        .kaspi-qr-actions { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 8px; }
        .kaspi-qr-confirm { width: 100%; padding: 18px; border: none; border-radius: 16px; font-size: 17px; font-weight: 700; font-family: inherit; cursor: pointer; background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 4px 16px rgba(34,197,94,0.3); transition: all 0.2s; }
        .kaspi-qr-confirm:active { transform: scale(0.97); }
        .kaspi-qr-other { width: 100%; padding: 14px; border: none; border-radius: 14px; font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer; background: #f3f4f6; color: #6b7280; transition: all 0.2s; }
        .kaspi-qr-other:active { background: #e5e7eb; }

        .order-type-toggle { display: flex; gap: 0; background: var(--bg-input); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
        .order-type-btn { flex: 1; padding: 12px 8px; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all 0.2s; background: transparent; color: var(--text-muted); text-align: center; }
        .order-type-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent-dim)); color: white; box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3); }
        .preorder-fields { display: none; animation: fadeIn 0.3s ease; }
        .preorder-fields.show { display: block; }
        .percent-buttons { display: flex; gap: 8px; margin-bottom: 8px; }
        .percent-btn { flex: 1; padding: 10px 4px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all 0.2s; text-align: center; }
        .percent-btn.active { border-color: var(--accent); background: var(--accent-glow); color: var(--accent); }
        .percent-btn:active { transform: scale(0.95); }
        .preorder-summary { background: var(--bg-input); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-top: 12px; }
        .preorder-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
        .preorder-summary-row:not(:last-child) { border-bottom: 1px solid var(--border); }
        .preorder-summary-label { font-size: 13px; color: var(--text-secondary); }
        .preorder-summary-value { font-size: 14px; font-weight: 600; }
        .preorder-summary-value.accent { color: var(--accent); }
        .preorder-badge { display: inline-block; padding: 3px 8px; background: rgba(251, 191, 36, 0.2); color: #fbbf24; border-radius: 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; margin-left: 6px; }
        
        /* NDS Toggle */
        .nds-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 12px; margin-top: 12px; cursor: pointer; transition: all 0.25s ease; }
        .nds-toggle-row.active { border-color: rgba(249, 115, 22, 0.4); background: rgba(249, 115, 22, 0.08); }
        .nds-toggle-left { display: flex; align-items: center; gap: 10px; }
        .nds-toggle-icon { font-size: 20px; }
        .nds-toggle-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
        .nds-toggle-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
        .nds-switch { width: 48px; height: 28px; border-radius: 14px; padding: 2px; background: #374151; transition: background 0.25s ease; position: relative; flex-shrink: 0; }
        .nds-switch.on { background: var(--accent); }
        .nds-switch-knob { width: 24px; height: 24px; border-radius: 12px; background: #fff; transition: transform 0.25s ease; }
        .nds-switch.on .nds-switch-knob { transform: translateX(20px); }
        .nds-info-block { margin-top: 8px; padding: 10px 12px; background: rgba(249, 115, 22, 0.06); border: 1px solid rgba(249, 115, 22, 0.15); border-radius: 8px; display: none; }
        .nds-info-block.show { display: block; animation: fadeIn 0.3s ease; }
        .nds-info-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 3px 0; }
        .nds-info-label { color: var(--text-muted); }
        .nds-info-value { font-weight: 600; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--accent); }

        /* ============================================ */
        /* Preorder Reminders Banner                    */
        /* ============================================ */
        .reminders-banner {
            border-radius: 16px;
            padding: 16px 20px;
            margin-bottom: 20px;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
            overflow: hidden;
        }
        .reminders-banner:active {
            transform: scale(0.98);
        }
        .reminders-banner::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
            animation: streak-shimmer 4s ease-in-out infinite;
        }
        .reminders-banner.has-overdue {
            background: linear-gradient(135deg, #2a1015 0%, var(--bg-card) 60%, rgba(248, 113, 113, 0.08) 100%);
            border: 1px solid rgba(248, 113, 113, 0.3);
        }
        .reminders-banner.has-upcoming {
            background: linear-gradient(135deg, #2a2005 0%, var(--bg-card) 60%, rgba(251, 191, 36, 0.08) 100%);
            border: 1px solid rgba(251, 191, 36, 0.3);
        }
        .reminders-banner.all-ok {
            display: none;
        }
        .reminders-header {
            display: flex;
            align-items: center;
            gap: 12px;
            position: relative;
            z-index: 1;
        }
        .reminders-icon {
            font-size: 28px;
            flex-shrink: 0;
        }
        .reminders-icon.overdue {
            animation: pulse-glow 1.5s ease-in-out infinite;
        }
        .reminders-info {
            flex: 1;
        }
        .reminders-title {
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 2px;
        }
        .reminders-title .overdue-text {
            color: var(--danger);
        }
        .reminders-title .upcoming-text {
            color: var(--warning);
        }
        .reminders-subtitle {
            font-size: 12px;
            color: var(--text-secondary);
        }
        .reminders-badge {
            background: var(--danger);
            color: white;
            font-size: 14px;
            font-weight: 700;
            min-width: 28px;
            height: 28px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 8px;
            position: relative;
            z-index: 1;
            flex-shrink: 0;
        }
        .reminders-badge.warning {
            background: var(--warning);
            color: #1a1a2e;
        }
        .reminders-details {
            margin-top: 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            position: relative;
            z-index: 1;
        }
        .reminder-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(0,0,0,0.2);
            border-radius: 10px;
            padding: 10px 14px;
        }
        .reminder-item-left {
            flex: 1;
            min-width: 0;
        }
        .reminder-item-customer {
            font-size: 13px;
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .reminder-item-date {
            font-size: 11px;
            color: var(--text-muted);
            margin-top: 1px;
        }
        .reminder-item-date.overdue {
            color: var(--danger);
            font-weight: 600;
        }
        .reminder-item-date.soon {
            color: var(--warning);
        }
        .reminder-item-amount {
            font-size: 14px;
            font-weight: 600;
            color: var(--accent);
            flex-shrink: 0;
            margin-left: 12px;
        }
        .reminders-footer {
            margin-top: 10px;
            text-align: center;
            font-size: 12px;
            color: var(--text-muted);
            position: relative;
            z-index: 1;
        }
        .reminders-footer span {
            border-bottom: 1px dashed var(--text-muted);
        }

        /* Header notification bell */
        .header-bell {
            width: 36px;
            height: 36px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 10px;
            color: var(--text-muted);
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            position: relative;
        }
        .header-bell.has-alerts {
            border-color: rgba(248, 113, 113, 0.4);
            color: var(--danger);
            animation: pulse-glow 2s ease-in-out infinite;
        }
        .header-bell-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            background: var(--danger);
            color: white;
            font-size: 9px;
            font-weight: 700;
            min-width: 16px;
            height: 16px;
            border-radius: 8px;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 0 4px;
        }
        .header-bell.has-alerts .header-bell-badge {
            display: flex;
        }

        /* ============================================ */
        /* Sound Toggle                                 */
        /* ============================================ */
        .sound-toggle {
            width: 36px;
            height: 36px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 10px;
            color: var(--text-muted);
            font-size: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }
        .sound-toggle.on {
            color: var(--accent);
            border-color: var(--accent-dim);
        }

        /* ============================================ */
        /* Quote Screen (Motivational)                  */
        /* ============================================ */
        .quote-screen {
            background: var(--bg-primary);
            position: relative;
            overflow: hidden;
            justify-content: center;
            align-items: center;
            text-align: center;
            padding: 40px 24px;
        }
        .quote-screen::before {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(ellipse at 50% 30%, rgba(249,115,22,0.12) 0%, transparent 70%);
        }
        .quote-content {
            position: relative;
            z-index: 1;
            max-width: 360px;
            animation: quoteFadeIn 0.8s ease;
        }
        @keyframes quoteFadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .quote-emoji { font-size: 56px; margin-bottom: 20px; display: block; animation: pulse-glow 2s ease-in-out infinite; }
        .quote-mark { font-size: 48px; color: var(--accent); opacity: 0.3; line-height: 1; margin-bottom: -8px; font-family: Georgia, serif; }
        .quote-text { font-size: 20px; font-weight: 600; line-height: 1.5; color: var(--text-primary); margin-bottom: 16px; }
        .quote-author { font-size: 14px; color: var(--accent); font-weight: 500; margin-bottom: 32px; }
        .quote-divider { width: 60px; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); margin: 0 auto 24px; }
        .quote-greeting { font-size: 16px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 40px; }
        .quote-greeting strong { color: var(--text-primary); }
        .quote-cta {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            background: linear-gradient(135deg, var(--accent), var(--accent-dim));
            color: white;
            border: none;
            border-radius: 16px;
            padding: 18px 48px;
            font-size: 18px;
            font-weight: 700;
            font-family: inherit;
            cursor: pointer;
            box-shadow: 0 8px 32px rgba(249,115,22,0.4);
            transition: all 0.2s;
        }
        .quote-cta:active { transform: scale(0.96); }
        .quote-skip { display: block; margin-top: 16px; background: none; border: none; color: var(--text-muted); font-size: 13px; cursor: pointer; font-family: inherit; }

        /* ============================================ */
        /* Redesigned Dashboard (Prototype Style)       */
        /* ============================================ */
        .dash-header {
            background: rgba(17, 24, 39, 0.92);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            padding: 16px 20px 14px;
            border-bottom: 1px solid var(--border-light);
            position: sticky;
            top: 0;
            z-index: 100;
        }
        .dash-header-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }
        .dash-logo {
            font-size: 22px;
            font-weight: 900;
            color: var(--accent);
            letter-spacing: -0.5px;
        }
        .dash-header-actions { display: flex; gap: 8px; align-items: center; }
        .dash-header-btn {
            background: var(--bg-card);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--border-light);
            border-radius: 11px;
            width: 38px;
            height: 38px;
            padding: 0;
            font-size: 15px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: transform 0.1s;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .dash-header-btn:active { transform: scale(0.95); }
        .dash-greeting-row {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
        }
        .dash-greeting { font-size: 14px; color: var(--text-secondary); margin-bottom: 2px; }
        .dash-manager-name { font-size: 22px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
        .dash-time-info { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
        .dash-time-dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; animation: pulse 2s ease-in-out infinite; }
        @keyframes pulse { 0%,100%{opacity:.7;transform:scale(1)} 50%{opacity:1;transform:scale(1.2)} }
        .dash-warehouse { font-size: 12px; color: var(--accent); margin-top: 3px; }

        /* Hero Button */
        .hero-new-order {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            border: none;
            padding: 16px 20px;
            border-radius: 14px;
            background: linear-gradient(135deg, #F97316, #EA580C, #DC2626);
            background-size: 200% 200%;
            animation: gradShift 3s ease infinite, heroPulse 2s ease-out infinite;
            color: white;
            font-size: 17px;
            font-weight: 800;
            font-family: inherit;
            cursor: pointer;
            box-shadow: 0 6px 24px rgba(249,115,22,0.4);
            position: relative;
            overflow: hidden;
            transition: transform 0.1s;
        }
        .hero-new-order:active { transform: scale(0.97); }
        .hero-new-order::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
            background-size: 200% 100%;
            animation: shimmer 3s ease-in-out infinite;
        }
        .hero-new-order svg { width: 24px; height: 24px; position: relative; z-index: 1; }
        .hero-new-order span { position: relative; z-index: 1; }

        /* Quick Actions (3 cols) */
        .dash-quick-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            margin-bottom: 16px;
        }
        .dash-quick-btn {
            background: var(--bg-card);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--border-light);
            border-radius: 12px;
            padding: 12px 8px;
            text-align: center;
            cursor: pointer;
            transition: transform 0.1s;
        }
        .dash-quick-btn:active { transform: scale(0.95); }
        .dash-quick-btn svg { width: 22px; height: 22px; color: var(--text-secondary); margin-bottom: 4px; }
        .dash-quick-label { font-size: 11px; color: var(--text-secondary); font-weight: 600; }

        /* Plan Card Base */
        .plan-card {
            background: var(--bg-card);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--border-light);
            border-radius: 14px;
            padding: 12px 14px;
            margin-bottom: 12px;
            animation: slideUp 0.3s ease both;
        }
        .plan-card.daily { animation-delay: 0.05s; }
        .plan-card.monthly { animation-delay: 0.1s; }
        .plan-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }
        .plan-card-title {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            font-weight: 700;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .plan-card-title svg { width: 16px; height: 16px; }
        .plan-card-badge {
            font-size: 10px;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 6px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .plan-card.daily .plan-card-badge { background: rgba(249,115,22,0.15); color: var(--accent); }
        .plan-card.monthly .plan-card-badge { background: rgba(52,211,153,0.15); color: var(--success); }
        .plan-card-values {
            display: flex;
            align-items: baseline;
            gap: 8px;
            margin-bottom: 6px;
        }
        .plan-card-fact {
            font-size: 22px;
            font-weight: 900;
            font-family: 'JetBrains Mono', monospace;
            color: var(--text-primary);
            line-height: 1;
        }
        .plan-card-goal {
            font-size: 12px;
            color: var(--text-muted);
        }
        .plan-card-remaining {
            font-size: 11px;
            color: var(--text-secondary);
            margin-bottom: 8px;
        }
        .plan-card-remaining strong { color: var(--text-primary); font-family: 'JetBrains Mono', monospace; }
        /* Progress bar */
        .plan-progress {
            height: 6px;
            background: rgba(255,255,255,0.06);
            border-radius: 3px;
            overflow: hidden;
            margin-bottom: 4px;
        }
        .plan-progress-fill {
            height: 100%;
            border-radius: 3px;
            transition: width 0.8s cubic-bezier(0.16,1,0.3,1);
            position: relative;
        }
        .plan-card.daily .plan-progress-fill {
            background: linear-gradient(90deg, var(--accent-dim), var(--accent), #FB923C);
            box-shadow: 0 0 8px rgba(249,115,22,0.3);
        }
        .plan-card.monthly .plan-progress-fill {
            background: linear-gradient(90deg, #059669, var(--success), #6EE7B7);
            box-shadow: 0 0 8px rgba(52,211,153,0.3);
        }
        .plan-progress-labels {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 11px;
            color: var(--text-muted);
            margin-bottom: 6px;
        }
        .plan-progress-percent {
            font-weight: 700;
            font-family: 'JetBrains Mono', monospace;
        }
        .plan-card.daily .plan-progress-percent { color: var(--accent); }
        .plan-card.monthly .plan-progress-percent { color: var(--success); }
        /* Motivation strip */
        .plan-motivation {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 5px 10px;
            border-radius: 8px;
            font-size: 11px;
            font-weight: 600;
        }
        .plan-motivation svg { width: 16px; height: 16px; flex-shrink: 0; }
        .plan-motivation.level-low { background: rgba(249,115,22,0.1); color: var(--accent); }
        .plan-motivation.level-mid { background: rgba(251,191,36,0.1); color: var(--warning); }
        .plan-motivation.level-high { background: rgba(52,211,153,0.1); color: var(--success); }
        .plan-motivation.level-hot { background: rgba(239,68,68,0.1); color: #F87171; }
        .plan-motivation.level-done { background: rgba(52,211,153,0.15); color: var(--success); border: 1px solid rgba(52,211,153,0.2); }
        .plan-motivation.level-over { background: linear-gradient(90deg, rgba(251,191,36,0.12), rgba(249,115,22,0.12)); color: #fbbf24; border: 1px solid rgba(251,191,36,0.2); }
        /* Monthly metrics */
        .plan-metrics {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr 1fr;
            gap: 6px;
            margin-top: 8px;
        }
        .plan-metric {
            text-align: center;
            padding: 6px 4px;
            background: rgba(255,255,255,0.03);
            border-radius: 8px;
        }
        .plan-metric-value {
            font-size: 13px;
            font-weight: 800;
            font-family: 'JetBrains Mono', monospace;
            line-height: 1;
            margin-bottom: 3px;
        }
        .plan-metric-label {
            font-size: 8px;
            color: var(--text-muted);
            text-transform: uppercase;
            font-weight: 600;
        }

        /* AI Insights Card */
        .ai-insights-card {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
            border: 1px solid rgba(139, 92, 246, 0.25);
            border-radius: 16px;
            padding: 14px 16px;
            margin-bottom: 12px;
            animation: slideUp 0.4s ease both;
            animation-delay: 0.25s;
        }
        .ai-insights-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 10px;
            font-size: 11px;
            font-weight: 700;
            color: var(--purple);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .ai-insights-header span { font-size: 14px; }
        .ai-insights-body {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .ai-insight-row {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 13px;
            color: var(--text-primary);
            line-height: 1.4;
        }
        .ai-insight-row .ai-icon {
            font-size: 16px;
            flex-shrink: 0;
            width: 20px;
            text-align: center;
        }
        .ai-insight-row strong {
            color: var(--accent);
            font-family: 'JetBrains Mono', monospace;
        }
        .ai-insights-card.status-good { border-color: rgba(52, 211, 153, 0.3); background: linear-gradient(135deg, rgba(52, 211, 153, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%); }
        .ai-insights-card.status-warn { border-color: rgba(251, 191, 36, 0.3); background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%); }
        .ai-insights-card.status-bad { border-color: rgba(248, 113, 113, 0.3); background: linear-gradient(135deg, rgba(248, 113, 113, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%); }

        /* Stats Grid (Prototype) */
        .dash-stats {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-bottom: 12px;
        }
        .dash-stat {
            background: var(--bg-card);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--border-light);
            border-radius: 14px;
            padding: 14px 12px;
            text-align: center;
            animation: slideUp 0.3s ease both;
        }
        .dash-stat:nth-child(1) { animation-delay: 0.15s; }
        .dash-stat:nth-child(2) { animation-delay: 0.2s; }
        .dash-stat-value {
            font-size: 20px;
            font-weight: 900;
            letter-spacing: -1px;
            line-height: 1;
            margin-bottom: 6px;
            font-family: 'JetBrains Mono', monospace;
        }
        .dash-stat-value.accent { color: var(--accent); }
        .dash-stat-value.success { color: var(--success); }
        .dash-stat-label { font-size: 10px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

        /* ═══════════════════════════════════════════ */
        /* ═══════ LEADERBOARD — ENHANCED ═══════════ */
        /* ═══════════════════════════════════════════ */
        .lb-section { padding: 0 16px; margin-bottom: 20px; }
        .lb-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
        .lb-title { font-size: 15px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
        .lb-title-icon { width: 20px; height: 20px; background: linear-gradient(135deg, var(--accent), #FBBF24); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 11px; }
        .lb-badge { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: rgba(249,115,22,0.12); color: var(--accent); font-family: 'JetBrains Mono', monospace; display: flex; align-items: center; gap: 4px; }
        .lb-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: pulse-dot 2s ease-in-out infinite; }

        /* Period tabs */
        .lb-tabs { display: flex; gap: 4px; padding: 3px; margin-bottom: 14px; background: rgba(255,255,255,0.03); border-radius: 10px; border: 1px solid var(--border-light); }
        .lb-tab { flex: 1; padding: 7px 0; text-align: center; font-size: 12px; font-weight: 600; border-radius: 8px; color: var(--text-muted); cursor: pointer; transition: all 0.3s; }
        .lb-tab.active { background: linear-gradient(135deg, var(--accent), #EA580C); color: white; box-shadow: 0 2px 10px rgba(249,115,22,0.25); }

        /* Podium */
        .podium { display: flex; align-items: flex-end; gap: 8px; padding: 10px 4px 0; margin-bottom: 16px; min-height: 200px; }
        .podium-slot { flex: 1; display: flex; flex-direction: column; align-items: center; }
        .podium-slot.first { order: 2; margin-top: -12px; }
        .podium-slot.second { order: 1; margin-top: 16px; }
        .podium-slot.third { order: 3; margin-top: 28px; }

        .pod-avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; margin-bottom: 6px; border: 2px solid rgba(249,115,22,0.3); background: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(249,115,22,0.05)); color: var(--accent); position: relative; }
        .podium-slot.first .pod-avatar { width: 56px; height: 56px; font-size: 17px; background: linear-gradient(135deg, var(--accent), #FBBF24); color: var(--bg-main); border-color: #FBBF24; box-shadow: 0 0 24px rgba(249,115,22,0.35), 0 0 48px rgba(249,115,22,0.12); }
        .pod-crown { position: absolute; top: -14px; right: -6px; font-size: 16px; filter: drop-shadow(0 0 3px rgba(255,200,0,0.5)); }
        .pod-medal { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); font-size: 14px; }
        .pod-name { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 2px; text-align: center; }
        .pod-pct { font-size: 16px; font-weight: 900; font-family: 'JetBrains Mono', monospace; color: var(--accent); }
        .podium-slot.first .pod-pct { font-size: 20px; color: #FBBF24; text-shadow: 0 0 16px rgba(251,191,36,0.3); }
        .pod-label { font-size: 10px; color: var(--text-muted); margin-bottom: 6px; }

        .pod-bar { width: 100%; border-radius: 12px 12px 0 0; position: relative; overflow: hidden; border: 1px solid rgba(249,115,22,0.12); border-bottom: none; }
        .podium-slot.first .pod-bar { height: 100px; background: linear-gradient(180deg, rgba(249,115,22,0.2), rgba(249,115,22,0.04)); border-color: rgba(249,115,22,0.2); }
        .podium-slot.second .pod-bar { height: 72px; background: linear-gradient(180deg, rgba(148,163,184,0.12), rgba(148,163,184,0.03)); border-color: rgba(148,163,184,0.12); }
        .podium-slot.third .pod-bar { height: 52px; background: linear-gradient(180deg, rgba(217,119,6,0.12), rgba(217,119,6,0.03)); border-color: rgba(217,119,6,0.1); }
        .pod-bar-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 900; color: rgba(249,115,22,0.08); }
        .podium-slot.first .pod-bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(249,115,22,0.08) 0%, transparent 100%); animation: pulse-glow 3s ease-in-out infinite; }

        /* Team stats */
        .lb-stats { display: flex; gap: 1px; margin-bottom: 14px; background: var(--border-light); border-radius: 16px; overflow: hidden; }
        .lb-stat { flex: 1; text-align: center; padding: 12px 6px; background: var(--bg-main); }
        .lb-stat:first-child { border-radius: 16px 0 0 16px; }
        .lb-stat:last-child { border-radius: 0 16px 16px 0; }
        .lb-stat-val { font-size: 18px; font-weight: 800; color: var(--accent); font-family: 'JetBrains Mono', monospace; }
        .lb-stat-lbl { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

        /* Ranking cards */
        .lb-list { display: flex; flex-direction: column; gap: 8px; }
        .lb-card { padding: 14px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border-light); display: flex; flex-direction: column; gap: 10px; transition: all 0.3s; animation: slideUp 0.5s ease-out both; }
        .lb-card.is-me { background: rgba(249,115,22,0.06); border-color: rgba(249,115,22,0.15); box-shadow: 0 4px 20px rgba(249,115,22,0.08); }
        .lb-card.first-place { background: linear-gradient(135deg, rgba(249,115,22,0.1), rgba(251,191,36,0.05)); border-color: rgba(249,115,22,0.2); box-shadow: 0 4px 24px rgba(249,115,22,0.1); }

        .lb-card-top { display: flex; align-items: center; gap: 10px; }
        .lb-rank-badge { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; font-family: 'JetBrains Mono', monospace; }
        .lb-rank-badge.gold { background: rgba(251,191,36,0.15); color: #FBBF24; }
        .lb-rank-badge.silver { background: rgba(148,163,184,0.15); color: #94a3b8; }
        .lb-rank-badge.bronze { background: rgba(217,119,6,0.15); color: #D97706; }
        .lb-rank-badge.normal { background: rgba(255,255,255,0.05); color: var(--text-muted); }

        .lb-card-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(249,115,22,0.05)); color: var(--accent); border: 1px solid rgba(249,115,22,0.2); }
        .lb-card.first-place .lb-card-avatar { background: linear-gradient(135deg, var(--accent), #FBBF24); color: var(--bg-main); border-color: #FBBF24; }

        .lb-card-info { flex: 1; }
        .lb-card-name-row { display: flex; align-items: center; gap: 6px; }
        .lb-card-name { font-size: 14px; font-weight: 600; }
        .lb-card-trend { font-size: 10px; font-weight: 800; }
        .lb-card-trend.up { color: #10B981; }
        .lb-card-trend.down { color: #EF4444; }

        .lb-card-meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
        .lb-card-title { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: rgba(255,255,255,0.05); }
        .lb-card-title.legend { color: #FBBF24; background: rgba(251,191,36,0.1); }
        .lb-card-title.master { color: #94a3b8; background: rgba(148,163,184,0.1); }
        .lb-card-title.pro { color: #D97706; background: rgba(217,119,6,0.1); }
        .lb-card-title.fighter { color: var(--accent); background: rgba(249,115,22,0.1); }
        .lb-card-title.rookie { color: var(--text-muted); }

        .lb-card-pct { text-align: right; }
        .lb-card-pct-val { font-size: 22px; font-weight: 900; font-family: 'JetBrains Mono', monospace; }
        .lb-card-pct-val.over { color: #FBBF24; text-shadow: 0 0 16px rgba(251,191,36,0.25); }
        .lb-card-pct-val.hot { color: var(--accent); }
        .lb-card-pct-val.warm { color: var(--accent); opacity: 0.7; }
        .lb-card-pct-val.cold { color: var(--text-muted); }
        .lb-card-pct-lbl { font-size: 10px; color: var(--text-muted); text-align: right; }

        .lb-progress { height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; }
        .lb-progress-fill { height: 100%; border-radius: 3px; transition: width 1.2s ease-out; }
        .lb-progress-fill.over { background: linear-gradient(90deg, var(--accent), #FBBF24); box-shadow: 0 0 8px rgba(249,115,22,0.4); }
        .lb-progress-fill.hot { background: linear-gradient(90deg, var(--accent), #fb923c); }
        .lb-progress-fill.warm { background: linear-gradient(90deg, #6b7280, var(--accent)); }
        .lb-progress-fill.cold { background: linear-gradient(90deg, #374151, #6b7280); }

        .lb-card-bottom { display: flex; align-items: center; gap: 12px; }
        .lb-card-stat { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); }
        .lb-card-dot { width: 5px; height: 5px; border-radius: 50%; }
        .lb-card-dot.orange { background: var(--accent); }
        .lb-card-dot.blue { background: #3b82f6; }
        .lb-card-overachieve { margin-left: auto; font-size: 10px; font-weight: 700; color: #FBBF24; }

        .lb-footer { margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(249,115,22,0.06), rgba(251,191,36,0.03)); border: 1px solid rgba(249,115,22,0.1); text-align: center; }
        .lb-footer-main { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
        .lb-footer-main strong { color: var(--accent); font-weight: 800; }
        .lb-footer-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

        @keyframes pulse-glow { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

        /* Quick Actions (legacy 2x2 removed, now using hero + quick row) */
        .dash-actions {
            padding: 0 20px 32px;
        }
        .dash-actions-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }
        .dash-action-btn {
            background: var(--bg-card);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--border-light);
            border-radius: 14px;
            padding: 20px 16px;
            text-align: center;
            cursor: pointer;
            transition: transform 0.1s;
            -webkit-tap-highlight-color: transparent;
        }
        .dash-action-btn:active { transform: translateY(2px); }
        .dash-action-btn.primary {
            background: linear-gradient(135deg, var(--accent), var(--accent-dim));
            border: none;
            box-shadow: 0 6px 20px rgba(249,115,22,0.3);
        }
        .dash-action-btn.primary:active { transform: translateY(2px); box-shadow: 0 2px 8px rgba(249,115,22,0.3); }
        .dash-action-icon { font-size: 28px; margin-bottom: 10px; }
        .dash-action-label { font-size: 14px; font-weight: 700; color: var(--text-primary); }
        .dash-action-btn.primary .dash-action-label { color: white; }

        /* Bottom Nav Redesign (SVG icons, fixed safe-area) */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: #111827;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            border-top: 1px solid var(--border-light);
            display: flex;
            padding: 6px 0 10px;
            padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
            z-index: 900;
            box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
            isolation: isolate;
        }
        .nav-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            padding: 8px 0;
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 10px;
            font-weight: 700;
            font-family: inherit;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            min-height: 56px;
            transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s;
        }
        .nav-item:active { 
            color: var(--accent); 
            transform: translate3d(0, 0, 0) scale(0.92); 
        }
        .nav-item.active { color: var(--accent); filter: drop-shadow(0 0 6px rgba(249,115,22,0.4)); }
        .nav-icon { width: 22px; height: 22px; pointer-events: none; }

        /* ============================================ */
        /* Touch Responsiveness                         */
        /* ============================================ */
        button, .quick-action, .dash-action-btn, .order-card, .customer-result,
        .category-chip, .product-card, .nav-item, .radio-option,
        .payment-type-option, .order-action-btn {
            touch-action: manipulation;
            -webkit-user-select: none;
            user-select: none;
        }
        button { min-height: 44px; }
        .order-action-btn { min-height: 52px; }
        .nav-item { min-height: 56px; }
        .qty-btn { min-width: 36px; min-height: 36px; width: 36px; height: 36px; }
        .dash-action-btn { min-height: 72px; }
        .order-action-btn:active { transform: scale(0.96); }
        .btn:active { transform: scale(0.97); }
        .order-card:active { transform: scale(0.99); }
        .category-chip:active { transform: scale(0.95); }
        .touch-active { transform: scale(0.97); opacity: 0.8; transition: transform 0.1s, opacity 0.1s; }

        /* AI Summary — Director Dashboard */
        .ai-summary-btn {
            background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
            color: #fff;
            border: none;
            border-radius: 10px;
            padding: 10px 16px;
            font-size: 13px;
            font-weight: 700;
            font-family: 'Crimson Pro', serif;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            margin: 12px 0;
            width: 100%;
            justify-content: center;
            letter-spacing: 0.5px;
            transition: opacity 0.2s;
        }
        .ai-summary-btn:disabled { opacity: 0.5; }
        .ai-summary-btn .ai-spin {
            display: inline-block;
            animation: spin 1s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        .ai-summary-modal {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            z-index: 9999;
            background: rgba(0,0,0,0.85);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .ai-summary-modal.show { display: flex; }
        .ai-summary-box {
            background: #1a1a1f;
            border: 1px solid rgba(139, 92, 246, 0.3);
            border-radius: 20px;
            max-width: 500px;
            width: 100%;
            max-height: 80vh;
            overflow-y: auto;
            padding: 24px 20px;
            color: #d4c5a0;
            font-family: 'Crimson Pro', serif;
            line-height: 1.6;
        }
        .ai-summary-box-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(139, 92, 246, 0.2);
        }
        .ai-summary-box-title {
            font-size: 16px;
            font-weight: 700;
            color: #a78bfa;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .ai-summary-close {
            background: none;
            border: 1px solid rgba(139, 92, 246, 0.3);
            color: #8a7d65;
            font-size: 18px;
            cursor: pointer;
            padding: 4px 10px;
            border-radius: 8px;
        }
        .ai-summary-text {
            font-size: 15px;
            white-space: pre-wrap;
            color: #d4c5a0;
        }
        .ai-summary-text strong { color: #c8a84e; }

        /* ═══════════════════════════════════════════════════ */
        /* WERK ANALYTICS — ВСТРОЕННАЯ АНАЛИТИКА              */
        /* ═══════════════════════════════════════════════════ */
        .wa-overlay { position:fixed;top:0;left:0;right:0;bottom:0;background:var(--bg-primary,#0F172A);z-index:1060;display:none;flex-direction:column;overflow:hidden; }
        .wa-overlay.show { display:flex; }
        .wa-header { display:flex;align-items:center;gap:12px;padding:12px 16px;padding-top:max(12px,env(safe-area-inset-top));background:var(--bg-card,#131929);border-bottom:1px solid var(--border-light,#1E293B);flex-shrink:0; }
        .wa-back { background:none;border:none;font-size:22px;cursor:pointer;color:var(--text-primary,#F1F5F9);padding:10px 14px;min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center; }
        .wa-title { font-size:17px;font-weight:700;font-family:'Exo 2',sans-serif;color:var(--text-primary,#F1F5F9);flex:1; }
        .wa-refresh { background:none;border:none;color:var(--text-secondary,#94A3B8);font-size:20px;cursor:pointer;padding:8px; }
        .wa-period-btn { background:var(--bg-input,#1a1f2e);border:1px solid var(--border-light,#1E293B);color:var(--text-secondary,#94A3B8);padding:6px 12px;border-radius:8px;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap; }
        .wa-period-btn.wa-period-active { background:var(--accent,#F97316);color:#fff;border-color:var(--accent,#F97316); }
        .wa-body { flex:1;overflow-y:auto;padding:16px;padding-bottom:calc(140px + env(safe-area-inset-bottom, 0px)); }
        .wa-card { background:var(--surface,#131929);border-radius:16px;padding:16px;border:1px solid var(--border-light,#1E293B);margin-bottom:12px; }
        .wa-card-title { font-family:'Exo 2',sans-serif;font-size:14px;font-weight:700;color:var(--text-secondary,#94A3B8);text-transform:uppercase;letter-spacing:0.5px;margin-bottom:12px; }
        .wa-big-num { font-family:'JetBrains Mono',monospace;font-size:36px;font-weight:800;color:var(--accent,#F97316);line-height:1; }
        .wa-big-label { font-size:13px;color:var(--text-muted,#64748B);margin-top:4px; }
        .wa-grid { display:grid;grid-template-columns:1fr 1fr;gap:12px; }
        .wa-metric { text-align:center;padding:12px;background:rgba(249,115,22,0.05);border-radius:12px;border:1px solid rgba(249,115,22,0.1); }
        .wa-metric-val { font-family:'JetBrains Mono',monospace;font-size:22px;font-weight:700;color:var(--text-primary,#F1F5F9); }
        .wa-metric-label { font-size:11px;color:var(--text-muted,#64748B);margin-top:2px; }
        .wa-bar-row { display:flex;align-items:center;gap:8px;margin-bottom:8px; }
        .wa-bar-label { font-size:12px;color:var(--text-secondary,#94A3B8);min-width:40px;text-align:right;font-family:'JetBrains Mono',monospace; }
        .wa-bar-track { flex:1;height:24px;background:rgba(255,255,255,0.05);border-radius:6px;overflow:hidden;position:relative; }
        .wa-bar-fill { height:100%;background:var(--accent,#F97316);border-radius:6px;transition:width 0.5s;min-width:2px; }
        .wa-bar-count { position:absolute;right:8px;top:50%;transform:translateY(-50%);font-family:'JetBrains Mono',monospace;font-size:11px;color:#fff;font-weight:600; }
        .wa-table { width:100%;border-collapse:collapse;font-size:13px; }
        .wa-table th { text-align:left;color:var(--text-muted,#64748B);font-weight:600;padding:8px 6px;border-bottom:1px solid var(--border-light,#1E293B);font-size:11px;text-transform:uppercase; }
        .wa-table td { padding:8px 6px;color:var(--text-primary,#F1F5F9);border-bottom:1px solid rgba(255,255,255,0.03); }
        .wa-table td:first-child { font-weight:600; }
        .wa-verdict { padding:16px;border-radius:14px;margin-top:8px; }
        .wa-verdict-good { background:rgba(34,197,94,0.1);border:1px solid rgba(34,197,94,0.3); }
        .wa-verdict-warn { background:rgba(249,115,22,0.1);border:1px solid rgba(249,115,22,0.3); }
        .wa-verdict-bad { background:rgba(239,68,68,0.1);border:1px solid rgba(239,68,68,0.3); }
        .wa-verdict-icon { font-size:28px;margin-bottom:8px; }
        .wa-verdict-text { font-size:15px;font-weight:700;color:var(--text-primary,#F1F5F9);margin-bottom:4px; }
        .wa-verdict-desc { font-size:13px;color:var(--text-secondary,#94A3B8);line-height:1.4; }
        .wa-tabs { display:flex;gap:6px;margin-bottom:16px;overflow-x:auto;padding-bottom:4px; }
        .wa-tab { padding:8px 14px;border-radius:10px;font-size:13px;font-weight:600;border:1px solid var(--border-light,#1E293B);background:transparent;color:var(--text-secondary,#94A3B8);cursor:pointer;white-space:nowrap; }
        .wa-tab.active { background:var(--accent,#F97316);color:#fff;border-color:var(--accent,#F97316); }
        .wa-analytics-btn { width:100%;padding:14px;border:2px dashed rgba(249,115,22,0.3);border-radius:16px;background:rgba(249,115,22,0.05);color:var(--accent,#F97316);font-size:15px;font-weight:700;cursor:pointer;font-family:'Exo 2',sans-serif; }

        /* ═══════════════════════════════════════════════════ */
        /* DIRECTOR DASHBOARD — WITCHER THEME                 */
        /* ═══════════════════════════════════════════════════ */
        #directorScreen {
            background: #0a0a0c; color: #d4c5a0;
            font-family: 'Crimson Pro', 'Palatino', 'Georgia', serif;
            position: relative; overflow: hidden;
        }
        #directorScreen * { box-sizing: border-box; }
        .w-noise {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 0; pointer-events: none;
            background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
        }
        .w-vignette {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 0; pointer-events: none;
            background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.6) 100%);
        }
        .w-content { position: relative; z-index: 1; }
        .w-header {
            background: linear-gradient(180deg, rgba(15,12,8,0.95) 0%, rgba(10,10,12,0.8) 100%);
            border-bottom: 1px solid rgba(200,168,78,0.2);
            padding: 16px 20px 12px; position: sticky; top: 0; z-index: 50;
            backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
        }
        .w-header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
        .w-header-left { display: flex; align-items: center; gap: 12px; }
        .w-medallion {
            width: 44px; height: 44px; border-radius: 50%;
            background: radial-gradient(circle at 35% 35%, #c8a84e, #6b5a2e);
            display: flex; align-items: center; justify-content: center; font-size: 20px;
            box-shadow: 0 0 20px rgba(200,168,78,0.3), inset 0 1px 2px rgba(255,255,255,0.2);
            border: 2px solid rgba(200,168,78,0.5); transition: box-shadow 0.5s ease;
        }
        .w-header-brand { font-size: 18px; font-weight: 700; color: #c8a84e; letter-spacing: 1px; }
        .w-header-sub { font-size: 11px; color: #5a5040; letter-spacing: 1px; }
        .w-header-right { text-align: right; }
        .w-header-time { font-size: 11px; color: #5a5040; }
        .w-live-dot { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; justify-content: flex-end; }
        .w-live-indicator {
            width: 6px; height: 6px; border-radius: 50%; background: #c8a84e;
            box-shadow: 0 0 8px #c8a84e; animation: w-pulse 2s ease-in-out infinite;
        }
        .w-live-text { font-size: 10px; color: #8a7d65; }
        .w-back-btn {
            background: none; border: 1px solid rgba(200,168,78,0.2); border-radius: 8px;
            color: #c8a84e; font-size: 12px; padding: 6px 12px; cursor: pointer;
            font-family: 'Crimson Pro', serif; font-weight: 600; transition: all 0.3s;
        }
        .w-back-btn:active { background: rgba(200,168,78,0.1); }
        .w-xp-bar { margin-bottom: 2px; }
        .w-xp-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
        .w-xp-label { font-size: 10px; color: #5a5040; letter-spacing: 1px; text-transform: uppercase; }
        .w-xp-value { font-size: 10px; color: #c8a84e; font-weight: 700; }
        .w-xp-track { height: 8px; background: rgba(200,168,78,0.1); border-radius: 4px; overflow: hidden; }
        .w-xp-fill {
            height: 100%; border-radius: 4px; transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
            background: linear-gradient(90deg, #8a6d2e, #c8a84e);
        }
        .w-xp-fill.full { background: linear-gradient(90deg, #c8a84e, #e8d88e, #c8a84e); box-shadow: 0 0 8px rgba(200,168,78,0.5); }
        .w-tabs {
            display: flex; gap: 2px; padding: 8px 20px 0; overflow-x: auto;
            border-bottom: 1px solid rgba(200,168,78,0.08); scrollbar-width: none;
            -webkit-overflow-scrolling: touch;
        }
        .w-tabs::-webkit-scrollbar { display: none; }
        .w-tab {
            padding: 10px 14px; border: none; cursor: pointer;
            background: transparent; color: #5a5040;
            font-size: 13px; font-weight: 600; font-family: 'Crimson Pro', serif;
            border-bottom: 2px solid transparent;
            display: flex; align-items: center; gap: 6px;
            transition: all 0.3s ease; white-space: nowrap; min-height: 44px;
        }
        .w-tab.active { background: rgba(200,168,78,0.08); color: #c8a84e; border-bottom-color: #c8a84e; }
        .w-tab:active { opacity: 0.7; }
        .w-body { padding: 16px 20px 100px; }
        .w-tab-content { display: none; opacity: 0; transition: opacity 0.4s ease; }
        .w-tab-content.active { display: block; opacity: 1; }
        .w-label { font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #8a7d65; margin-bottom: 4px; }
        .w-big-num { font-size: 28px; font-weight: 300; color: #c8a84e; letter-spacing: -1px; font-family: 'Crimson Pro', serif; }
        .w-big-num.green { color: #7da85a; }
        .w-sub { font-size: 11px; color: #5a5040; margin-top: 2px; }
        .w-card {
            background: linear-gradient(145deg, rgba(20,18,14,0.9), rgba(15,13,10,0.95));
            border-radius: 12px; border: 1px solid rgba(200,168,78,0.12);
            padding: 16px; position: relative; overflow: hidden; margin-bottom: 12px;
        }
        .w-card-gold {
            background: linear-gradient(145deg, rgba(200,168,78,0.08), rgba(200,168,78,0.02));
            border-radius: 12px; border: 1px solid rgba(200,168,78,0.25);
            padding: 16px; position: relative; margin-bottom: 12px;
        }
        .w-card-danger {
            background: linear-gradient(145deg, rgba(180,40,40,0.08), rgba(120,20,20,0.04));
            border-radius: 12px; border: 1px solid rgba(180,40,40,0.2);
            padding: 16px; margin-bottom: 10px;
        }
        .w-card-warn {
            background: linear-gradient(145deg, rgba(200,168,78,0.06), rgba(200,168,78,0.02));
            border-radius: 12px; border: 1px solid rgba(200,168,78,0.2);
            padding: 16px; margin-bottom: 10px;
        }
        .w-card-info {
            background: linear-gradient(145deg, rgba(106,159,216,0.06), rgba(106,159,216,0.02));
            border-radius: 12px; border: 1px solid rgba(106,159,216,0.15);
            padding: 16px; margin-bottom: 10px;
        }
        .w-kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
        .w-bar-track { height: 6px; background: rgba(200,168,78,0.1); border-radius: 3px; overflow: hidden; }
        .w-bar-fill {
            height: 100%; border-radius: 3px; transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
            background: linear-gradient(90deg, #5a4020, #8a6d2e);
        }
        .w-bar-fill.mid { background: linear-gradient(90deg, #8a6d2e, #c8a84e); }
        .w-bar-fill.full { background: linear-gradient(90deg, #c8a84e, #e8d88e, #c8a84e); box-shadow: 0 0 8px rgba(200,168,78,0.5); }
        .w-podium { display: flex; gap: 8px; justify-content: center; align-items: flex-end; margin-bottom: 16px; }
        .w-podium-slot {
            flex: 1; text-align: center; padding: 14px 8px;
            background: rgba(20,18,14,0.6); border-radius: 12px;
            border: 1px solid rgba(200,168,78,0.08);
        }
        .w-podium-slot.first {
            padding: 20px 10px;
            background: linear-gradient(145deg, rgba(200,168,78,0.1), rgba(200,168,78,0.03));
            border-color: rgba(200,168,78,0.25);
        }
        .w-podium-medal { font-size: 24px; margin-bottom: 6px; }
        .w-podium-slot.first .w-podium-medal { font-size: 32px; }
        .w-podium-name { font-size: 12px; font-weight: 700; color: #a0a0a0; }
        .w-podium-slot.first .w-podium-name { font-size: 14px; color: #c8a84e; }
        .w-podium-rank { font-size: 10px; color: #5a5040; margin: 2px 0 6px; }
        .w-podium-val { font-size: 16px; font-weight: 300; color: #c8a84e; }
        .w-podium-slot.first .w-podium-val { font-size: 20px; }
        .w-podium-sub { font-size: 10px; color: #5a5040; }
        .w-mgr-card {
            background: linear-gradient(145deg, rgba(20,18,14,0.9), rgba(15,13,10,0.95));
            border-radius: 12px; border: 1px solid rgba(200,168,78,0.12);
            padding: 14px 16px; margin-bottom: 10px;
        }
        .w-mgr-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
        .w-mgr-info { display: flex; gap: 10px; }
        .w-mgr-avatar {
            width: 40px; height: 40px; border-radius: 10px;
            background: linear-gradient(135deg, rgba(200,168,78,0.15), rgba(200,168,78,0.05));
            border: 1px solid rgba(200,168,78,0.15);
            display: flex; align-items: center; justify-content: center; font-size: 18px;
        }
        .w-mgr-name { font-size: 15px; font-weight: 700; color: #d4c5a0; }
        .w-mgr-meta { display: flex; gap: 8px; margin-top: 2px; }
        .w-mgr-rank { font-size: 10px; color: #c8a84e; font-weight: 600; }
        .w-mgr-pct {
            padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; align-self: flex-start;
        }
        .w-mgr-pct.high { background: rgba(125,168,90,0.15); color: #7da85a; border: 1px solid rgba(125,168,90,0.2); }
        .w-mgr-pct.mid { background: rgba(200,168,78,0.15); color: #c8a84e; border: 1px solid rgba(200,168,78,0.2); }
        .w-mgr-pct.low { background: rgba(168,90,90,0.15); color: #a85a5a; border: 1px solid rgba(168,90,90,0.2); }
        .w-mgr-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 10px; }
        .w-mgr-stat-label { font-size: 10px; color: #5a5040; }
        .w-mgr-stat-val { font-size: 16px; font-weight: 300; color: #c8a84e; }
        .w-mgr-stat-val.neutral { color: #d4c5a0; }
        .w-threat { display: flex; justify-content: space-between; align-items: flex-start; }
        .w-threat-left { display: flex; gap: 12px; }
        .w-threat-icon { font-size: 36px; }
        .w-threat-name { font-size: 16px; font-weight: 700; }
        .w-threat-name.high { color: #a85a5a; }
        .w-threat-name.medium { color: #c8a84e; }
        .w-threat-name.low { color: #6a9fd8; }
        .w-threat-detail { font-size: 12px; color: #8a7d65; margin-top: 2px; }
        .w-threat-value { font-size: 22px; font-weight: 300; margin-top: 6px; }
        .w-threat-badge {
            font-size: 9px; font-weight: 700; letter-spacing: 1px;
            padding: 3px 8px; border-radius: 4px; white-space: nowrap;
        }
        .w-threat-badge.high { background: rgba(168,90,90,0.12); color: #a85a5a; border: 1px solid rgba(168,90,90,0.2); }
        .w-threat-badge.medium { background: rgba(200,168,78,0.1); color: #c8a84e; border: 1px solid rgba(200,168,78,0.15); }
        .w-threat-badge.low { background: rgba(106,159,216,0.08); color: #6a9fd8; border: 1px solid rgba(106,159,216,0.15); }
        .w-territory-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
        .w-territory-name { font-size: 15px; font-weight: 700; color: #d4c5a0; }
        .w-territory-growth { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
        .w-territory-growth.up { background: rgba(125,168,90,0.12); color: #7da85a; }
        .w-territory-growth.flat { background: rgba(200,168,78,0.1); color: #c8a84e; }
        .w-territory-growth.down { background: rgba(168,90,90,0.1); color: #a85a5a; }
        .w-territory-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
        .w-territory-stat-label { font-size: 10px; color: #5a5040; }
        .w-territory-stat-val { font-size: 15px; font-weight: 300; color: #c8a84e; }
        .w-territory-stat-val.green { color: #7da85a; }
        .w-territory-stat-val.neutral { color: #d4c5a0; }
        .w-product-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(200,168,78,0.06); }
        .w-product-row:last-child { border-bottom: none; }
        .w-product-left { display: flex; gap: 8px; }
        .w-product-rank { font-size: 13px; font-weight: 800; width: 22px; color: #5a5040; }
        .w-product-rank.top { color: #c8a84e; }
        .w-product-name { font-size: 13px; font-weight: 600; color: #d4c5a0; }
        .w-product-sku { font-size: 11px; color: #5a5040; }
        .w-product-amt { font-size: 14px; font-weight: 600; color: #c8a84e; flex-shrink: 0; }
        .w-ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
        .w-ach { padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); }
        .w-ach.done { background: rgba(200,168,78,0.08); border-color: rgba(200,168,78,0.2); }
        .w-ach-inner { display: flex; align-items: center; gap: 8px; }
        .w-ach-icon { font-size: 20px; }
        .w-ach:not(.done) .w-ach-icon { filter: grayscale(1); }
        .w-ach-name { font-size: 12px; font-weight: 600; color: #5a5040; }
        .w-ach.done .w-ach-name { color: #c8a84e; }
        .w-ach-status { font-size: 10px; color: #7da85a; }
        .w-sleep-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(200,168,78,0.06); }
        .w-sleep-row:last-child { border-bottom: none; }
        .w-sleep-name { font-size: 13px; font-weight: 600; color: #d4c5a0; }
        .w-sleep-orders { font-size: 11px; color: #5a5040; }
        .w-sleep-days { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; align-self: center; }
        .w-sleep-days.warn { background: rgba(200,168,78,0.1); color: #c8a84e; border: 1px solid rgba(200,168,78,0.15); }
        .w-sleep-days.danger { background: rgba(168,90,90,0.12); color: #a85a5a; border: 1px solid rgba(168,90,90,0.2); }
        .w-quote { text-align: center; padding: 10px 0 16px; color: #5a5040; font-size: 13px; font-style: italic; }
        /* Период директора — выбор дат */
        .w-period-bar { display: flex; align-items: center; gap: 6px; margin: 8px 0 4px; padding: 0 4px; flex-wrap: wrap; }
        .w-period-chip { padding: 5px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid rgba(200,168,78,0.15); background: rgba(200,168,78,0.04); color: #8a7d65; transition: all 0.2s; white-space: nowrap; }
        .w-period-chip.active { background: rgba(200,168,78,0.15); border-color: rgba(200,168,78,0.4); color: #c8a84e; }
        .w-period-chip:active { transform: scale(0.96); }
        .w-period-dates { display: flex; align-items: center; gap: 6px; }
        .w-period-dates input[type="date"] { background: rgba(200,168,78,0.06); border: 1px solid rgba(200,168,78,0.2); border-radius: 8px; padding: 4px 8px; color: #c8a84e; font-size: 12px; font-family: 'JetBrains Mono', monospace; color-scheme: dark; }
        .w-period-dates input[type="date"]:focus { outline: none; border-color: rgba(200,168,78,0.5); }
        .w-period-hint { font-size: 11px; color: #5a5040; text-align: center; margin-bottom: 4px; }
        /* Drill-down overlay */
        .w-drill { position: fixed; inset: 0; z-index: 9999; background: #0a0a0c; overflow-y: auto; -webkit-overflow-scrolling: touch; display: none; }
        .w-drill.open { display: block; }
        .w-drill-hdr { position: sticky; top: 0; z-index: 10; background: linear-gradient(180deg, #0a0a0c 60%, transparent); padding: 16px; display: flex; align-items: center; gap: 12px; }
        .w-drill-back { background: rgba(200,168,78,0.1); border: 1px solid rgba(200,168,78,0.3); color: #c8a84e; padding: 6px 14px; border-radius: 8px; font-size: 14px; cursor: pointer; }
        .w-drill-title { font-size: 18px; font-weight: 700; color: #d4c5a0; font-family: 'Crimson Pro', serif; }
        .w-drill-body { padding: 0 16px 32px; }
        .w-drill-section { margin-bottom: 16px; }
        .w-drill-section-title { font-size: 12px; font-weight: 700; color: #5a5040; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
        .w-rw-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 8px 0; }
        .w-rw-bar .retail { background: #7da85a; }
        .w-rw-bar .wholesale { background: #c8a84e; }
        .w-rw-legend { display: flex; gap: 16px; font-size: 12px; }
        .w-rw-legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
        .w-rw-legend .ret::before { background: #7da85a; }
        .w-rw-legend .whl::before { background: #c8a84e; }
        .w-debt-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(200,168,78,0.06); }
        .w-debt-name { font-size: 13px; color: #d4c5a0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .w-debt-amount { font-size: 14px; font-weight: 700; color: #a85a5a; font-family: 'JetBrains Mono', monospace; }
        .w-debt-tag { font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-left: 8px; }
        .w-debt-tag.ret { background: rgba(125,168,90,0.15); color: #7da85a; }
        .w-debt-tag.whl { background: rgba(200,168,78,0.1); color: #c8a84e; }
        .w-prod-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(200,168,78,0.06); }
        .w-prod-rank { font-size: 11px; color: #5a5040; width: 22px; text-align: center; }
        .w-prod-info { flex: 1; min-width: 0; }
        .w-prod-name { font-size: 12px; color: #d4c5a0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .w-prod-sku { font-size: 10px; color: #5a5040; }
        .w-prod-amt { font-size: 13px; font-weight: 700; color: #c8a84e; white-space: nowrap; }
        /* Планы директора */
        .wp-period { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px; }
        .wp-period-btn { background: rgba(200,168,78,0.08); border: 1px solid rgba(200,168,78,0.2); color: #c8a84e; padding: 6px 14px; border-radius: 8px; font-size: 14px; cursor: pointer; }
        .wp-period-label { font-size: 16px; font-weight: 700; color: #d4c5a0; min-width: 120px; text-align: center; }
        .wp-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid rgba(200,168,78,0.06); }
        .wp-row:last-child { border-bottom: none; }
        .wp-name { flex: 1; font-size: 13px; font-weight: 600; color: #d4c5a0; }
        .wp-current { font-size: 11px; color: #5a5040; margin-top: 2px; }
        .wp-input { width: 130px; background: rgba(200,168,78,0.06); border: 1px solid rgba(200,168,78,0.25); border-radius: 8px; padding: 8px 10px; color: #c8a84e; font-size: 14px; font-family: 'JetBrains Mono', monospace; text-align: right; }
        .wp-input:focus { outline: none; border-color: rgba(200,168,78,0.6); background: rgba(200,168,78,0.1); }
        .wp-save-btn { width: 100%; padding: 14px; border-radius: 12px; background: linear-gradient(135deg, #c8a84e, #a07830); color: #1a1000; font-weight: 700; font-size: 15px; border: none; cursor: pointer; margin-top: 16px; }
        .wp-save-btn:disabled { opacity: 0.5; cursor: not-allowed; }
        .wp-badge { font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-left: 6px; }
        .wp-badge.changed { background: rgba(200,168,78,0.2); color: #c8a84e; }
        .director-btn {
            display: none; width: 100%; padding: 14px 20px; border-radius: 12px;
            background: linear-gradient(135deg, rgba(200,168,78,0.12), rgba(200,168,78,0.04));
            border: 1px solid rgba(200,168,78,0.25);
            color: #c8a84e; font-size: 15px; font-weight: 700;
            font-family: 'Crimson Pro', 'Palatino', serif;
            cursor: pointer; text-align: center; transition: all 0.3s;
        }
        .director-btn:active { transform: scale(0.98); background: rgba(200,168,78,0.2); }
        @keyframes w-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

        /* ═══════════════════════════════════════ */
        /* AI Dashboard — 5 экранов               */
        /* ═══════════════════════════════════════ */
        @keyframes ai-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
        @keyframes ai-pulseGlow { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
        @keyframes ai-slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

        .ai-btn {
            display: none; width: 100%; padding: 14px 20px; border-radius: 12px;
            background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(99,102,241,0.08));
            border: 1px solid rgba(139,92,246,0.3);
            color: var(--purple); font-size: 15px; font-weight: 700;
            font-family: 'Exo 2', sans-serif;
            cursor: pointer; text-align: center; transition: all 0.3s;
        }
        .ai-btn:active { transform: scale(0.98); background: rgba(139,92,246,0.2); }

        /* AI screen layout */
        #aiScreen .ai-header {
            padding: 16px 20px 14px;
            background: rgba(17,24,39,0.92);
            backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            border-bottom: 1px solid var(--border-light);
            position: sticky; top: 0; z-index: 50;
        }
        #aiScreen .ai-header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
        #aiScreen .ai-header-logo { font-size: 22px; font-weight: 900; color: var(--accent); letter-spacing: -0.5px; }
        #aiScreen .ai-header-back { background: var(--bg-card); border: 1px solid var(--border-light); backdrop-filter: blur(12px); width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--text-secondary); cursor: pointer; }
        #aiScreen .ai-header-bottom { display: flex; justify-content: space-between; align-items: flex-end; }
        #aiScreen .ai-header-sub { font-size: 14px; color: var(--text-secondary); }
        #aiScreen .ai-header-title { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; margin-top: 2px; font-family: 'Exo 2', sans-serif; }
        #aiScreen .ai-status { display: flex; align-items: center; gap: 6px; }
        #aiScreen .ai-status-dot { width: 6px; height: 6px; background: var(--success); border-radius: 3px; animation: ai-pulseGlow 2s ease-in-out infinite; }
        #aiScreen .ai-status-text { font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

        #aiScreen .ai-body { flex: 1; overflow-y: auto; padding: 16px 16px calc(140px + env(safe-area-inset-bottom, 0px)); }
        #aiScreen .ai-sub-screen { display: none; flex-direction: column; gap: 12px; }
        #aiScreen .ai-sub-screen.active { display: flex; }

        /* AI bottom nav */
        #aiScreen .ai-nav {
            position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
            width: 100%; max-width: 430px;
            padding: 0 0 env(safe-area-inset-bottom, 0px);
            background: rgba(17,24,39,0.95);
            backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            border-top: 1px solid var(--border-light);
            display: flex; z-index: 50;
        }
        #aiScreen .ai-nav-btn {
            flex: 1; background: none; border: none; padding: 10px 0 8px;
            display: flex; flex-direction: column; align-items: center; gap: 3px;
            min-height: 56px; justify-content: center;
            color: var(--text-muted); transition: color 0.2s; cursor: pointer;
            font-family: 'Exo 2', sans-serif;
        }
        #aiScreen .ai-nav-btn.active { color: var(--accent); filter: drop-shadow(0 0 6px rgba(249,115,22,0.4)); }
        #aiScreen .ai-nav-btn svg { width: 22px; height: 22px; }
        #aiScreen .ai-nav-btn span { font-size: 10px; font-weight: 600; }

        /* AI card components */
        .ai-c { background: var(--bg-card); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--border-light); border-radius: 14px; padding: 14px 16px; position: relative; overflow: hidden; animation: ai-slideUp 0.3s ease both; }
        .ai-c-shimmer { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.03) 50%, transparent 70%); background-size: 200% 100%; animation: ai-shimmer 4s ease-in-out infinite; pointer-events: none; }
        .ai-cc { border: 1px solid rgba(139,92,246,0.25); border-radius: 16px; padding: 14px 16px; background: linear-gradient(135deg, rgba(99,102,241,0.12) 0%, rgba(139,92,246,0.08) 100%); animation: ai-slideUp 0.3s ease both; position: relative; overflow: hidden; }
        .ai-cc.good { border-color: rgba(52,211,153,0.3); background: linear-gradient(135deg, rgba(52,211,153,0.1) 0%, rgba(16,185,129,0.05) 100%); }
        .ai-cc.warn { border-color: rgba(251,191,36,0.3); background: linear-gradient(135deg, rgba(251,191,36,0.1) 0%, rgba(245,158,11,0.05) 100%); }
        .ai-cc.bad { border-color: rgba(248,113,113,0.3); background: linear-gradient(135deg, rgba(248,113,113,0.1) 0%, rgba(239,68,68,0.05) 100%); }

        .ai-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
        .ai-hd-icon { font-size: 14px; }
        .ai-hd-label { font-size: 11px; font-weight: 700; color: var(--purple); text-transform: uppercase; letter-spacing: 0.5px; }
        .ai-hd-live { margin-left: auto; font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(139,92,246,0.15); color: var(--purple); letter-spacing: 1px; animation: ai-pulseGlow 2s ease-in-out infinite; }

        .ai-rw { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
        .ai-rw:last-child { margin-bottom: 0; }
        .ai-rw-icon { font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; margin-top: 1px; }
        .ai-rw-text { font-size: 13px; color: var(--text-primary); line-height: 1.5; }

        .ai-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.5px; display: inline-block; }
        .ai-mono { font-family: 'JetBrains Mono', monospace; font-weight: 900; line-height: 1; }
        .ai-sec-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
        .ai-sec-icon { font-size: 16px; }

        .ai-progress { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
        .ai-progress-fill { height: 100%; border-radius: 3px; transition: width 0.8s cubic-bezier(0.16,1,0.3,1); }
        .ai-progress-fill.accent { background: linear-gradient(90deg, #EA580C, #F97316, #FB923C); box-shadow: 0 0 8px rgba(249,115,22,0.3); }
        .ai-progress-fill.success { background: linear-gradient(90deg, #059669, #34D399, #6EE7B7); box-shadow: 0 0 8px rgba(52,211,153,0.3); }
        .ai-progress-fill.danger { background: linear-gradient(90deg, #DC2626, #F87171); box-shadow: 0 0 8px rgba(248,113,113,0.3); }
        .ai-progress-fill.blue { background: linear-gradient(90deg, #2563EB, #60A5FA); box-shadow: 0 0 8px rgba(96,165,250,0.3); }
        .ai-progress-fill.purple { background: linear-gradient(90deg, #7C3AED, #A78BFA); box-shadow: 0 0 8px rgba(167,139,250,0.3); }
        .ai-progress-fill.warning { background: linear-gradient(90deg, #D97706, #fbbf24); box-shadow: 0 0 8px rgba(251,191,36,0.3); }

        /* Calls screen */
        .ai-call-card { position: relative; z-index: 1; }
        .ai-call-top { display: flex; justify-content: space-between; margin-bottom: 8px; }
        .ai-call-left { display: flex; gap: 10px; }
        .ai-call-avatar { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; letter-spacing: -0.5px; flex-shrink: 0; }
        .ai-call-avatar.too { background: linear-gradient(135deg, rgba(96,165,250,0.2), rgba(96,165,250,0.08)); border: 1px solid rgba(96,165,250,0.25); color: var(--blue); }
        .ai-call-avatar.ip { background: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(249,115,22,0.08)); border: 1px solid rgba(249,115,22,0.25); color: var(--accent); }
        .ai-call-name { font-size: 15px; font-weight: 700; }
        .ai-call-tags { display: flex; gap: 4px; margin-top: 3px; flex-wrap: wrap; }
        .ai-call-meta { font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; margin-top: 2px; }
        .ai-call-reason { padding: 8px 12px; border-radius: 10px; margin-bottom: 10px; font-size: 12px; font-weight: 600; line-height: 1.5; }
        .ai-call-bottom { display: flex; justify-content: space-between; align-items: center; }
        .ai-call-metrics { display: flex; gap: 14px; }
        .ai-call-metric-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
        .ai-call-metric-value { font-size: 14px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
        .ai-btn-call { padding: 10px 18px; border-radius: 12px; border: none; background: linear-gradient(135deg, #F97316, #EA580C); color: white; font-weight: 700; font-size: 13px; font-family: 'Exo 2', sans-serif; box-shadow: 0 4px 15px rgba(249,115,22,0.3); display: flex; align-items: center; gap: 6px; cursor: pointer; }
        .ai-call-hint { padding: 8px 12px; border-radius: 10px; font-size: 12px; font-weight: 600; line-height: 1.5; background: rgba(139,92,246,0.08); border-left: 3px solid var(--purple); color: var(--purple); margin-bottom: 6px; z-index: 1; position: relative; }
        .ai-call-hint.ai-loading { background: rgba(255,255,255,0.03); border-left-color: var(--text-muted); color: var(--text-muted); }
        .ai-call-action-text { padding: 6px 12px; border-radius: 8px; font-size: 11px; line-height: 1.5; background: rgba(52,211,153,0.06); border-left: 3px solid var(--success); color: var(--success); z-index: 1; position: relative; margin-bottom: 8px; }

        /* Client search */
        .ai-search-wrap { padding: 0 0 12px; }
        .ai-search-input { width: 100%; padding: 12px 16px 12px 40px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 12px; color: var(--text-primary); font-size: 15px; font-family: 'Inter', sans-serif; outline: none; box-sizing: border-box; }
        .ai-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(249,115,22,0.15); }
        .ai-search-input::placeholder { color: var(--text-muted); }
        .ai-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
        .ai-search-result-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; border-radius: 12px; transition: background 0.15s; }
        .ai-search-result-item:active { background: rgba(249,115,22,0.08); }
        .ai-search-result-avatar { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0; background: linear-gradient(135deg, rgba(96,165,250,0.2), rgba(96,165,250,0.08)); border: 1px solid rgba(96,165,250,0.25); color: var(--blue); }
        .ai-search-result-info { flex: 1; min-width: 0; }
        .ai-search-result-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ai-search-result-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
        .ai-search-result-debt { font-size: 12px; font-weight: 700; color: var(--danger); font-family: 'JetBrains Mono', monospace; flex-shrink: 0; }
        .ai-client-back { display: flex; align-items: center; gap: 6px; padding: 8px 0; margin-bottom: 4px; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; }

        /* Client screen */
        .ai-client-header { text-align: center; padding: 20px 16px; }
        .ai-client-avatar { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; background: linear-gradient(135deg, rgba(96,165,250,0.2), rgba(96,165,250,0.08)); border: 1px solid rgba(96,165,250,0.25); color: var(--blue); }
        .ai-client-name-big { font-size: 18px; font-weight: 800; }
        .ai-client-sub { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
        .ai-client-contact { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
        .ai-client-badges { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
        .ai-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
        .ai-stat-card { text-align: center; padding: 14px 12px; }
        .ai-stat-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
        .ai-stat-icon { font-size: 18px; }
        .ai-stat-value { font-size: 20px; }
        .ai-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; font-weight: 600; }
        .ai-top-item { margin-bottom: 10px; }
        .ai-top-item:last-child { margin-bottom: 0; }
        .ai-top-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
        .ai-top-item-left { display: flex; align-items: baseline; gap: 8px; }
        .ai-top-item-sku { font-size: 13px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
        .ai-top-item-name { font-size: 11px; color: var(--text-muted); }
        .ai-top-item-right { display: flex; align-items: baseline; gap: 6px; }
        .ai-top-item-qty { font-size: 10px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
        .ai-top-item-pct { font-size: 12px; font-weight: 900; font-family: 'JetBrains Mono', monospace; }

        /* Cart screen */
        .ai-cart-sku { font-size: 14px; font-weight: 700; color: var(--accent); font-family: 'JetBrains Mono', monospace; }
        .ai-cart-name { font-size: 13px; color: var(--text-primary); margin-top: 2px; }
        .ai-cart-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
        .ai-rec-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
        .ai-rec-left { display: flex; align-items: center; gap: 10px; }
        .ai-rec-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-glow); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
        .ai-rec-reason { font-size: 12px; color: var(--text-secondary); padding: 6px 10px; border-radius: 8px; background: rgba(139,92,246,0.06); border-left: 2px solid var(--purple); margin-bottom: 12px; line-height: 1.5; }
        .ai-rec-bottom { display: flex; justify-content: space-between; align-items: center; }
        .ai-rec-meta { font-size: 12px; color: var(--text-muted); }
        .ai-btn-add { padding: 8px 18px; border-radius: 10px; border: 1px solid rgba(249,115,22,0.4); background: var(--accent-glow); color: var(--accent); font-weight: 700; font-size: 12px; font-family: 'Exo 2', sans-serif; cursor: pointer; }
        .ai-upsell-total { text-align: center; position: relative; padding: 20px 16px; }
        .ai-upsell-glow { position: absolute; bottom: -20px; right: -20px; width: 140px; height: 140px; background: radial-gradient(circle, var(--accent-glow), transparent 70%); pointer-events: none; }

        /* Action Sheet */
        .ai-action-sheet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 1100; opacity: 0; visibility: hidden; pointer-events: none; transition: all 0.25s ease; }
        .ai-action-sheet-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
        .ai-action-sheet { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%); width: 100%; max-width: 430px; background: var(--bg-secondary, #1a1f2e); border-radius: 20px 20px 0 0; padding: 16px 20px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 1101; transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); }
        .ai-action-sheet-overlay.show .ai-action-sheet { transform: translateX(-50%) translateY(0); }
        .ai-action-sheet-handle { width: 40px; height: 4px; background: var(--border-light); border-radius: 2px; margin: 0 auto 16px; }
        .ai-action-sheet-title { font-size: 16px; font-weight: 700; text-align: center; margin-bottom: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ai-action-sheet-btn { width: 100%; padding: 16px; margin-bottom: 8px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 14px; color: var(--text-primary); font-size: 15px; font-weight: 600; font-family: 'Inter', sans-serif; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: all 0.15s; }
        .ai-action-sheet-btn:active { transform: scale(0.98); background: rgba(249,115,22,0.08); }
        .ai-action-sheet-btn.call { border-color: rgba(249,115,22,0.3); }
        .ai-action-sheet-btn.call .ai-as-icon { background: rgba(249,115,22,0.15); color: var(--accent); }
        .ai-action-sheet-btn.detail .ai-as-icon { background: rgba(96,165,250,0.15); color: var(--blue); }
        .ai-as-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
        .ai-action-sheet-cancel { width: 100%; padding: 14px; margin-top: 4px; background: none; border: none; color: var(--text-muted); font-size: 14px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; }

        /* NBA Draft */
        .ai-draft-actions { display: flex; gap: 6px; margin-top: 10px; z-index: 1; position: relative; }
        .ai-draft-btn { flex: 1; padding: 8px 4px; border-radius: 10px; border: 1px solid var(--border-light); background: var(--bg-card); color: var(--text-secondary); font-size: 11px; font-weight: 600; font-family: 'Inter', sans-serif; cursor: pointer; transition: all 0.2s; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
        .ai-draft-btn:active { transform: scale(0.95); }
        .ai-draft-btn.called { border-color: rgba(52,211,153,0.3); color: var(--success); }
        .ai-draft-btn.not-reached { border-color: rgba(251,191,36,0.3); color: var(--warning); }
        .ai-draft-btn.skipped { border-color: rgba(255,255,255,0.1); color: var(--text-muted); }
        .ai-draft-btn-icon { font-size: 16px; }
        .ai-call-card.draft-done { opacity: 0.5; }
        .ai-call-card.draft-done .ai-draft-actions { display: none; }
        .ai-draft-status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 8px; font-size: 11px; font-weight: 700; margin-top: 8px; z-index: 1; position: relative; }
        .ai-draft-status-badge.called { background: rgba(52,211,153,0.1); color: var(--success); }
        .ai-draft-status-badge.not_reached { background: rgba(251,191,36,0.1); color: var(--warning); }
        .ai-draft-status-badge.skipped { background: rgba(255,255,255,0.05); color: var(--text-muted); }
        .ai-draft-comment-text { font-size: 11px; color: var(--text-muted); font-style: italic; margin-top: 4px; z-index: 1; position: relative; }
        .ai-draft-progress { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(139,92,246,0.06); border: 1px solid rgba(139,92,246,0.15); border-radius: 12px; margin-bottom: 8px; }
        .ai-draft-progress-text { font-size: 12px; color: var(--purple); font-weight: 600; white-space: nowrap; }
        .ai-draft-progress-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
        .ai-draft-progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, #7C3AED, #A78BFA); transition: width 0.4s ease; }
        .ai-draft-comment-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 1200; opacity: 0; visibility: hidden; pointer-events: none; display: flex; align-items: flex-end; justify-content: center; transition: all 0.25s; }
        .ai-draft-comment-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
        .ai-draft-comment-sheet { width: 100%; max-width: 430px; background: var(--bg-secondary, #1a1f2e); border-radius: 20px 20px 0 0; padding: 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform 0.3s ease; }
        .ai-draft-comment-overlay.show .ai-draft-comment-sheet { transform: translateY(0); }
        .ai-draft-comment-input { width: 100%; padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 12px; color: var(--text-primary); font-size: 14px; font-family: 'Inter', sans-serif; outline: none; box-sizing: border-box; resize: none; min-height: 60px; }
        .ai-draft-comment-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(249,115,22,0.15); }

        /* AI Insight section */
        .ai-insight-section { border: 1px solid rgba(139,92,246,0.25); border-radius: 16px; padding: 16px; background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(139,92,246,0.04) 100%); animation: ai-slideUp 0.3s ease both; }
        .ai-insight-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
        .ai-insight-title { font-size: 13px; font-weight: 700; color: var(--purple); text-transform: uppercase; letter-spacing: 0.5px; }
        .ai-insight-badge { font-size: 9px; padding: 2px 7px; border-radius: 6px; background: rgba(139,92,246,0.15); color: var(--purple); font-weight: 700; }
        .ai-insight-item { margin-bottom: 10px; }
        .ai-insight-item:last-child { margin-bottom: 0; }
        .ai-insight-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
        .ai-insight-text { font-size: 13px; color: var(--text-primary); line-height: 1.6; padding: 8px 12px; border-radius: 10px; }
        .ai-insight-text.risk { background: rgba(248,113,113,0.06); border-left: 3px solid var(--danger); }
        .ai-insight-text.action { background: rgba(52,211,153,0.06); border-left: 3px solid var(--success); }
        .ai-insight-text.prediction { background: rgba(96,165,250,0.06); border-left: 3px solid var(--blue); }
        .ai-insight-text.upsell { background: rgba(249,115,22,0.06); border-left: 3px solid var(--accent); }
        .ai-insight-loading { text-align: center; padding: 20px; color: var(--text-muted); font-size: 13px; }

        /* Alerts screen */
        .ai-alert-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
        .ai-alert-badge { padding: 4px 12px; border-radius: 20px; background: rgba(248,113,113,0.15); color: var(--danger); font-size: 13px; font-weight: 700; }
        .ai-alert-content { display: flex; gap: 12px; z-index: 1; position: relative; }
        .ai-alert-icon-box { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
        .ai-alert-text { flex: 1; }
        .ai-alert-title-row { display: flex; justify-content: space-between; align-items: flex-start; }
        .ai-alert-title { font-size: 14px; font-weight: 700; }
        .ai-alert-time { font-size: 10px; color: var(--text-muted); flex-shrink: 0; }
        .ai-alert-desc { margin: 4px 0 10px; font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
        .ai-btn-alert { padding: 6px 14px; border-radius: 8px; font-size: 11px; font-weight: 700; font-family: 'Exo 2', sans-serif; cursor: pointer; border-width: 1px; border-style: solid; }

        /* Director AI screen */
        .ai-dir-greeting { text-align: center; padding: 4px 0; }
        .ai-dir-greeting-name { font-size: 12px; color: var(--text-secondary); }
        .ai-dir-greeting-title { font-size: 22px; font-weight: 900; color: var(--accent); letter-spacing: -0.5px; margin-top: 2px; }
        .ai-kpi-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
        .ai-kpi-card { text-align: center; padding: 12px 8px; }
        .ai-kpi-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
        .ai-kpi-value { font-size: 18px; margin: 4px 0; }
        .ai-mgr-card { display: flex; align-items: center; gap: 14px; }
        .ai-mgr-ring { flex-shrink: 0; }
        .ai-mgr-info { flex: 1; min-width: 0; }
        .ai-mgr-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
        .ai-mgr-name { font-size: 15px; font-weight: 700; }
        .ai-mgr-streak { font-size: 12px; }
        .ai-mgr-today { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
        .ai-anomaly-card { border-left: 3px solid var(--warning); background: linear-gradient(135deg, rgba(251,191,36,0.08) 0%, var(--bg-card) 40%); }
        .ai-anomaly-item { padding: 8px 12px; border-radius: 8px; margin-bottom: 6px; font-size: 12px; line-height: 1.5; font-weight: 500; }
        .ai-anomaly-item:last-child { margin-bottom: 0; }

        /* Warehouse Keeper */
        .warehouse-btn { display: none; width: 100%; padding: 14px 20px; border-radius: 12px; background: linear-gradient(135deg, rgba(34,197,94,0.12), rgba(34,197,94,0.04)); border: 1px solid rgba(34,197,94,0.25); color: #22C55E; font-size: 15px; font-weight: 700; font-family: 'Exo 2', sans-serif; cursor: pointer; text-align: center; transition: all 0.3s; }
        .warehouse-btn:active { transform: scale(0.98); background: rgba(34,197,94,0.2); }
        .workpace-btn { width: 100%; padding: 13px 20px; border-radius: 12px; background: linear-gradient(135deg, rgba(14,165,233,0.1), rgba(14,165,233,0.04)); border: 1px solid rgba(14,165,233,0.3); color: #38BDF8; font-size: 14px; font-weight: 700; font-family: 'Exo 2', sans-serif; cursor: pointer; text-align: center; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
        .workpace-btn:active { transform: scale(0.98); background: rgba(14,165,233,0.18); }
        .wh-stock-card { background: var(--surface); border-radius: 16px; padding: 14px 16px; border: 1px solid var(--border-light); display: flex; align-items: center; gap: 12px; }
        .wh-stock-card:active { transform: scale(0.98); }
        .wh-stock-sku { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--accent); font-weight: 700; }
        .wh-stock-name { font-size: 13px; color: var(--text-primary); margin-top: 2px; line-height: 1.4; }
        .wh-stock-qty { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 700; text-align: right; }
        .wh-stock-label { font-size: 10px; color: var(--text-muted); text-align: right; }
        .wh-stock-reserved { font-size: 11px; color: var(--warning); margin-top: 2px; }
        .wh-warehouse-name { font-size: 12px; color: var(--text-muted); padding: 0 4px; margin-bottom: 8px; }

        /* Warehouse Keeper Cabinet */
        .wk-cabinet { padding: 0 0 80px; min-height: 100vh; display: flex; flex-direction: column; }
        .wk-header-compact { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px; border-bottom: 1px solid var(--border-light); }
        .wk-avatar-sm { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, #F97316, #FB923C); display: flex; align-items: center; justify-content: center; font-size: 20px; }
        .wk-header-info { flex: 1; min-width: 0; }
        .wk-header-info .wk-name { font-size: 16px; font-weight: 700; font-family: 'Exo 2', sans-serif; color: var(--text-primary); }
        .wk-header-info .wk-warehouse { font-size: 12px; color: var(--accent); margin-top: 2px; }
        .wk-level-badge { background: rgba(249,115,22,0.12); border: 1px solid rgba(249,115,22,0.3); border-radius: 10px; padding: 6px 12px; text-align: center; }
        .wk-level-label { font-size: 11px; color: #F97316; font-weight: 700; }
        .wk-level-num { font-size: 18px; font-weight: 900; color: #F97316; font-family: 'JetBrains Mono', monospace; }
        .wk-xp-bar { display: flex; align-items: center; gap: 8px; padding: 8px 16px; }
        .wk-xp-label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
        .wk-xp-track { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
        .wk-xp-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, #F97316, #FB923C); transition: width 0.6s ease; }
        .wk-xp-text { font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-weight: 600; }
        .wk-cards { display: flex; flex-direction: column; gap: 12px; padding: 0 16px; flex: 1; }
        .wk-hero-btn { width: 100%; padding: 20px; border-radius: 20px; border: none; cursor: pointer; background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%); color: #fff; position: relative; overflow: hidden; box-shadow: 0 8px 32px rgba(34,197,94,0.3), inset 0 1px 0 rgba(255,255,255,0.15); -webkit-tap-highlight-color: transparent; font-family: 'Exo 2', sans-serif; }
        .wk-hero-btn:active { transform: scale(0.97); }
        .wk-hero-content { position: relative; z-index: 1; }
        .wk-hero-title { font-size: 22px; font-weight: 900; letter-spacing: 0.5px; }
        .wk-hero-subtitle { font-size: 13px; opacity: 0.9; margin-top: 4px; font-weight: 600; }
        .wk-hero-pulse { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 120px; height: 120px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.2); animation: wkPulse 2s ease-in-out infinite; }
        @keyframes wkPulse { 0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 0.3; transform: translate(-50%, -50%) scale(1.6); } }
        .wk-stats-row { display: flex; gap: 8px; }
        .wk-stat-card { flex: 1; border-radius: 14px; padding: 12px 10px; text-align: center; border: 1px solid; }
        .wk-stat-icon { font-size: 18px; margin-bottom: 2px; }
        .wk-stat-value { font-size: 20px; font-weight: 900; font-family: 'JetBrains Mono', monospace; }
        .wk-stat-label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
        .wk-section-title { font-size: 14px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
        .wk-achievements-row { display: flex; gap: 8px; }
        .wk-achievement { flex: 1; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; padding: 12px 8px; text-align: center; }
        .wk-ach-icon { font-size: 24px; margin-bottom: 4px; }
        .wk-ach-name { font-size: 11px; font-weight: 700; color: var(--text-primary); }
        .wk-ach-desc { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
        .wk-card { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 16px; border: 1px solid var(--border-light); cursor: pointer; transition: all 0.2s; -webkit-tap-highlight-color: transparent; }
        .wk-card:active { transform: scale(0.97); }
        .wk-card-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .wk-card-icon svg { width: 26px; height: 26px; stroke-width: 2; }
        .wk-card-text { flex: 1; min-width: 0; }
        .wk-card-title { font-size: 16px; font-weight: 700; color: var(--text-primary); font-family: 'Exo 2', sans-serif; }
        .wk-card-desc { font-size: 12px; color: var(--text-muted); margin-top: 3px; line-height: 1.4; }
        .wk-card-arrow { color: var(--text-muted); flex-shrink: 0; }
        .wk-card.receiving { background: linear-gradient(135deg, rgba(249,115,22,0.08), rgba(249,115,22,0.02)); }
        .wk-card.receiving .wk-card-icon { background: rgba(249,115,22,0.15); color: #F97316; }
        .wk-card.receiving .wk-card-title { color: #F97316; }
        .wk-logout { padding: 16px; text-align: center; }

        /* Fulfillment Overlay (Выдача товара) */
        .ful-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--bg-primary); z-index: 1000; display: none; overflow: hidden; overscroll-behavior: none; }
        .ful-overlay.show { display: flex; flex-direction: column; }
        .ful-header { display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: var(--bg-card); border-bottom: 1px solid var(--border-light); flex-shrink: 0; }
        .ful-back { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-primary); padding: 10px 14px; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
        .ful-title { font-size: 17px; font-weight: 700; font-family: 'Exo 2', sans-serif; color: var(--text-primary); flex: 1; }
        .ful-body { flex: 1; overflow-y: auto; padding: 12px 16px calc(140px + env(safe-area-inset-bottom, 0px)); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

        .ful-order-card { background: var(--surface); border-radius: 16px; padding: 16px; border: 1px solid var(--border-light); margin-bottom: 10px; cursor: pointer; transition: transform 0.15s; }
        .ful-order-card:active { transform: scale(0.97); }
        .ful-order-num { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; color: var(--accent); }
        .ful-order-date { font-size: 11px; color: var(--text-muted); margin-left: 8px; }
        .ful-order-customer { font-size: 14px; color: var(--text-primary); margin-top: 6px; font-weight: 600; }
        .ful-order-manager { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
        .ful-order-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-light); }
        .ful-order-amount { font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 700; color: var(--text-primary); }
        .ful-order-items-count { font-size: 12px; color: var(--text-muted); background: rgba(255,255,255,0.06); padding: 4px 10px; border-radius: 8px; }

        .ful-progress { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--bg-card); border-bottom: 1px solid var(--border-light); flex-shrink: 0; }
        .ful-progress-text { font-size: 13px; color: var(--text-secondary); font-weight: 600; }
        .ful-progress-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
        .ful-progress-fill { height: 100%; background: #22C55E; border-radius: 3px; transition: width 0.4s ease; }
        .ful-progress-count { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #22C55E; font-weight: 700; }

        .ful-item { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface); border-radius: 12px; border: 1px solid var(--border-light); margin-bottom: 8px; transition: all 0.3s; }
        .ful-item.picked { background: rgba(34,197,94,0.06); border-color: rgba(34,197,94,0.3); }
        .ful-item-check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; color: transparent; transition: all 0.3s; }
        .ful-item.picked .ful-item-check { background: #22C55E; border-color: #22C55E; color: #fff; }
        .ful-item-info { flex: 1; min-width: 0; }
        .ful-item-sku { font-family: 'JetBrains Mono', monospace; font-size: 15px; color: var(--accent); font-weight: 800; letter-spacing: 0.3px; display: flex; align-items: center; gap: 6px; }
        .ful-item-sku .ful-scan-hint { font-size: 16px; opacity: 0.7; }
        .ful-item:not(.picked) { cursor: pointer; }
        .ful-item:not(.picked):active { transform: scale(0.98); background: rgba(249,115,22,0.06); border-color: rgba(249,115,22,0.25); }
        .ful-item-name { font-size: 14px; color: var(--text-primary); margin-top: 4px; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
        .ful-item-qty { font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 800; color: var(--text-muted); text-align: right; flex-shrink: 0; }
        .ful-item.picked .ful-item-qty { color: #22C55E; }

        .ful-scan-bar { position: fixed; bottom: 0; left: 0; right: 0; padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--bg-card); border-top: 1px solid var(--border-light); display: flex; gap: 6px; z-index: 1010; }
        .ful-scan-bar input { flex: 1; min-width: 0; padding: 12px 10px; border-radius: 10px; border: 1px solid var(--border-light); background: var(--surface); color: var(--text-primary); font-size: 14px; font-family: 'JetBrains Mono', monospace; }
        .ful-scan-bar button { padding: 14px 12px; border-radius: 12px; border: none; font-weight: 700; font-size: 13px; cursor: pointer; flex-shrink: 0; white-space: nowrap; }
        .ful-scan-btn { background: linear-gradient(135deg, #22C55E, #16A34A); color: #fff; min-width: 56px; min-height: 48px; font-size: 15px; }
        .ful-manual-btn { background: var(--surface); border: 1px solid var(--border-light) !important; color: var(--text-primary); }

        .ful-complete-bar { position: fixed; bottom: 0; left: 0; right: 0; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); background: var(--bg-card); border-top: 1px solid var(--border-light); z-index: 1010; }
        .ful-complete-btn { width: 100%; padding: 16px; border-radius: 14px; border: none; background: linear-gradient(135deg, #22C55E, #16A34A); color: #fff; font-size: 16px; font-weight: 700; font-family: 'Exo 2', sans-serif; cursor: pointer; transition: transform 0.15s; }
        .ful-complete-btn:active { transform: scale(0.97); }
        .ful-complete-btn:disabled { opacity: 0.5; }

        .ful-mgr-group { margin-bottom: 12px; }
        .ful-mgr-group.collapsed .ful-mgr-orders { display: none; }
        .ful-mgr-group.collapsed .ful-mgr-arrow { transform: rotate(0deg); }
        .ful-mgr-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: rgba(249,115,22,0.06); border: 1px solid rgba(249,115,22,0.15); border-radius: 14px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
        .ful-mgr-group:not(.collapsed) .ful-mgr-header { border-radius: 14px 14px 0 0; }
        .ful-mgr-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, #F97316, #FB923C); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: #fff; }
        .ful-mgr-info { flex: 1; }
        .ful-mgr-name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
        .ful-mgr-count { font-size: 12px; color: var(--text-muted); }
        .ful-mgr-badge { background: #F97316; color: #fff; border-radius: 20px; padding: 4px 12px; font-size: 13px; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
        .ful-mgr-arrow { font-size: 18px; color: var(--text-muted); transition: transform 0.2s; transform: rotate(90deg); }
        .ful-mgr-orders .ful-order-card { border-radius: 0; border-top: none; margin-bottom: 0; }
        .ful-mgr-orders .ful-order-card:last-child { border-radius: 0 0 14px 14px; }

        .ful-pick-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); z-index: 1200; display: none; align-items: center; justify-content: center; padding: 24px; }
        .ful-pick-modal.show { display: flex; }
        .ful-pick-sheet { background: var(--bg-card); border-radius: 24px; padding: 32px 24px; text-align: center; max-width: 340px; width: 100%; border: 1px solid rgba(255,255,255,0.08); animation: fulPopIn 0.3s ease; }
        @keyframes fulPopIn { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
        .ful-pick-sku { font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 700; color: var(--accent); }
        .ful-pick-name { font-size: 14px; color: var(--text-secondary); margin-top: 6px; line-height: 1.4; }
        .ful-pick-qty { font-size: 52px; font-weight: 900; color: #22C55E; margin: 20px 0 4px; font-family: 'Exo 2', sans-serif; text-shadow: 0 0 40px rgba(34,197,94,0.3); }
        .ful-pick-label { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
        .ful-pick-ok { width: 100%; padding: 16px; border-radius: 14px; border: none; background: linear-gradient(135deg, #22C55E, #16A34A); color: #fff; font-size: 17px; font-weight: 800; cursor: pointer; font-family: 'Exo 2', sans-serif; box-shadow: 0 4px 20px rgba(34,197,94,0.4); }

        .ful-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
        .ful-empty-icon { font-size: 48px; margin-bottom: 12px; }
        .ful-empty-text { font-size: 14px; line-height: 1.5; }
        .wk-logout-btn { background: none; border: 1px solid var(--border-light); color: var(--text-muted); padding: 12px 24px; min-height: 48px; border-radius: 10px; font-size: 14px; cursor: pointer; transition: all 0.2s; -webkit-tap-highlight-color: transparent; }
        .wk-logout-btn:active { background: rgba(239,68,68,0.1); color: var(--danger); border-color: var(--danger); }

        /* ═══ Loader Cabinet (Кабинет грузчика МФТ) — Babushka Warm Theme ═══ */
        .ldr-cabinet { padding: 0 0 80px; min-height: 100vh; display: flex; flex-direction: column; background: #F5F0EB; font-family: 'Nunito', sans-serif; color: #212121; }
        .ldr-header { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px; padding-top: max(16px, env(safe-area-inset-top)); background: #2E7D32; color: #fff; }
        .ldr-avatar { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; }
        .ldr-header-info { flex: 1; }
        .ldr-name { font-size: 18px; font-weight: 800; color: #fff; font-family: 'Nunito', sans-serif; }
        .ldr-warehouse { font-size: 13px; color: rgba(255,255,255,0.85); margin-top: 2px; }
        .ldr-greeting { padding: 20px 16px 4px; }
        .ldr-greeting-text { font-size: 22px; font-weight: 800; color: #212121; font-family: 'Nunito', sans-serif; }
        .ldr-greeting-sub { font-size: 15px; color: #616161; margin-top: 4px; }
        .ldr-hint { margin: 12px 16px; padding: 14px 16px; background: #fff; border-radius: 14px; border-left: 5px solid #FFA726; box-shadow: 0 1px 4px rgba(0,0,0,0.06); display: flex; align-items: center; gap: 10px; }
        .ldr-hint-icon { font-size: 24px; flex-shrink: 0; }
        .ldr-hint-text { font-size: 15px; color: #616161; line-height: 1.4; font-weight: 600; }
        .ldr-cards { padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
        .ldr-hero-btn { width: 100%; padding: 24px 20px; border-radius: 20px; border: none; cursor: pointer; color: #fff; position: relative; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.15); -webkit-tap-highlight-color: transparent; font-family: 'Nunito', sans-serif; text-align: left; min-height: 100px; }
        .ldr-hero-btn:active { transform: scale(0.97); }
        .ldr-hero-btn.incoming { background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%); }
        .ldr-hero-btn.shipping { background: linear-gradient(135deg, #E65100 0%, #BF360C 100%); }
        .ldr-hero-icon { font-size: 36px; margin-bottom: 8px; }
        .ldr-hero-title { font-size: 22px; font-weight: 900; letter-spacing: 0.3px; }
        .ldr-hero-subtitle { font-size: 15px; opacity: 0.9; margin-top: 4px; font-weight: 600; }
        .ldr-hero-badge { position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,0.25); color: #fff; font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 800; padding: 4px 14px; border-radius: 10px; }
        .ldr-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
        .ldr-stat-card { background: #fff; border-radius: 16px; padding: 16px 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); text-align: center; }
        .ldr-stat-icon { font-size: 22px; margin-bottom: 6px; }
        .ldr-stat-value { font-family: 'JetBrains Mono', monospace; font-size: 24px; font-weight: 800; }
        .ldr-stat-label { font-size: 12px; color: #616161; margin-top: 2px; font-weight: 700; }
        .ldr-logout { padding: 16px; text-align: center; }
        .ldr-logout .wk-logout-btn { color: #9E9E9E; border-color: #E0E0E0; }
        .ldr-logout .wk-logout-btn:active { background: rgba(198,40,40,0.1); color: #C62828; border-color: #C62828; }
        #loaderScreen .bottom-nav { background: #fff; border-top: 1px solid #E0E0E0; }
        #loaderScreen .bottom-nav .nav-item { color: #9E9E9E; }
        #loaderScreen .bottom-nav .nav-item.active { color: #2E7D32; }

        /* Loader Pin Auth — Babushka Warm */
        .ldr-auth-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, #E8F5E9 0%, #F5F0EB 50%, #FFF8E1 100%); z-index: 1100; display: none; flex-direction: column; align-items: center; justify-content: center; font-family: 'Nunito', sans-serif; }
        .ldr-auth-overlay.show { display: flex; }
        .ldr-auth-welcome { font-size: 48px; margin-bottom: 8px; }
        .ldr-auth-logo { font-family: 'Nunito', sans-serif; font-size: 26px; font-weight: 800; color: #2E7D32; margin-bottom: 4px; }
        .ldr-auth-subtitle { font-size: 16px; color: #616161; margin-bottom: 36px; font-weight: 600; }
        .ldr-pin-dots { display: flex; gap: 18px; margin-bottom: 32px; }
        .ldr-pin-dot { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid #BDBDBD; background: transparent; transition: all 0.2s; }
        .ldr-pin-dot.filled { background: #2E7D32; border-color: #2E7D32; box-shadow: 0 0 12px rgba(46,125,50,0.3); }
        .ldr-pin-dot.error { border-color: #C62828; background: #C62828; animation: pinShake 0.4s; }
        @keyframes pinShake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-8px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }
        .ldr-numpad { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; justify-content: center; }
        .ldr-numpad-btn { width: 76px; height: 76px; border-radius: 50%; border: 2px solid #E0E0E0; background: #fff; color: #212121; font-size: 28px; font-weight: 700; font-family: 'JetBrains Mono', monospace; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; -webkit-tap-highlight-color: transparent; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
        .ldr-numpad-btn:active { background: #2E7D32; color: #fff; border-color: #2E7D32; transform: scale(0.9); }
        .ldr-numpad-btn.empty { visibility: hidden; }
        .ldr-numpad-btn.del { font-size: 20px; border: none; background: none; color: #9E9E9E; box-shadow: none; }
        .ldr-auth-error { color: #C62828; font-size: 15px; margin-top: 16px; min-height: 20px; font-weight: 700; }
        .ldr-auth-back { background: none; border: none; color: #616161; font-size: 15px; margin-top: 24px; cursor: pointer; padding: 14px 24px; min-height: 48px; font-weight: 600; -webkit-tap-highlight-color: transparent; }
        /* Loading animation after pin */
        .ldr-loading{display:none;position:absolute;top:0;left:0;right:0;bottom:0;background:linear-gradient(180deg,#E8F5E9 0%,#F5F0EB 50%,#FFF8E1 100%);flex-direction:column;align-items:center;justify-content:center;z-index:10}
        .ldr-loading.show{display:flex}
        .ldr-loading-box{font-size:72px;animation:ldrBounce 1.2s ease-in-out infinite}
        @keyframes ldrBounce{0%,100%{transform:translateY(0) rotate(0deg)}25%{transform:translateY(-20px) rotate(-5deg)}50%{transform:translateY(0) rotate(0deg)}75%{transform:translateY(-10px) rotate(5deg)}}
        .ldr-loading-text{font-family:'Nunito',sans-serif;font-size:22px;font-weight:800;color:#2E7D32;margin-top:16px}
        .ldr-loading-dots-row{display:flex;gap:8px;margin-top:16px}
        .ldr-ldot{width:12px;height:12px;border-radius:50%;background:#2E7D32;animation:ldrDotPulse 1.4s ease-in-out infinite}
        .ldr-ldot:nth-child(2){animation-delay:0.2s}
        .ldr-ldot:nth-child(3){animation-delay:0.4s}
        @keyframes ldrDotPulse{0%,80%,100%{opacity:.3;transform:scale(.7)}40%{opacity:1;transform:scale(1)}}

        /* Loader Incoming List Overlay — Babushka Warm */
        .ldr-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #F5F0EB; z-index: 1050; display: none; overflow: hidden; flex-direction: column; font-family: 'Nunito', sans-serif; color: #212121; overscroll-behavior: contain; }
        .ldr-overlay.show { display: flex; }
        .ldr-ol-header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); background: #2E7D32; flex-shrink: 0; min-height: 56px; }
        .ldr-ol-back { background: none; border: none; font-size: 28px; cursor: pointer; color: #fff; padding: 6px 10px; min-width: 48px; min-height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; }
        .ldr-ol-back:active { background: rgba(255,255,255,0.2); }
        .ldr-ol-title { font-size: 18px; font-weight: 800; font-family: 'Nunito', sans-serif; color: #fff; flex: 1; }
        .ldr-ol-body { flex: 1; overflow-y: auto; padding: 12px 16px calc(140px + env(safe-area-inset-bottom, 0px)); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
        .ldr-doc-card { background: #fff; border-radius: 16px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 10px; cursor: pointer; transition: transform 0.15s; border-left: 5px solid #1976D2; }
        .ldr-doc-card.shipping-doc { border-left-color: #E65100; }
        .ldr-doc-card:active { transform: scale(0.97); }
        .ldr-doc-num { font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 700; color: #E65100; }
        .ldr-doc-date { font-size: 13px; color: #9E9E9E; margin-left: 8px; }
        .ldr-doc-supplier { font-size: 16px; color: #212121; margin-top: 6px; font-weight: 700; }
        .ldr-doc-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid #E0E0E0; }
        .ldr-doc-amount { font-family: 'JetBrains Mono', monospace; font-size: 17px; font-weight: 700; color: #212121; }
        .ldr-doc-count { font-size: 13px; color: #616161; background: #F5F5F5; padding: 4px 12px; border-radius: 8px; font-weight: 600; }
        /* Manager group header */
        .ldr-mgr-group{margin-bottom:16px}
        .ldr-mgr-header{display:flex;align-items:center;gap:10px;padding:12px 16px;border-radius:14px;margin-bottom:8px;position:sticky;top:0;z-index:5}
        .ldr-mgr-avatar{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:800;color:#fff;flex-shrink:0;font-family:'JetBrains Mono',monospace}
        .ldr-mgr-info{flex:1;min-width:0}
        .ldr-mgr-name{font-size:18px;font-weight:800;line-height:1.2}
        .ldr-mgr-badge{font-size:13px;font-weight:700;opacity:.8}
        .ldr-doc-manager{display:none} /* hide per-card manager when grouped */

        /* Loader Incoming Detail — Babushka Warm */
        .ldr-detail-info { background: #fff; border-radius: 16px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 16px; }
        .ldr-detail-num { font-family: 'JetBrains Mono', monospace; font-size: 20px; font-weight: 800; color: #E65100; }
        .ldr-detail-supplier { font-size: 16px; color: #212121; font-weight: 700; margin-top: 4px; }
        .ldr-detail-date { font-size: 13px; color: #9E9E9E; margin-top: 2px; }
        .ldr-item-card { background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 8px; border-left: 5px solid #E0E0E0; }
        .ldr-item-sku { font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 700; color: #E65100; }
        .ldr-item-name { font-size: 15px; color: #212121; margin-top: 4px; line-height: 1.3; font-weight: 600; }
        .ldr-item-qty { display: flex; gap: 16px; margin-top: 8px; font-size: 14px; }
        .ldr-item-qty span { display: flex; align-items: center; gap: 4px; }
        .ldr-item-expected { color: #616161; }
        .ldr-item-perbox { color: #9E9E9E; }

        .ldr-empty { text-align: center; padding: 60px 20px; color: #9E9E9E; }
        .ldr-empty-icon { font-size: 48px; margin-bottom: 12px; }
        .ldr-empty-text { font-size: 16px; line-height: 1.5; font-weight: 600; }
        .ldr-loading { text-align: center; padding: 40px; color: #616161; font-size: 16px; font-weight: 600; }

        /* Loader Scan Progress — Babushka Warm */
        .ldr-progress-bar { position: sticky; top: 0; z-index: 10; background: #fff; padding: 12px 16px; border-bottom: 1px solid #E0E0E0; }
        .ldr-progress-track { height: 10px; background: #EEE; border-radius: 5px; overflow: hidden; }
        .ldr-progress-fill { height: 100%; background: linear-gradient(90deg, #66BB6A, #2E7D32); border-radius: 5px; transition: width 0.4s ease; }
        .ldr-progress-text { display: flex; justify-content: space-between; margin-top: 6px; font-size: 14px; font-weight: 700; }
        .ldr-progress-left { color: #616161; }
        .ldr-progress-right { font-family: 'JetBrains Mono', monospace; color: #2E7D32; }

        /* Loader Scan Button — Babushka Warm */
        .ldr-scan-fab { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); width: 76px; height: 76px; border-radius: 50%; background: #2E7D32; border: 3px solid rgba(255,255,255,0.3); color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 1060; box-shadow: 0 4px 16px rgba(46,125,50,0.4); -webkit-tap-highlight-color: transparent; }
        .ldr-scan-fab:active { transform: translateX(-50%) scale(0.9); }

        /* Loader Item Scan Status — Babushka Warm */
        .ldr-item-card.scanned { background: #F1F8E9; border-left-color: #2E7D32; }
        .ldr-item-card.scanned .ldr-item-sku { color: #2E7D32; }
        .ldr-item-status { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; font-weight: 700; }
        .ldr-item-status.done { color: #2E7D32; }
        .ldr-item-status.pending { color: #9E9E9E; }
        .ldr-item-boxes { font-family: 'JetBrains Mono', monospace; }

        /* Loader Last Scan Toast — Babushka Warm */
        .ldr-last-scan { position: fixed; bottom: calc(110px + env(safe-area-inset-bottom, 0px)); left: 16px; right: 16px; background: #fff; border: 2px solid #2E7D32; border-radius: 16px; padding: 14px 16px; z-index: 1150; display: none; box-shadow: 0 4px 16px rgba(0,0,0,0.25); animation: ldrScanIn 0.3s ease; }
        .ldr-last-scan.show { display: block; }
        @keyframes ldrScanIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
        .ldr-last-scan-sku { font-family: 'JetBrains Mono', monospace; font-size: 17px; font-weight: 700; color: #2E7D32; }
        .ldr-last-scan-name { font-size: 15px; color: #212121; margin-top: 2px; font-weight: 600; }
        .ldr-last-scan-count { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: #616161; margin-top: 4px; }

        /* Loader Create Order Button — Babushka Warm */
        .ldr-create-order { padding: 16px; position: sticky; bottom: 0; background: #F5F0EB; border-top: 1px solid #E0E0E0; }
        .ldr-create-order-btn { width: 100%; padding: 18px; border-radius: 16px; border: none; font-size: 18px; font-weight: 800; font-family: 'Nunito', sans-serif; cursor: pointer; -webkit-tap-highlight-color: transparent; }
        .ldr-create-order-btn.ready { background: #2E7D32; color: #fff; box-shadow: 0 4px 16px rgba(46,125,50,0.3); }
        .ldr-create-order-btn.ready:active { transform: scale(0.97); }
        .ldr-create-order-btn.disabled { background: #fff; color: #9E9E9E; border: 2px solid #E0E0E0; pointer-events: none; }

        /* Loader filter tabs */
        .ldr-filter-tabs { display: flex; gap: 6px; padding: 8px 0 12px; overflow-x: auto; }
        .ldr-filter-tab { padding: 10px 16px; min-height: 44px; border-radius: 20px; border: 1px solid var(--border-light); background: var(--surface); color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; display: flex; align-items: center; box-sizing: border-box; }
        .ldr-filter-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

        /* Loader manager tabs (shipping) */
        .ldr-mgr-tabs { display: flex; gap: 8px; padding: 10px 16px; overflow-x: auto; background: #fff; border-bottom: 1px solid #E0E0E0; flex-shrink: 0; -webkit-overflow-scrolling: touch; }
        .ldr-mgr-tabs:empty { display: none; }
        .ldr-mgr-tab { padding: 10px 18px; min-height: 48px; min-width: 48px; border-radius: 24px; border: 2px solid #E0E0E0; background: #fff; color: #424242; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; display: flex; align-items: center; gap: 6px; box-sizing: border-box; transition: all .15s; flex-shrink: 0; }
        .ldr-mgr-tab:active { transform: scale(0.96); }
        .ldr-mgr-tab.active { border-color: var(--accent); background: var(--accent); color: #fff; }
        .ldr-mgr-tab .mgr-tab-count { background: rgba(0,0,0,0.1); padding: 2px 8px; border-radius: 12px; font-size: 12px; }
        .ldr-mgr-tab.active .mgr-tab-count { background: rgba(255,255,255,0.25); }

        /* ═══ LD — Babushka Light Theme ═══ */
        .ld-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#F5F0EB;z-index:1050;display:none;flex-direction:column;overflow:hidden;color:#212121;font-size:18px;overscroll-behavior:contain}
        .ld-overlay.show{display:flex}

        .ld-hdr{display:flex;align-items:center;gap:10px;padding:10px 14px;padding-top:max(10px,env(safe-area-inset-top));background:#2E7D32;flex-shrink:0;min-height:56px}
        .ld-hdr-back{background:none;border:none;color:#fff;font-size:28px;padding:6px 10px;min-width:48px;min-height:48px;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:12px}
        .ld-hdr-back:active{background:rgba(255,255,255,0.2)}
        .ld-hdr-info{flex:1}
        .ld-hdr-title{font-size:18px;font-weight:800;color:#fff}
        .ld-hdr-sub{font-size:13px;color:rgba(255,255,255,0.8);margin-top:1px}

        .ld-prog{padding:14px 16px;background:#fff;border-bottom:1px solid #E0E0E0;flex-shrink:0}
        .ld-prog-top{display:flex;align-items:center;gap:14px;margin-bottom:10px}
        .ld-prog-emoji{font-size:40px;line-height:1}
        .ld-prog-text{flex:1}
        .ld-prog-main{font-size:20px;font-weight:800;color:#212121}
        .ld-prog-sub{font-size:15px;color:#616161;margin-top:2px}
        .ld-prog-bar-wrap{height:14px;background:#EEE;border-radius:7px;overflow:hidden}
        .ld-prog-bar-fill{height:100%;border-radius:7px;background:linear-gradient(90deg,#66BB6A,#2E7D32);transition:width .5s ease}

        .ld-scan-result{margin:10px 14px;padding:14px;background:#fff;border-radius:16px;box-shadow:0 2px 12px rgba(0,0,0,0.12);display:none;border-left:6px solid #2E7D32;overflow-y:auto;max-height:calc(100vh - 340px);position:relative}
        .ld-scan-result.over-camera{position:fixed;bottom:80px;left:10px;right:10px;z-index:1200;margin:0;max-height:60vh;box-shadow:0 8px 32px rgba(0,0,0,0.5)}
        .ld-scan-result.show{display:block;animation:ld-slideIn .3s ease}
        .ld-scan-result.is-error{border-left-color:#C62828;background:#FFEBEE}
        @keyframes ld-slideIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
        @keyframes ld-slideIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
        .ld-sr-sku{font-family:'JetBrains Mono',monospace;font-size:20px;font-weight:700;color:#E65100;line-height:1.1;text-align:center}
        .ld-sr-name{font-size:16px;color:#212121;margin:4px 0 8px;line-height:1.3;font-weight:600;text-align:center}
        .ld-sr-already{padding:10px 14px;border-radius:10px;font-size:15px;font-weight:700;margin-bottom:10px;display:none;text-align:center}
        .ld-sr-already.show{display:block}
        .ld-sr-already.was-ok{background:#C8E6C9;color:#2E7D32}
        .ld-sr-already.was-part{background:#FFE0B2;color:#E65100}
        .ld-sr-question{text-align:center;padding:16px 0;margin-bottom:12px}
        .ld-sr-q-text{font-size:22px;font-weight:700;color:#424242}
        .ld-sr-q-num{font-family:'JetBrains Mono',monospace;font-size:72px;font-weight:900;color:#E65100;line-height:1.1;margin:4px 0;text-shadow:0 2px 8px rgba(230,81,0,0.15)}
        .ld-sr-q-detail{font-size:16px;color:#757575;margin-top:6px;font-weight:600}
        .ld-sr-actions{display:flex;flex-direction:column;gap:10px}
        .ld-sr-qty{display:none;flex-direction:column;gap:12px}
        .ld-sr-qty.show{display:flex}

        .ld-btn-ok{width:100%;height:68px;border:none;border-radius:16px;background:#2E7D32;color:#fff;font-weight:900;font-size:24px;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:10px;transition:all .1s;position:relative;overflow:hidden;box-shadow:0 4px 20px rgba(46,125,50,0.35)}
        .ld-btn-ok:active{transform:scale(0.96);filter:brightness(0.9)}
        .ld-btn-ok::after{content:'';position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,0.15),transparent);animation:ld-sweep 4s infinite}
        @keyframes ld-sweep{0%{left:-100%}100%{left:100%}}
        .ld-btn-none{width:100%;height:52px;border:2px solid #C62828;border-radius:14px;background:#FFEBEE;color:#C62828;font-weight:800;font-size:17px;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:all .1s}
        .ld-btn-none:active{background:#FFCDD2;transform:scale(0.96)}

        .ld-qty-title{font-size:18px;font-weight:800;color:#212121}
        .ld-qty-sub{font-size:15px;color:#616161;margin-top:4px}
        .ld-qty-sub b{color:#E65100;font-family:'JetBrains Mono',monospace}
        .ld-qty-row{display:flex;align-items:center;gap:12px;margin-top:12px}
        .ld-qty-btn{width:72px;height:72px;border:2px solid #E0E0E0;background:#fff;color:#212121;font-size:32px;font-family:'JetBrains Mono',monospace;border-radius:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-weight:700}
        .ld-qty-btn:active{background:#E65100;color:#fff;border-color:#E65100}
        .ld-qty-mid{flex:1;text-align:center}
        .ld-qty-val{font-family:'JetBrains Mono',monospace;font-size:52px;font-weight:700;line-height:1;color:#212121}
        .ld-qty-hint{font-size:14px;color:#616161;margin-top:4px;font-weight:600}
        .ld-qty-done{width:100%;height:60px;border:none;border-radius:14px;background:#E65100;color:#fff;font-weight:800;font-size:17px;cursor:pointer;transition:all .1s;margin-top:12px}
        .ld-qty-done:active{transform:scale(0.98)}

        .ld-list-header{padding:8px 16px 4px;display:flex;justify-content:space-between;align-items:center;flex-shrink:0}
        .ld-list-title{font-size:15px;font-weight:700;color:#616161}
        .ld-list-filters{display:flex;gap:6px}
        .ld-fbtn{padding:10px 14px;min-height:44px;border:2px solid #E0E0E0;background:#fff;color:#616161;font-size:14px;font-weight:700;border-radius:10px;cursor:pointer;display:flex;align-items:center;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
        .ld-fbtn.on{background:#E8F5E9;color:#2E7D32;border-color:#2E7D32}

        .ld-items{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:6px 14px calc(180px + env(safe-area-inset-bottom, 0px));overscroll-behavior:contain}
        .ld-it{padding:14px;background:#fff;border-radius:14px;margin-bottom:6px;box-shadow:0 1px 4px rgba(0,0,0,0.06);border-left:5px solid #E0E0E0;transition:all .2s}
        .ld-it.done{border-left-color:#2E7D32;background:#F1F8E9}
        .ld-it.partial{border-left-color:#E65100}
        .ld-it.missing{border-left-color:#C62828}
        .ld-it.pending{}
        .ld-it.flash-hl{animation:ld-hl .8s ease}
        @keyframes ld-hl{0%{background:#E8F5E9}100%{background:#fff}}
        .ld-it-top{display:flex;justify-content:space-between;align-items:center;gap:8px}
        .ld-it-sku{font-family:'JetBrains Mono',monospace;font-size:16px;font-weight:700;color:#E65100}
        .ld-it-st{font-size:13px;font-weight:800;padding:3px 10px;border-radius:6px}
        .ld-it-st.s-pend{background:#F5F5F5;color:#9E9E9E}
        .ld-it-st.s-done{background:#E8F5E9;color:#2E7D32}
        .ld-it-st.s-part{background:#FFF3E0;color:#E65100}
        .ld-it-st.s-miss{background:#FFEBEE;color:#C62828}
        .ld-it-name{font-size:15px;color:#212121;margin:3px 0 6px;line-height:1.3;font-weight:600}
        .ld-it-bot{display:flex;justify-content:space-between;align-items:center}
        .ld-it-exp{font-size:14px;color:#616161}
        .ld-it-recv{font-family:'JetBrains Mono',monospace;font-size:18px;font-weight:700}
        .ld-it-recv.r0{color:#9E9E9E}.ld-it-recv.rp{color:#E65100}.ld-it-recv.rf{color:#2E7D32}.ld-it-recv.ro{color:#C62828}
        .ld-it-reset{position:absolute;top:6px;right:6px;width:44px;height:44px;border-radius:50%;border:2px solid #E0E0E0;background:#fff;color:#9E9E9E;font-size:18px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:2;-webkit-tap-highlight-color:transparent;transition:all .15s}
        .ld-it-reset:active{background:#FFEBEE;border-color:#C62828;color:#C62828;transform:scale(1.15)}
        .ld-it{position:relative}
        .ld-it-bar{height:5px;background:#EEE;border-radius:3px;margin-top:8px;overflow:hidden}
        .ld-it-bar-f{height:100%;border-radius:3px;transition:width .3s}
        .ld-items-empty{text-align:center;padding:40px 20px;color:#9E9E9E;font-size:17px}
        .ld-items-empty-ico{font-size:36px;margin-bottom:8px;opacity:.5}

        .ld-scan-dock{position:fixed;bottom:0;left:0;right:0;z-index:1055;pointer-events:none}
        .ld-scan-dock-inner{max-width:430px;margin:0 auto;padding:8px 14px;background:linear-gradient(transparent,#F5F0EB 30%);display:flex;flex-wrap:wrap;gap:8px;pointer-events:auto}
        .ld-scan-btn{height:56px;border:none;background:#2E7D32;color:#fff;font-weight:900;font-size:17px;border-radius:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 4px 16px rgba(46,125,50,0.3);transition:all .12s;position:relative;overflow:hidden}
        .ld-scan-btn:active{transform:scale(0.97);filter:brightness(0.9)}
        .ld-scan-btn svg{width:26px;height:26px;flex-shrink:0}
        .ld-scan-btn::after{content:'';position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,0.12),transparent);animation:ld-sweep 4s infinite}
        .ld-finish-btn{height:56px;min-height:56px;padding:0 20px;border:2px solid #E0E0E0;background:#fff;color:#616161;font-weight:800;font-size:17px;border-radius:14px;cursor:pointer;white-space:nowrap;transition:all .12s;width:100%}
        .ld-finish-btn:active{transform:scale(0.97)}
        .ld-finish-btn.ready{border-color:#2E7D32;color:#2E7D32;background:#E8F5E9}

        .ld-recon{position:fixed;top:0;left:0;right:0;bottom:0;background:#F5F0EB;z-index:1400;display:none;flex-direction:column;overflow:hidden;color:#212121;overscroll-behavior:contain}
        .ld-recon.show{display:flex}
        .ld-recon-body{flex:1;overflow-y:auto;padding:12px 14px calc(140px + env(safe-area-inset-bottom, 0px));overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
        .ld-recon-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px}
        .ld-rc-stat{padding:14px 8px;background:#fff;border-radius:14px;text-align:center;box-shadow:0 1px 4px rgba(0,0,0,0.06)}
        .ld-rc-stat-val{font-family:'JetBrains Mono',monospace;font-size:28px;font-weight:700}
        .ld-rc-stat-label{font-size:13px;color:#616161;margin-top:2px;font-weight:700}
        .ld-rc-group{margin-bottom:12px}
        .ld-rc-group-title{font-size:14px;font-weight:800;color:#616161;padding:8px 0;display:flex;align-items:center;gap:8px}
        .ld-rc-group-cnt{font-family:'JetBrains Mono',monospace;font-size:12px;font-weight:700;background:#EEE;padding:2px 8px;border-radius:5px}
        .ld-rc-row{display:flex;align-items:center;padding:12px;background:#fff;border-radius:12px;margin-bottom:5px;box-shadow:0 1px 4px rgba(0,0,0,0.06);gap:8px}
        .ld-rc-sku{font-family:'JetBrains Mono',monospace;font-size:14px;font-weight:700;color:#E65100;min-width:85px;flex-shrink:0}
        .ld-rc-mid{flex:1;min-width:0}
        .ld-rc-name{font-size:12px;color:#9E9E9E;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
        .ld-rc-nums{font-size:14px;font-weight:700;margin-top:1px}
        .ld-rc-diff{font-family:'JetBrains Mono',monospace;font-size:14px;font-weight:700;min-width:36px;text-align:center;padding:4px 8px;border-radius:6px;flex-shrink:0}
        .ld-rc-diff.ok{background:#E8F5E9;color:#2E7D32}
        .ld-rc-diff.under{background:#FFEBEE;color:#C62828}
        .ld-rc-diff.over{background:#FFF3E0;color:#E65100}
        .ld-recon-bottom{position:fixed;bottom:0;left:0;right:0;padding:12px 14px;padding-bottom:max(14px,env(safe-area-inset-bottom));background:linear-gradient(transparent,#F5F0EB 20%);display:flex;gap:10px;z-index:1401}
        .ld-rc-btn{flex:1;height:56px;border:none;border-radius:14px;font-weight:800;font-size:16px;cursor:pointer;transition:all .12s}
        .ld-rc-btn:active{transform:scale(0.98)}
        .ld-rc-btn.back{background:#fff;color:#616161;border:2px solid #E0E0E0}
        .ld-rc-btn.go{background:#2E7D32;color:#fff;box-shadow:0 4px 12px rgba(46,125,50,0.3)}

        .ld-flash{position:fixed;top:0;left:0;right:0;bottom:0;pointer-events:none;z-index:9999;opacity:0;transition:opacity .15s}
        .ld-flash.g{background:rgba(46,125,50,0.15);opacity:1}
        .ld-flash.r{background:rgba(198,40,40,0.15);opacity:1}
        .ld-confetti{position:fixed;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:9998}
        .ld-cf-p{position:absolute;top:-20px;animation:ld-cff 3s ease-in forwards}
        @keyframes ld-cff{0%{transform:translateY(0) rotate(0);opacity:1}100%{transform:translateY(100vh) rotate(720deg);opacity:0}}
        .ld-done{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:#fff;border:3px solid #2E7D32;border-radius:24px;padding:36px 28px;text-align:center;z-index:9997;display:none;min-width:280px;box-shadow:0 8px 40px rgba(0,0,0,0.15)}
        .ld-done.show{display:block;animation:ld-dpop .4s cubic-bezier(.34,1.56,.64,1)}
        @keyframes ld-dpop{from{transform:translate(-50%,-50%) scale(.5);opacity:0}to{transform:translate(-50%,-50%) scale(1);opacity:1}}

        /* Акт расхождений */
        .ld-disc{position:fixed;inset:0;z-index:9998;background:#F5F5F5;overflow-y:auto;display:none;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
        .ld-disc.show{display:block}
        .ld-disc-inner{max-width:480px;margin:0 auto;padding:20px 16px 100px}
        .ld-disc-hdr{background:#fff;border:2px solid #C62828;border-radius:16px;padding:20px;text-align:center;margin-bottom:16px}
        .ld-disc-hdr h2{font-size:22px;font-weight:900;color:#C62828;margin:0 0 4px}
        .ld-disc-hdr p{font-size:15px;color:#616161;margin:4px 0 0}
        .ld-disc-row{background:#fff;border-radius:12px;padding:14px 16px;margin-bottom:10px;border-left:5px solid #E0E0E0;position:relative}
        .ld-disc-row.short{border-left-color:#C62828}
        .ld-disc-row.over{border-left-color:#E65100}
        .ld-disc-row .disc-sku{font-family:'JetBrains Mono',monospace;font-size:16px;font-weight:700;color:#F97316}
        .ld-disc-row .disc-name{font-size:14px;color:#424242;margin:2px 0 8px}
        .ld-disc-row .disc-nums{display:flex;gap:12px;font-size:15px;font-weight:600}
        .ld-disc-row .disc-nums span{flex:1;text-align:center;padding:6px 0;border-radius:8px}
        .ld-disc-row .disc-exp{background:#E3F2FD;color:#1565C0}
        .ld-disc-row .disc-act{background:#FFF3E0;color:#E65100}
        .ld-disc-row .disc-diff{background:#FFEBEE;color:#C62828;font-weight:900}
        .ld-disc-row.over .disc-diff{background:#FFF3E0;color:#E65100}
        .ld-disc-btns{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:2px solid #E0E0E0;padding:12px 16px;display:flex;gap:10px;z-index:9999}
        .ld-disc-btns button{flex:1;height:52px;border-radius:12px;font-size:16px;font-weight:700;border:none;cursor:pointer}
        .ld-disc-btn-share{background:#25D366;color:#fff}
        .ld-disc-btn-share:active{background:#1DA851}
        .ld-disc-btn-close{background:#F5F5F5;color:#424242;border:2px solid #E0E0E0 !important}
        .ld-disc-btn-close:active{background:#E0E0E0}

        /* ═══ INVENTORY (Инвентаризация) ═══ */
        .inv-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#0c1220;z-index:1050;display:none;flex-direction:column;overflow:hidden;font-family:'Exo 2',sans-serif}
        .inv-overlay.show{display:flex}
        .inv-header{display:flex;align-items:center;gap:12px;padding:16px;background:#111827;border-bottom:1px solid rgba(30,58,95,0.6);flex-shrink:0}
        .inv-back{background:none;border:none;color:#F1F5F9;font-size:22px;padding:4px 8px;cursor:pointer}
        .inv-title{font-size:17px;font-weight:700;color:#F1F5F9;flex:1}
        .inv-subtitle{font-size:12px;color:#94A3B8}
        .inv-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:none;padding:16px;padding-bottom:calc(140px + env(safe-area-inset-bottom, 0px))}
        .inv-progress-sticky{padding:12px 16px;background:rgba(17,24,39,0.95);border-bottom:1px solid rgba(30,58,95,0.3);flex-shrink:0}
        .inv-progress-bar{height:8px;background:rgba(30,58,95,0.4);border-radius:4px;overflow:hidden;margin-top:8px}
        .inv-progress-fill{height:100%;background:linear-gradient(90deg,#F97316,#EA580C);border-radius:4px;transition:width 0.4s ease}
        .inv-progress-text{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:#94A3B8}
        .inv-progress-text b{color:#F1F5F9;font-family:'JetBrains Mono',monospace}
        .inv-progress-text .inv-pct{color:#F97316;font-weight:700;font-family:'JetBrains Mono',monospace}
        /* Sessions screen */
        .inv-stats-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin-bottom:20px}
        .inv-stat-card{background:rgba(26,35,50,0.85);border:1px solid rgba(30,58,95,0.6);border-radius:14px;padding:14px;text-align:center}
        .inv-stat-value{font-size:22px;font-weight:800;font-family:'JetBrains Mono',monospace}
        .inv-stat-label{font-size:11px;color:#64748B;margin-top:2px}
        .inv-section-title{font-size:13px;font-weight:700;color:#64748B;text-transform:uppercase;letter-spacing:0.5px;margin:20px 0 10px;padding-left:2px}
        .inv-session-card{background:rgba(26,35,50,0.85);border:1px solid rgba(30,58,95,0.6);border-radius:14px;padding:16px;margin-bottom:10px;cursor:pointer;transition:border-color 0.2s}
        .inv-session-card:active{border-color:#F97316}
        .inv-session-card .inv-s-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
        .inv-session-card .inv-s-name{font-size:15px;font-weight:700;color:#F1F5F9}
        .inv-session-card .inv-s-badge{font-size:11px;font-weight:700;padding:3px 8px;border-radius:6px;font-family:'JetBrains Mono',monospace}
        .inv-s-badge.active{background:rgba(249,115,22,0.15);color:#F97316}
        .inv-s-badge.completed{background:rgba(52,211,153,0.15);color:#34D399}
        .inv-session-card .inv-s-info{font-size:12px;color:#64748B;margin-top:6px}
        .inv-create-btn{position:fixed;bottom:24px;left:16px;right:16px;height:54px;background:linear-gradient(135deg,#F97316,#EA580C);color:#fff;border:none;border-radius:14px;font-size:16px;font-weight:700;cursor:pointer;z-index:10;font-family:'Exo 2',sans-serif;box-shadow:0 4px 20px rgba(249,115,22,0.4)}
        .inv-create-btn:active{transform:scale(0.97)}
        /* Search */
        .inv-search-wrap{position:relative;margin-bottom:16px}
        .inv-search-input{width:100%;height:52px;background:rgba(31,45,63,0.7);border:1px solid rgba(30,58,95,0.6);border-radius:12px;padding:0 16px 0 44px;font-size:16px;font-family:'JetBrains Mono',monospace;color:#F1F5F9;outline:none;box-sizing:border-box}
        .inv-search-input:focus{border-color:#F97316;box-shadow:0 0 0 3px rgba(249,115,22,0.15)}
        .inv-search-input::placeholder{color:#64748B}
        .inv-search-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);font-size:18px;color:#64748B}
        .inv-scan-btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:48px;background:rgba(31,45,63,0.5);border:1px dashed rgba(30,58,95,0.6);border-radius:12px;color:#94A3B8;font-size:14px;cursor:pointer;margin-bottom:16px;font-family:'Exo 2',sans-serif}
        .inv-scan-btn:active{background:rgba(31,45,63,0.8);border-color:#F97316;color:#F97316}
        .inv-results{margin-top:-8px}
        .inv-result-item{display:flex;align-items:center;padding:14px;background:rgba(26,35,50,0.85);border:1px solid rgba(30,58,95,0.4);border-radius:12px;margin-bottom:8px;cursor:pointer;transition:border-color 0.15s}
        .inv-result-item:active{border-color:#F97316}
        .inv-result-item.counted{opacity:0.5}
        .inv-result-item .inv-r-info{flex:1;min-width:0}
        .inv-r-sku{font-family:'JetBrains Mono',monospace;font-size:15px;font-weight:700;color:#F1F5F9}
        .inv-r-sku mark{background:rgba(249,115,22,0.25);color:#F97316;border-radius:2px;padding:0 2px}
        .inv-r-name{font-size:12px;color:#64748B;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
        .inv-r-counted{font-size:11px;color:#34D399;margin-top:3px}
        .inv-r-arrow{color:#64748B;font-size:18px;margin-left:8px;flex-shrink:0}
        /* Confirm modal */
        .inv-confirm{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.7);z-index:1100;display:none;align-items:flex-end;justify-content:center}
        .inv-confirm.show{display:flex}
        .inv-confirm-sheet{width:100%;max-width:480px;background:#111827;border-radius:20px 20px 0 0;padding:24px 20px 32px;animation:slideUp 0.25s ease}
        .inv-c-step{display:none}.inv-c-step.active{display:block}
        .inv-c-label{font-size:13px;color:#64748B;margin-bottom:8px}
        .inv-c-sku{font-family:'JetBrains Mono',monospace;font-size:28px;font-weight:800;color:#F1F5F9;margin-bottom:4px}
        .inv-c-name{font-size:15px;color:#94A3B8;margin-bottom:12px}
        .inv-c-meta{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
        .inv-c-chip{font-size:11px;padding:4px 10px;border-radius:6px;background:rgba(31,45,63,0.7);color:#94A3B8}
        .inv-c-warning{background:rgba(251,191,36,0.1);border:1px solid rgba(251,191,36,0.3);border-radius:10px;padding:12px;font-size:13px;color:#fbbf24;margin-bottom:16px;text-align:center}
        .inv-c-btns{display:grid;grid-template-columns:1fr 1fr;gap:10px}
        .inv-c-btn{height:50px;border:none;border-radius:12px;font-size:15px;font-weight:700;cursor:pointer;font-family:'Exo 2',sans-serif}
        .inv-c-btn.no{background:rgba(31,45,63,0.7);color:#94A3B8}
        .inv-c-btn.yes{background:linear-gradient(135deg,#F97316,#EA580C);color:#fff}
        .inv-c-btn.yes:active{transform:scale(0.97)}
        /* Quantity input */
        .inv-qty-row{display:flex;align-items:stretch;gap:10px;margin:20px 0;height:64px}
        .inv-qty-btn{width:64px;min-width:64px;border-radius:12px;border:1px solid rgba(30,58,95,0.6);background:rgba(31,45,63,0.7);color:#F1F5F9;font-size:26px;font-weight:700;cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center}
        .inv-qty-btn:active{background:rgba(249,115,22,0.2);border-color:#F97316}
        .inv-qty-input{flex:1;min-width:0;height:100%;background:rgba(31,45,63,0.7);border:2px solid rgba(30,58,95,0.6);border-radius:12px;text-align:center;font-size:32px;font-family:'JetBrains Mono',monospace;font-weight:700;color:#F1F5F9;outline:none;box-sizing:border-box}
        .inv-qty-input:focus{border-color:#F97316}
        .inv-qty-hint{font-size:12px;color:#64748B;text-align:center}
        .inv-submit-btn{width:100%;height:54px;border:none;border-radius:12px;font-size:16px;font-weight:700;cursor:pointer;margin-top:16px;font-family:'Exo 2',sans-serif;background:linear-gradient(135deg,#34D399,#059669);color:#fff}
        .inv-submit-btn:active{transform:scale(0.97)}
        /* Success flash */
        .inv-success{text-align:center;padding:20px 0}
        .inv-success-check{font-size:56px;animation:checkPop 0.4s ease}
        .inv-success-text{font-size:18px;font-weight:700;color:#34D399;margin:12px 0 4px}
        .inv-success-detail{font-size:14px;color:#94A3B8;font-family:'JetBrains Mono',monospace}
        .inv-next-btn{width:100%;height:54px;border:none;border-radius:12px;font-size:16px;font-weight:700;cursor:pointer;margin-top:20px;font-family:'Exo 2',sans-serif;background:linear-gradient(135deg,#F97316,#EA580C);color:#fff}
        .inv-next-btn:active{transform:scale(0.97)}
        /* Tab bar */
        .inv-tabs{display:flex;background:#111827;border-top:1px solid rgba(30,58,95,0.6);flex-shrink:0;padding-bottom:env(safe-area-inset-bottom,0)}
        .inv-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:14px 4px;font-size:11px;color:#64748B;cursor:pointer;border:none;background:transparent;font-family:'Exo 2',sans-serif;position:relative;min-height:64px;touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none;transition:background-color .1s ease,color .1s ease}
        .inv-tab.active{color:#F97316}
        .inv-tab:active,.inv-tab.is-pressed{background:rgba(249,115,22,0.16)}
        .inv-tab-icon{font-size:20px;pointer-events:none;line-height:1}
        .inv-tab span{pointer-events:none}
        .inv-tab-badge{position:absolute;top:6px;right:calc(50% - 22px);min-width:18px;height:18px;background:#F97316;color:#fff;border-radius:9px;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 5px;font-family:'JetBrains Mono',monospace;pointer-events:none}
        /* Entries list */
        .inv-entry{display:flex;align-items:center;padding:14px;background:rgba(26,35,50,0.85);border:1px solid rgba(30,58,95,0.4);border-radius:12px;margin-bottom:8px}
        .inv-entry .inv-e-info{flex:1;min-width:0}
        .inv-e-sku{font-family:'JetBrains Mono',monospace;font-size:14px;font-weight:700;color:#F1F5F9}
        .inv-e-name{font-size:11px;color:#64748B;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
        .inv-e-time{font-size:10px;color:#64748B;margin-top:2px}
        .inv-e-qty{font-size:20px;font-weight:800;color:#34D399;font-family:'JetBrains Mono',monospace;margin:0 12px}
        .inv-e-edit{background:none;border:none;font-size:16px;color:#64748B;cursor:pointer;padding:4px}
        .inv-entry.editing{border-color:#F97316}
        .inv-edit-row{display:flex;align-items:center;gap:8px;margin-top:8px;animation:popIn 0.2s ease}
        .inv-edit-input{flex:1;height:40px;background:rgba(31,45,63,0.7);border:1px solid #F97316;border-radius:8px;text-align:center;font-size:18px;font-family:'JetBrains Mono',monospace;color:#F1F5F9;outline:none;box-sizing:border-box}
        .inv-edit-save{height:40px;padding:0 16px;background:#F97316;color:#fff;border:none;border-radius:8px;font-weight:700;font-size:13px;cursor:pointer}
        .inv-edit-cancel{height:40px;padding:0 12px;background:rgba(31,45,63,0.7);color:#94A3B8;border:none;border-radius:8px;font-size:16px;cursor:pointer}
        /* Result screen */
        .inv-result-stamp{text-align:center;margin:20px 0;animation:stampIn 0.5s ease}
        .inv-stamp-box{display:inline-block;border:3px solid #34D399;border-radius:12px;padding:10px 24px;transform:rotate(-3deg)}
        .inv-stamp-text{font-size:16px;font-weight:800;color:#34D399;text-transform:uppercase;letter-spacing:1px}
        .inv-result-info{background:rgba(96,165,250,0.1);border:1px solid rgba(96,165,250,0.3);border-radius:12px;padding:14px;font-size:13px;color:#60A5FA;margin:16px 0;line-height:1.5}
        .inv-result-doc{text-align:center;padding:16px;background:rgba(26,35,50,0.85);border-radius:12px;margin:16px 0}
        .inv-result-doc .inv-rd-icon{font-size:28px;margin-bottom:6px}
        .inv-result-doc .inv-rd-status{font-size:14px;font-weight:700;color:#34D399}
        .inv-result-doc .inv-rd-detail{font-size:12px;color:#64748B;margin-top:4px;font-family:'JetBrains Mono',monospace}
        .inv-done-btn{position:fixed;bottom:24px;left:16px;right:16px;height:54px;background:linear-gradient(135deg,#34D399,#059669);color:#fff;border:none;border-radius:14px;font-size:16px;font-weight:700;cursor:pointer;z-index:10;font-family:'Exo 2',sans-serif}
        .inv-empty{text-align:center;padding:60px 20px;color:#64748B}
        .inv-empty-icon{font-size:48px;margin-bottom:12px}
        .inv-empty-text{font-size:14px}
        .inv-loading{text-align:center;padding:40px;color:#64748B;font-size:14px}

        /* ═══ Transfer Screen ═══ */
        .tf-header{display:flex;align-items:center;gap:12px;padding:16px 16px 12px;position:sticky;top:0;z-index:10;background:var(--bg-primary)}
        .tf-back{background:none;border:none;color:var(--text-primary);font-size:22px;cursor:pointer;padding:4px 8px 4px 0}
        .tf-title{font-family:'Exo 2',sans-serif;font-size:18px;font-weight:700;color:var(--text-primary)}
        .tf-subtitle{font-size:12px;color:var(--text-secondary);margin-top:2px}
        .tf-badge{margin-left:auto;background:var(--accent);color:#fff;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;cursor:pointer;font-family:'JetBrains Mono',monospace}
        .tf-step{padding:0 16px 16px}
        .tf-section-title{font-family:'Exo 2',sans-serif;font-size:14px;font-weight:700;color:var(--text-primary);margin-bottom:12px}
        .tf-warehouses{display:flex;flex-direction:column;gap:8px}
        .tf-wh-card{background:var(--bg-card);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--border-light);border-radius:12px;padding:14px 16px;cursor:pointer;transition:transform 0.1s,border-color 0.2s;display:flex;align-items:center;gap:12px}
        .tf-wh-card:active{transform:scale(0.98)}
        .tf-wh-card.selected{border-color:var(--accent);background:rgba(249,115,22,0.08)}
        .tf-wh-card.disabled{opacity:0.4;pointer-events:none}
        .tf-wh-icon{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:18px}
        .tf-wh-icon.almaty{background:rgba(59,130,246,0.15);color:#3B82F6}
        .tf-wh-icon.shymkent{background:rgba(34,197,94,0.15);color:#22C55E}
        .tf-wh-icon.aktobe{background:rgba(168,85,247,0.15);color:#A855F7}
        .tf-wh-icon.uralsk{background:rgba(249,115,22,0.15);color:#F97316}
        .tf-wh-info{flex:1}
        .tf-wh-name{font-size:14px;font-weight:600;color:var(--text-primary)}
        .tf-wh-org{font-size:11px;color:var(--text-secondary);margin-top:2px}
        .tf-wh-arrow{color:var(--text-secondary);font-size:18px}
        .tf-search-row{display:flex;gap:8px;margin-bottom:12px}
        .tf-search{flex:1;background:var(--bg-card);border:1px solid var(--border-light);border-radius:12px;padding:12px 14px;color:var(--text-primary);font-size:14px;outline:none;font-family:'Exo 2',sans-serif}
        .tf-search:focus{border-color:var(--accent)}
        .tf-search-btn{background:var(--accent);border:none;border-radius:12px;width:46px;display:flex;align-items:center;justify-content:center;cursor:pointer}
        .tf-search-btn svg{width:20px;height:20px;color:#fff}
        .tf-results{display:flex;flex-direction:column;gap:8px}
        .tf-product-card{background:var(--bg-card);backdrop-filter:blur(12px);border:1px solid var(--border-light);border-radius:12px;padding:12px 14px;cursor:pointer;transition:transform 0.1s}
        .tf-product-card:active{transform:scale(0.98)}
        .tf-product-sku{font-family:'JetBrains Mono',monospace;font-size:15px;font-weight:700;color:var(--accent)}
        .tf-product-name{font-size:12px;color:var(--text-secondary);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
        .tf-product-stock{font-size:11px;color:var(--success);margin-top:4px}
        .tf-loading{text-align:center;padding:40px;color:var(--text-secondary);font-size:14px}
        .tf-empty{text-align:center;padding:40px 20px;color:var(--text-secondary)}
        .tf-empty-icon{font-size:40px;margin-bottom:8px}

        /* Transfer: Availability Modal */
        .tf-modal{position:fixed;inset:0;z-index:1100;background:rgba(0,0,0,0.6);display:none;align-items:flex-end;justify-content:center}
        .tf-modal.show{display:flex}
        .tf-modal-sheet{background:var(--bg-secondary);border-radius:20px 20px 0 0;width:100%;max-width:480px;max-height:85vh;overflow-y:auto;padding:20px 16px 32px;animation:slideUp 0.3s ease}
        .tf-modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}
        .tf-modal-title{font-family:'Exo 2',sans-serif;font-size:16px;font-weight:700;color:var(--text-primary);flex:1}
        .tf-modal-close{background:none;border:none;color:var(--text-secondary);font-size:28px;cursor:pointer;padding:0 4px}
        .tf-modal-sku{font-family:'JetBrains Mono',monospace;font-size:14px;color:var(--accent);margin-bottom:16px}
        .tf-modal-body{display:flex;flex-direction:column;gap:8px}
        .tf-avail-row{background:var(--bg-card);border:1px solid var(--border-light);border-radius:12px;padding:12px 14px;display:flex;align-items:center;justify-content:space-between}
        .tf-avail-row.my-wh{opacity:0.5}
        .tf-avail-wh{font-size:13px;font-weight:600;color:var(--text-primary)}
        .tf-avail-qty{font-family:'JetBrains Mono',monospace;font-size:15px;font-weight:700}
        .tf-avail-qty.in-stock{color:var(--success)}
        .tf-avail-qty.low{color:var(--warning)}
        .tf-avail-qty.zero{color:var(--text-secondary)}
        .tf-avail-add{display:flex;align-items:center;gap:8px;margin-top:8px}
        .tf-qty-input{width:70px;background:var(--bg-primary);border:1px solid var(--border-light);border-radius:8px;padding:8px;color:var(--text-primary);font-family:'JetBrains Mono',monospace;font-size:14px;text-align:center}
        .tf-add-btn{background:var(--accent);border:none;border-radius:8px;padding:8px 14px;color:#fff;font-size:13px;font-weight:600;cursor:pointer}
        .tf-add-btn:active{transform:scale(0.95)}

        /* Transfer: Cart Groups */
        .tf-cart-groups{display:flex;flex-direction:column;gap:12px;padding-bottom:calc(140px + env(safe-area-inset-bottom, 0px))}
        .tf-group-card{background:var(--bg-card);backdrop-filter:blur(12px);border:1px solid var(--border-light);border-radius:14px;overflow:hidden}
        .tf-group-header{padding:12px 14px;border-bottom:1px solid var(--border-light);display:flex;align-items:center;gap:8px}
        .tf-group-arrow{font-size:16px}
        .tf-group-title{font-family:'Exo 2',sans-serif;font-size:13px;font-weight:700;color:var(--text-primary);flex:1}
        .tf-group-count{font-family:'JetBrains Mono',monospace;font-size:12px;color:var(--text-secondary)}
        .tf-group-items{padding:8px}
        .tf-cart-item{display:flex;align-items:center;gap:10px;padding:8px 6px;border-bottom:1px solid rgba(30,58,95,0.3)}
        .tf-cart-item:last-child{border-bottom:none}
        .tf-cart-item-info{flex:1;min-width:0}
        .tf-cart-item-sku{font-family:'JetBrains Mono',monospace;font-size:13px;font-weight:700;color:var(--accent)}
        .tf-cart-item-name{font-size:11px;color:var(--text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
        .tf-cart-item-qty{font-family:'JetBrains Mono',monospace;font-size:14px;font-weight:700;color:var(--text-primary);min-width:40px;text-align:right}
        .tf-cart-item-del{background:none;border:none;color:var(--danger);font-size:18px;cursor:pointer;padding:4px 8px}
        .tf-cart-summary{position:fixed;bottom:0;left:0;right:0;background:var(--bg-secondary);border-top:1px solid var(--border-light);padding:14px 16px;z-index:50}
        .tf-summary-text{font-size:13px;color:var(--text-secondary);margin-bottom:10px;text-align:center}
        .tf-submit-btn{width:100%;height:50px;background:linear-gradient(135deg,var(--accent),#EA580C);color:#fff;border:none;border-radius:14px;font-size:16px;font-weight:700;cursor:pointer;font-family:'Exo 2',sans-serif}
        .tf-submit-btn:active{transform:scale(0.98)}
        .tf-submit-btn:disabled{opacity:0.5;pointer-events:none}

        /* Transfer: Status */
        .tf-status-card{background:var(--bg-card);border:1px solid var(--border-light);border-radius:14px;padding:20px 16px;text-align:center}
        .tf-status-icon{font-size:48px;margin-bottom:12px}
        .tf-status-title{font-family:'Exo 2',sans-serif;font-size:18px;font-weight:700;color:var(--text-primary);margin-bottom:8px}
        .tf-status-text{font-size:13px;color:var(--text-secondary);line-height:1.5}
        .tf-status-id{font-family:'JetBrains Mono',monospace;font-size:12px;color:var(--accent);margin-top:12px}
        .tf-status-groups{margin-top:16px;display:flex;flex-direction:column;gap:8px;text-align:left}
        .tf-status-group{background:var(--bg-primary);border-radius:10px;padding:10px 12px;display:flex;align-items:center;justify-content:space-between}
        .tf-status-group-name{font-size:12px;color:var(--text-primary)}
        .tf-status-group-badge{font-size:11px;font-weight:600;padding:3px 8px;border-radius:6px}
        .tf-status-group-badge.pending{background:rgba(59,130,246,0.15);color:#3B82F6}
        .tf-status-group-badge.approved{background:rgba(34,197,94,0.15);color:#22C55E}
        .tf-status-group-badge.rejected{background:rgba(239,68,68,0.15);color:#EF4444}
        .tf-new-btn{margin-top:16px;background:none;border:1px solid var(--border-light);border-radius:10px;padding:10px;width:100%;color:var(--text-secondary);font-size:13px;cursor:pointer}

        .tf-drafts-banner{position:fixed;bottom:70px;left:16px;right:16px;background:rgba(249,115,22,0.15);border:1px solid rgba(249,115,22,0.3);border-radius:10px;padding:10px 14px;text-align:center;font-size:12px;color:var(--accent);cursor:pointer;z-index:40}

        /* ═══════════════════════════════════════════════════ */
        /* ═══════════════════════════════════════════════════ */
        /* AI TASKS DASHBOARD v2                               */
        /* ═══════════════════════════════════════════════════ */

        /* --- Overlay --- */
        #aiTasksOverlay {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: var(--bg-primary, #0B0F1A);
            z-index: 5000; display: flex; flex-direction: column;
            transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
        }
        #aiTasksOverlay.show { transform: translateX(0); }

        /* --- Header --- */
        .ait-header {
            display: flex; align-items: center; gap: 12px;
            padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
            background: rgba(11,15,26,0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
            border-bottom: 1px solid rgba(255,255,255,0.06); flex-shrink: 0; z-index: 10;
        }
        .ait-back {
            background: rgba(255,255,255,0.06); border: none; font-size: 20px; cursor: pointer;
            color: var(--text-primary); width: 40px; height: 40px; border-radius: 12px;
            display: flex; align-items: center; justify-content: center;
            -webkit-tap-highlight-color: transparent;
        }
        .ait-header-title { font-size: 18px; font-weight: 800; font-family: 'Exo 2', sans-serif; color: var(--text-primary); flex: 1; }
        .ait-header-badge {
            font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 100px;
            background: rgba(249,115,22,0.12); color: var(--accent);
            font-family: 'JetBrains Mono', monospace;
        }
        .ait-refresh {
            background: rgba(255,255,255,0.06); border: none; color: var(--text-secondary);
            font-size: 18px; cursor: pointer; width: 40px; height: 40px; border-radius: 12px;
            display: flex; align-items: center; justify-content: center;
            -webkit-tap-highlight-color: transparent;
        }

        .ait-body { flex: 1; overflow-y: auto; padding: 16px; padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }

        /* --- Tabs --- */
        .ait-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
        .ait-tab {
            flex: 1; padding: 11px; border-radius: 14px; font-size: 13px; font-weight: 700;
            border: 1.5px solid rgba(255,255,255,0.08); background: transparent;
            color: var(--text-muted); cursor: pointer; text-align: center;
            transition: all 0.2s; font-family: Inter, sans-serif;
            -webkit-tap-highlight-color: transparent;
        }
        .ait-tab.active {
            background: var(--accent); color: #fff; border-color: var(--accent);
            box-shadow: 0 4px 16px rgba(249,115,22,0.25);
        }

        /* --- Stats row --- */
        .ait-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
        .ait-stat {
            text-align: center; padding: 14px 6px 12px; border-radius: 14px;
            background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
            position: relative; overflow: hidden;
        }
        .ait-stat::before {
            content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
        }
        .ait-stat:nth-child(1)::before { background: linear-gradient(90deg, #60A5FA, #A78BFA); }
        .ait-stat:nth-child(2)::before { background: linear-gradient(90deg, #059669, var(--success, #34D399)); }
        .ait-stat:nth-child(3)::before { background: linear-gradient(90deg, var(--accent-dim, #C2410C), var(--accent)); }
        .ait-stat:nth-child(4)::before { background: linear-gradient(90deg, #B91C1C, var(--danger, #F87171)); }
        .ait-stat-icon { font-size: 16px; margin-bottom: 6px; }
        .ait-stat-val { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 900; line-height: 1; margin-bottom: 4px; }
        .ait-stat-val.created { color: #60A5FA; }
        .ait-stat-val.done { color: var(--success, #34D399); }
        .ait-stat-val.active { color: var(--accent, #F97316); }
        .ait-stat-val.expired { color: var(--danger, #F87171); }
        .ait-stat-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: 0.3px; }
        .ait-stat-bar { height: 3px; border-radius: 2px; margin-top: 8px; background: rgba(255,255,255,0.04); overflow: hidden; }
        .ait-stat-bar-fill { height: 100%; border-radius: 2px; transition: width 0.8s ease; }
        .ait-stat-bar-fill.done { background: linear-gradient(90deg, #059669, var(--success)); }
        .ait-stat-bar-fill.active { background: linear-gradient(90deg, var(--accent-dim, #C2410C), var(--accent)); }
        .ait-stat-bar-fill.expired { background: linear-gradient(90deg, #B91C1C, var(--danger)); }

        /* --- Section title --- */
        .ait-section-title {
            font-size: 11px; font-weight: 800; color: var(--text-muted);
            text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px;
            display: flex; align-items: center; gap: 8px;
        }
        .ait-section-count {
            font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
            padding: 2px 10px; border-radius: 100px;
            background: rgba(249,115,22,0.12); color: var(--accent);
        }

        /* --- Manager card --- */
        .ait-mgr-card {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 18px; margin-bottom: 12px; overflow: hidden;
            transition: border-color 0.2s;
        }
        .ait-mgr-card.open { border-color: rgba(249,115,22,0.12); }
        .ait-mgr-header {
            display: flex; align-items: center; gap: 12px; padding: 14px 16px;
            cursor: pointer; -webkit-tap-highlight-color: transparent;
        }
        .ait-mgr-avatar {
            width: 44px; height: 44px; border-radius: 14px;
            background: linear-gradient(135deg, var(--accent-dim, #7C2D12), var(--accent));
            display: flex; align-items: center; justify-content: center;
            font-size: 14px; font-weight: 800; color: #fff; flex-shrink: 0;
            box-shadow: 0 4px 12px rgba(249,115,22,0.2);
        }
        .ait-mgr-info { flex: 1; min-width: 0; }
        .ait-mgr-name { font-size: 15px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ait-mgr-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
        .ait-mgr-chevron { color: var(--text-muted); font-size: 20px; transition: transform 0.2s; }
        .ait-mgr-card.open .ait-mgr-chevron { transform: rotate(90deg); color: var(--accent); }

        .ait-mgr-tasks { padding: 0 16px 14px; display: none; }
        .ait-mgr-card.open .ait-mgr-tasks { display: block; }

        /* --- Task item (approval) --- */
        .ait-task-approve {
            display: flex; align-items: flex-start; gap: 12px;
            padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
        }
        .ait-task-approve:last-child { border-bottom: none; }

        .ait-checkbox {
            width: 26px; height: 26px; border-radius: 9px;
            border: 2px solid rgba(255,255,255,0.12); background: transparent;
            cursor: pointer; display: flex; align-items: center; justify-content: center;
            flex-shrink: 0; margin-top: 2px; transition: all 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .ait-checkbox.checked {
            background: var(--accent); border-color: var(--accent);
            box-shadow: 0 2px 10px rgba(249,115,22,0.3);
        }
        .ait-checkbox.checked::after {
            content: ''; width: 10px; height: 6px;
            border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
            transform: rotate(-45deg) translateY(-1px);
        }

        .ait-task-content { flex: 1; min-width: 0; }
        .ait-task-title { font-size: 14px; font-weight: 600; color: var(--text-primary); line-height: 1.4; }
        .ait-task-client { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
        .ait-task-client a { color: var(--primary, #60A5FA); text-decoration: none; }
        .ait-task-script {
            margin-top: 6px; padding: 8px 10px; border-radius: 10px;
            background: rgba(249,115,22,0.06);
            border-left: 3px solid rgba(249,115,22,0.2);
            font-size: 12px; color: var(--text-secondary); line-height: 1.5; font-style: italic;
        }
        .ait-task-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
        .ait-task-metric {
            font-family: 'JetBrains Mono', monospace;
            display: inline-flex; align-items: center; gap: 4px;
            font-size: 11px; font-weight: 700; color: var(--accent);
            background: rgba(249,115,22,0.1); padding: 4px 10px; border-radius: 100px;
        }
        .ait-task-priority { font-size: 9px; font-weight: 800; padding: 4px 8px; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.5px; }
        .ait-task-priority.high { background: rgba(239,68,68,0.12); color: #F87171; }
        .ait-task-priority.medium { background: rgba(249,115,22,0.12); color: var(--accent); }
        .ait-task-priority.low { background: rgba(100,116,139,0.1); color: var(--text-secondary); }
        .ait-task-products { font-size: 10px; color: var(--text-muted); }
        .ait-task-reasoning { margin-top: 6px; }
        .ait-task-reasoning summary { font-size: 11px; color: var(--accent); cursor: pointer; font-weight: 600; opacity: 0.8; }
        .ait-task-reasoning .ait-reason-text { font-size: 12px; color: var(--text-secondary); padding: 4px 0; line-height: 1.5; }
        .ait-task-bottom { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
        .ait-task-dl-input {
            font-family: 'JetBrains Mono', monospace;
            font-size: 11px; padding: 5px 8px; border-radius: 8px;
            background: rgba(255,255,255,0.04); color: var(--text-secondary);
            border: 1px solid rgba(255,255,255,0.08);
        }
        .ait-task-reject-btn {
            font-size: 11px; padding: 5px 10px; border-radius: 8px;
            background: none; border: 1px solid rgba(239,68,68,0.2);
            color: #EF4444; cursor: pointer; font-weight: 600; font-family: Inter, sans-serif;
            -webkit-tap-highlight-color: transparent;
        }

        /* --- Approve bar --- */
        .ait-approve-bar {
            position: sticky; bottom: 0; left: 0; right: 0;
            padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom));
            background: rgba(11,15,26,0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
            border-top: 1px solid rgba(255,255,255,0.06);
        }
        .ait-approve-btn {
            width: 100%; padding: 16px; border: none; border-radius: 16px;
            background: linear-gradient(135deg, var(--accent), #FB923C);
            color: #fff; font-size: 15px; font-weight: 800; cursor: pointer;
            font-family: 'Exo 2', sans-serif;
            box-shadow: 0 6px 24px rgba(249,115,22,0.3);
            transition: transform 0.1s, box-shadow 0.1s;
        }
        .ait-approve-btn:active { transform: translateY(2px); box-shadow: 0 2px 8px rgba(249,115,22,0.3); }
        .ait-approve-btn:disabled { opacity: 0.35; pointer-events: none; }

        /* --- Overview card --- */
        .ait-overview-card {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 18px; padding: 16px; margin-bottom: 12px;
            cursor: pointer; -webkit-tap-highlight-color: transparent;
            transition: border-color 0.2s;
        }
        .ait-overview-card:active { border-color: rgba(249,115,22,0.2); }

        .ait-ov-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
        .ait-ov-pct { font-family: 'JetBrains Mono', monospace; font-size: 28px; font-weight: 900; }
        .ait-ov-pct.over { color: #FBBF24; }
        .ait-ov-pct.hot { color: var(--accent); }
        .ait-ov-pct.warm { color: var(--text-secondary); }
        .ait-ov-pct.cold { color: var(--text-muted); }
        .ait-ov-count { font-size: 12px; color: var(--text-muted); }

        .ait-stacked-bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.04); overflow: hidden; display: flex; gap: 2px; }
        .ait-stacked-seg { height: 100%; border-radius: 3px; transition: width 0.8s ease; }
        .ait-stacked-seg.done { background: linear-gradient(90deg, #059669, var(--success, #34D399)); }
        .ait-stacked-seg.active { background: linear-gradient(90deg, var(--accent-dim, #C2410C), var(--accent, #F97316)); }
        .ait-stacked-seg.expired { background: linear-gradient(90deg, #B91C1C, var(--danger, #F87171)); }
        .ait-stacked-seg.pending { background: rgba(255,255,255,0.06); }

        .ait-ov-tasks { margin-top: 12px; display: none; }
        .ait-overview-card.open .ait-ov-tasks { display: block; }

        .ait-ov-task {
            display: flex; align-items: center; gap: 10px;
            padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.03);
        }
        .ait-ov-task:last-child { border-bottom: none; }
        .ait-ov-task-dot {
            width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
        }
        .ait-ov-task-dot.done { background: var(--success); box-shadow: 0 0 6px rgba(52,211,153,0.4); }
        .ait-ov-task-dot.active { background: var(--accent); box-shadow: 0 0 6px rgba(249,115,22,0.4); }
        .ait-ov-task-dot.expired { background: var(--danger); box-shadow: 0 0 6px rgba(248,113,113,0.4); }
        .ait-ov-task-icon { font-size: 16px; flex-shrink: 0; width: 24px; text-align: center; }
        .ait-ov-task-info { flex: 1; min-width: 0; }
        .ait-ov-task-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ait-ov-task-detail { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
        .ait-ov-task-pct { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; flex-shrink: 0; }

        .ait-ov-task-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.04); overflow: hidden; margin-top: 6px; }
        .ait-ov-task-bar-fill { height: 100%; border-radius: 2px; transition: width 0.6s ease; }
        .ait-ov-task-bar-fill.done { background: linear-gradient(90deg, #059669, var(--success)); }
        .ait-ov-task-bar-fill.active { background: linear-gradient(90deg, var(--accent-dim, #C2410C), var(--accent)); box-shadow: 0 0 8px rgba(249,115,22,0.3); }
        .ait-ov-task-bar-fill.expired { background: linear-gradient(90deg, #B91C1C, var(--danger)); }
        .ait-ov-task-bar-fill.pending { background: rgba(255,255,255,0.06); }

        /* --- Team footer --- */
        .ait-team-footer {
            margin-top: 16px; padding: 22px; border-radius: 18px;
            background: linear-gradient(135deg, rgba(249,115,22,0.06), rgba(251,191,36,0.03));
            border: 1px solid rgba(249,115,22,0.1); text-align: center;
        }
        .ait-team-pct {
            font-family: 'JetBrains Mono', monospace; font-size: 36px; font-weight: 900;
            background: linear-gradient(135deg, var(--accent), #FBBF24);
            -webkit-background-clip: text; -webkit-text-fill-color: transparent;
        }
        .ait-team-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

        /* --- Dashboard "My Tasks" card --- */
        .ait-my-card {
            background: linear-gradient(135deg, rgba(249,115,22,0.08), rgba(251,191,36,0.04));
            border: 1px solid rgba(249,115,22,0.15);
            border-radius: 18px; padding: 16px; margin-bottom: 12px;
            cursor: pointer; -webkit-tap-highlight-color: transparent;
        }
        .ait-my-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
        .ait-my-title { font-size: 14px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
        .ait-my-counter { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: var(--accent); }

        .ait-my-progress { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
        .ait-my-progress-fill {
            height: 100%; border-radius: 3px;
            background: linear-gradient(90deg, var(--accent-dim, #C2410C), var(--accent), #FB923C);
            box-shadow: 0 0 8px rgba(249,115,22,0.3);
            transition: width 0.8s cubic-bezier(0.16,1,0.3,1);
        }
        .ait-my-progress-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-bottom: 12px; }
        .ait-my-pct { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--accent); }

        .ait-my-task {
            display: flex; align-items: center; gap: 10px;
            padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
        }
        .ait-my-task:last-child { border-bottom: none; }
        .ait-my-task-icon { font-size: 14px; flex-shrink: 0; }
        .ait-my-task-name { flex: 1; font-size: 13px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ait-my-task-name.done { text-decoration: line-through; opacity: 0.5; }
        .ait-my-task-val { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; flex-shrink: 0; }
        .ait-my-task-minibar { height: 3px; border-radius: 2px; background: rgba(255,255,255,0.05); overflow: hidden; margin-top: 4px; }
        .ait-my-task-minibar-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }

        /* --- Detail overlay --- */
        #aiTaskDetailOverlay {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: var(--bg-primary, #0B0F1A);
            z-index: 5100; display: flex; flex-direction: column;
            transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
        }
        #aiTaskDetailOverlay.show { transform: translateX(0); }

        .ait-detail-body { flex: 1; overflow-y: auto; padding: 16px; padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }

        .ait-detail-progress-ring {
            width: 130px; height: 130px; margin: 8px auto 8px;
            position: relative; display: flex; align-items: center; justify-content: center;
        }
        .ait-detail-progress-ring svg { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
        .ait-detail-progress-ring .ring-bg { stroke: rgba(255,255,255,0.06); fill: none; stroke-width: 8; }
        .ait-detail-progress-ring .ring-fill { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
        .ait-detail-ring-pct { font-family: 'JetBrains Mono', monospace; font-size: 30px; font-weight: 900; color: var(--text-primary); }
        .ait-detail-ring-label { font-size: 10px; color: var(--text-muted); text-align: center; margin-top: 2px; }
        .ait-detail-ring-title {
            font-size: 15px; font-weight: 700; color: var(--text-primary);
            text-align: center; line-height: 1.4; padding: 0 12px; margin: 12px 0 20px;
        }

        .ait-detail-section { margin-bottom: 20px; }
        .ait-detail-section-title {
            font-size: 10px; font-weight: 800; color: var(--text-muted);
            text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px;
        }
        .ait-detail-text { font-size: 14px; color: var(--text-primary); line-height: 1.6; }

        .ait-detail-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
        .ait-detail-metric {
            padding: 16px; border-radius: 14px;
            background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
            text-align: center;
        }
        .ait-detail-metric-val { font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 800; color: var(--text-primary); }
        .ait-detail-metric-label { font-size: 10px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; }

        .ait-detail-deadline {
            display: flex; align-items: center; gap: 10px; padding: 14px 16px;
            border-radius: 14px; font-size: 13px; font-weight: 600;
        }
        .ait-detail-deadline.ok { background: rgba(52,211,153,0.08); color: var(--success); border: 1px solid rgba(52,211,153,0.15); }
        .ait-detail-deadline.warn { background: rgba(251,191,36,0.08); color: var(--warning, #FBBF24); border: 1px solid rgba(251,191,36,0.15); }
        .ait-detail-deadline.danger { background: rgba(239,68,68,0.08); color: var(--danger); border: 1px solid rgba(239,68,68,0.15); }
        .ait-detail-deadline-date { font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; margin-top: 1px; }

        .ait-detail-ai-reason {
            font-size: 12px; color: var(--text-secondary); line-height: 1.6;
            padding: 14px; border-radius: 14px;
            background: linear-gradient(135deg, rgba(167,139,250,0.06), rgba(249,115,22,0.06));
            border-left: 3px solid #A78BFA;
        }
        .ait-detail-products { display: flex; gap: 6px; flex-wrap: wrap; }
        .ait-detail-product-tag {
            font-size: 12px; padding: 5px 12px; border-radius: 100px; font-weight: 600;
            background: rgba(249,115,22,0.08); color: var(--accent);
        }

        /* Timeline */
        .ait-timeline { padding-left: 18px; position: relative; }
        .ait-timeline::before {
            content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px;
            width: 2px; background: rgba(255,255,255,0.06); border-radius: 1px;
        }
        .ait-timeline-item { display: flex; gap: 12px; padding: 8px 0; position: relative; }
        .ait-timeline-dot {
            position: absolute; left: -18px; top: 12px;
            width: 10px; height: 10px; border-radius: 50%;
            border: 2px solid var(--bg-primary, #0B0F1A);
        }
        .ait-timeline-dot.ai { background: #A78BFA; }
        .ait-timeline-dot.approve { background: var(--success, #34D399); }
        .ait-timeline-dot.update { background: var(--accent); }
        .ait-history-date { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted); min-width: 44px; padding-top: 1px; }
        .ait-history-text { font-size: 12px; color: var(--text-secondary); flex: 1; line-height: 1.5; }
        .ait-history-icon { font-size: 14px; flex-shrink: 0; }
        /* Legacy compat */
        .ait-history-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
        .ait-history-item:last-child { border-bottom: none; }
        .ait-history-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
        .ait-history-dot.done { background: var(--success); }
        .ait-history-dot.call { background: var(--accent); }
        .ait-history-dot.sale { background: #FBBF24; }

        /* Detail actions */
        .ait-detail-actions {
            position: fixed; bottom: 0; left: 0; right: 0;
            padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom));
            background: rgba(11,15,26,0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
            border-top: 1px solid rgba(255,255,255,0.06);
            display: flex; flex-direction: column; gap: 8px; z-index: 5101;
        }
        .ait-detail-btn {
            width: 100%; padding: 14px; border-radius: 14px; font-size: 14px; font-weight: 700;
            cursor: pointer; text-align: center; transition: transform 0.1s; font-family: Inter, sans-serif;
        }
        .ait-detail-btn:active { transform: translateY(2px); }
        .ait-detail-btn.primary { background: linear-gradient(135deg, var(--accent), #FB923C); color: #fff; border: none; box-shadow: 0 4px 16px rgba(249,115,22,0.3); }
        .ait-detail-btn.secondary { background: transparent; color: var(--success); border: 1.5px solid rgba(52,211,153,0.25); }

        /* --- Dashboard button --- */
        .ait-dash-btn {
            width: 100%; padding: 14px; border: 1px solid rgba(249,115,22,0.2);
            border-radius: 18px; background: linear-gradient(135deg, rgba(249,115,22,0.08), rgba(251,191,36,0.04));
            color: var(--accent); font-size: 15px; font-weight: 700; cursor: pointer;
            font-family: 'Exo 2', sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px;
        }

        /* ═══ DESKTOP AI TASKS (min-width: 900px) ═══ */
        @media (min-width: 900px) {
            #aiTasksOverlay {
                transform: translateX(100%);
            }
            #aiTasksOverlay.show {
                transform: translateX(0);
            }
            .ait-header {
                padding: 14px 32px; padding-top: max(14px, env(safe-area-inset-top));
            }
            .ait-body {
                padding: 24px 32px;
                max-width: 960px; margin: 0 auto; width: 100%;
            }
            .ait-stats { gap: 12px; }
            .ait-stat { padding: 18px 10px 14px; border-radius: 16px; }
            .ait-stat-val { font-size: 28px; }
            .ait-stat-label { font-size: 10px; }
            .ait-stat-icon { font-size: 18px; margin-bottom: 8px; }
            .ait-mgr-card { border-radius: 20px; }
            .ait-mgr-header { padding: 16px 20px; }
            .ait-mgr-tasks { padding: 0 20px 18px; }
            .ait-approve-bar { padding: 16px 32px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
            .ait-approve-btn { max-width: 480px; margin: 0 auto; display: block; border-radius: 14px; }
            .ait-overview-card { border-radius: 20px; padding: 20px; }
            .ait-team-footer { border-radius: 20px; padding: 28px; }

            /* Detail overlay desktop */
            #aiTaskDetailOverlay .ait-detail-body {
                max-width: 640px; margin: 0 auto; width: 100%; padding: 28px 32px;
            }
            .ait-detail-actions {
                padding: 16px 32px; padding-bottom: calc(16px + env(safe-area-inset-bottom));
            }
            .ait-detail-actions .ait-detail-btn { max-width: 480px; margin: 0 auto; display: block; }
        }

        /* ============================================ */
        /* SALARY MODULE — Модуль ЗП                   */
        /* ============================================ */
        .sal-overlay {
            position: fixed; inset: 0; z-index: 1000;
            background: var(--bg-page, #111827);
            overflow-y: auto; overflow-x: hidden;
            transform: translateX(100%);
            transition: transform 0.3s ease;
            -webkit-overflow-scrolling: touch;
        }
        .sal-overlay.show { transform: translateX(0); }

        .sal-header {
            position: sticky; top: 0; z-index: 100;
            background: rgba(17, 24, 39, 0.92);
            backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            border-bottom: 1px solid rgba(30, 58, 95, 0.3);
            padding: 12px 16px;
        }
        .sal-header-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
        .sal-back { background: none; border: none; color: #64748B; font: 500 14px 'Exo 2', sans-serif; cursor: pointer; padding: 4px 0; display: flex; align-items: center; gap: 4px; }
        .sal-back:hover { color: #F1F5F9; }
        .sal-title { flex: 1; font: 700 20px 'Exo 2', sans-serif; color: #F1F5F9; letter-spacing: -0.3px; }
        .sal-title span { color: #F97316; }

        .sal-header-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
        .sal-select {
            appearance: none; background: rgba(31, 45, 63, 0.7); border: 1px solid rgba(30, 58, 95, 0.3);
            border-radius: 8px; color: #F1F5F9; font: 500 13px 'Exo 2', sans-serif;
            padding: 7px 32px 7px 10px; cursor: pointer;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: right 10px center;
        }
        .sal-badge {
            display: inline-flex; align-items: center; gap: 5px;
            padding: 5px 12px; border-radius: 20px;
            font: 600 11px 'Exo 2', sans-serif; text-transform: uppercase; letter-spacing: 0.5px;
        }
        .sal-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
        .sal-badge.draft { background: rgba(251, 191, 36, 0.15); color: #FBBF24; }
        .sal-badge.review { background: rgba(96, 165, 250, 0.15); color: #60A5FA; }
        .sal-badge.approved { background: rgba(34, 197, 94, 0.15); color: #22C55E; }

        .sal-approve-btn {
            background: linear-gradient(135deg, #F97316, #EA580C); border: none;
            color: #fff; font: 600 12px 'Exo 2', sans-serif;
            padding: 7px 16px; border-radius: 10px; cursor: pointer;
        }

        /* Summary cards */
        .sal-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px 16px; }
        @media (max-width: 600px) { .sal-summary { grid-template-columns: repeat(2, 1fr); } }
        .sal-card {
            background: rgba(26, 35, 50, 0.85); border: 1px solid rgba(30, 58, 95, 0.3);
            border-radius: 14px; padding: 12px; position: relative; overflow: hidden;
        }
        .sal-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: #F97316; }
        .sal-card.green::after { background: #22C55E; }
        .sal-card.blue::after { background: #60A5FA; }
        .sal-card.purple::after { background: #A78BFA; }
        .sal-card-label { font: 500 10px 'DM Sans', sans-serif; text-transform: uppercase; letter-spacing: 0.5px; color: #64748B; margin-bottom: 4px; }
        .sal-card-value { font: 700 18px 'JetBrains Mono', monospace; color: #F1F5F9; letter-spacing: -0.5px; }
        @media (max-width: 600px) { .sal-card-value { font-size: 15px; } }
        .sal-card-sub { font: 400 10px 'DM Sans', sans-serif; color: #64748B; margin-top: 2px; }

        /* Tabs */
        .sal-tabs {
            display: flex; overflow-x: auto; scrollbar-width: none;
            border-bottom: 1px solid rgba(30, 58, 95, 0.3);
            padding: 0 16px;
        }
        .sal-tabs::-webkit-scrollbar { display: none; }
        .sal-tab {
            background: none; border: none; padding: 12px 16px; cursor: pointer;
            font: 500 13px 'Exo 2', sans-serif; color: #64748B;
            white-space: nowrap; position: relative; flex-shrink: 0;
        }
        .sal-tab.active { color: #F97316; }
        .sal-tab.active::after {
            content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
            height: 2px; background: #F97316; border-radius: 2px 2px 0 0;
        }

        /* Toolbar */
        .sal-toolbar { display: flex; gap: 8px; padding: 10px 16px; align-items: center; }
        .sal-search {
            flex: 1; background: rgba(31, 45, 63, 0.7); border: 1px solid rgba(30, 58, 95, 0.3);
            border-radius: 8px; color: #F1F5F9; font: 400 13px 'Exo 2', sans-serif;
            padding: 8px 12px 8px 34px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: 10px center;
        }
        .sal-search:focus { outline: none; border-color: #F97316; }
        .sal-upload-btn {
            background: rgba(31, 45, 63, 0.7); border: 1px solid rgba(30, 58, 95, 0.3);
            border-radius: 10px; color: #64748B; font: 500 12px 'Exo 2', sans-serif;
            padding: 8px 14px; cursor: pointer; display: flex; align-items: center; gap: 6px; white-space: nowrap;
        }
        .sal-upload-btn:hover { border-color: #F97316; color: #F97316; }

        /* Location chips */
        .sal-chips { display: flex; gap: 4px; padding: 0 16px 10px; overflow-x: auto; scrollbar-width: none; }
        .sal-chips::-webkit-scrollbar { display: none; }
        .sal-chip {
            padding: 5px 10px; border-radius: 20px; font: 500 11px 'Exo 2', sans-serif;
            border: 1px solid rgba(30, 58, 95, 0.3); color: #64748B; background: transparent;
            cursor: pointer; white-space: nowrap; flex-shrink: 0;
        }
        .sal-chip.active { background: rgba(249, 115, 22, 0.15); border-color: #F97316; color: #F97316; }

        /* Tables */
        .sal-table-wrap {
            overflow-x: auto; border-radius: 14px;
            border: 1px solid rgba(30, 58, 95, 0.3);
            background: rgba(26, 35, 50, 0.85);
            margin: 0 16px 16px; scrollbar-width: thin;
            scrollbar-color: rgba(30, 58, 95, 0.3) transparent;
        }
        .sal-table { width: 100%; border-collapse: collapse; min-width: 900px; }
        .sal-table th {
            position: sticky; top: 0; z-index: 10;
            background: rgba(17, 24, 39, 0.95);
            font: 600 10px 'DM Sans', sans-serif; text-transform: uppercase;
            letter-spacing: 0.5px; color: #64748B;
            padding: 10px 12px; border-bottom: 1px solid rgba(30, 58, 95, 0.3);
            white-space: nowrap; text-align: left;
        }
        .sal-table td {
            padding: 8px 12px; border-bottom: 1px solid rgba(30, 58, 95, 0.15);
            font: 400 12px 'Exo 2', sans-serif; color: #F1F5F9; white-space: nowrap;
        }
        .sal-table tr:hover td { background: rgba(249, 115, 22, 0.03); }
        .sal-table .sticky-col {
            position: sticky; left: 0; z-index: 5;
            background: #1a2332; font-weight: 500;
            border-right: 1px solid rgba(30, 58, 95, 0.3);
        }
        .sal-table th.sticky-col { z-index: 15; background: #111827; }
        .sal-table .num { font: 500 12px 'JetBrains Mono', monospace; text-align: right; }
        .sal-table .pct { font: 500 12px 'JetBrains Mono', monospace; text-align: center; }
        .sal-table .pct.good { color: #22C55E; }
        .sal-table .pct.mid { color: #F97316; }
        .sal-table .pct.bad { color: #EF4444; }
        .sal-table .num.positive { color: #22C55E; }

        /* Group rows */
        .sal-group-row td {
            background: rgba(249, 115, 22, 0.06) !important;
            font: 700 12px 'Exo 2', sans-serif !important; color: #F97316 !important;
            cursor: pointer; user-select: none; padding: 10px 12px !important;
        }
        .sal-group-row .sal-arrow { display: inline-block; transition: transform 0.2s; margin-right: 6px; font-size: 10px; }
        .sal-group-row.collapsed .sal-arrow { transform: rotate(-90deg); }

        /* Total rows */
        .sal-total-row td {
            background: rgba(30, 58, 95, 0.15) !important;
            font-weight: 700 !important; border-top: 2px solid rgba(30, 58, 95, 0.3) !important;
        }

        /* Editable cells */
        .sal-table td.can-edit {
            background: rgba(249, 115, 22, 0.06); cursor: pointer;
        }
        .sal-table td.can-edit:hover { background: rgba(249, 115, 22, 0.15); }
        .sal-table td.changed { box-shadow: inset 3px 0 0 #F97316; }
        .sal-table td.no-edit { opacity: 0.5; cursor: default; }

        .sal-cell-input {
            background: rgba(31, 45, 63, 0.7); border: 2px solid #F97316;
            color: #F1F5F9; font: 500 13px 'JetBrains Mono', monospace;
            width: 100px; padding: 6px 8px; border-radius: 6px; text-align: right;
        }
        .sal-cell-input:focus { outline: none; }

        /* Info banner */
        .sal-banner {
            margin: 0 16px 10px; padding: 12px 14px;
            background: rgba(249, 115, 22, 0.15); border: 1px solid rgba(249, 115, 22, 0.2);
            border-radius: 14px; display: flex; flex-wrap: wrap; gap: 10px;
            font: 500 12px 'DM Sans', sans-serif; color: #94A3B8;
        }
        .sal-banner strong { color: #F97316; font-family: 'JetBrains Mono', monospace; font-weight: 600; }

        .sal-edit-hint {
            margin: 0 16px 10px; padding: 10px 14px;
            background: rgba(249, 115, 22, 0.08); border: 1px solid rgba(249, 115, 22, 0.15);
            border-radius: 14px; font: 500 12px 'DM Sans', sans-serif; color: #F97316;
        }

        /* Save bar */
        .sal-save-bar {
            position: fixed; bottom: 0; left: 0; right: 0; z-index: 1090;
            background: rgba(17, 24, 39, 0.95); backdrop-filter: blur(16px);
            border-top: 1px solid rgba(30, 58, 95, 0.3);
            padding: 12px 16px; align-items: center; gap: 10px;
            display: none;
        }
        .sal-save-bar.show { display: flex; }
        .sal-save-count { font: 400 12px 'DM Sans', sans-serif; color: #94A3B8; flex: 1; }
        .sal-save-count b { color: #F97316; font-family: 'JetBrains Mono', monospace; }
        .sal-cancel-btn {
            background: none; border: 1px solid rgba(30, 58, 95, 0.3);
            color: #64748B; font: 500 12px 'Exo 2', sans-serif;
            padding: 8px 16px; border-radius: 10px; cursor: pointer;
        }
        .sal-save-btn {
            background: linear-gradient(135deg, #F97316, #EA580C); border: none;
            color: #fff; font: 600 12px 'Exo 2', sans-serif;
            padding: 8px 20px; border-radius: 10px; cursor: pointer;
        }

        /* Upload modal */
        .sal-modal-overlay {
            position: fixed; inset: 0; z-index: 1100;
            background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
            opacity: 0; transition: opacity 0.3s; pointer-events: none;
            display: flex; align-items: flex-end; justify-content: center;
        }
        .sal-modal-overlay.show { opacity: 1; pointer-events: auto; }
        .sal-modal {
            background: #1a2332; border: 1px solid rgba(30, 58, 95, 0.3);
            border-radius: 20px 20px 0 0; max-width: 480px; width: 100%;
            padding: 16px 20px 32px; transform: translateY(100%);
            transition: transform 0.3s ease;
        }
        .sal-modal-overlay.show .sal-modal { transform: translateY(0); }
        .sal-modal-handle { width: 36px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.2); margin: 0 auto 16px; }
        .sal-modal h3 { font: 700 18px 'Exo 2', sans-serif; color: #F1F5F9; margin: 0 0 16px; }
        .sal-drop-zone {
            border: 2px dashed rgba(30, 58, 95, 0.3); border-radius: 14px;
            padding: 32px 20px; text-align: center; cursor: pointer;
            transition: all 0.2s; margin-bottom: 16px;
        }
        .sal-drop-zone:hover, .sal-drop-zone.dragover {
            border-color: #F97316; background: rgba(249, 115, 22, 0.15);
        }
        .sal-drop-zone p { font: 500 14px 'Exo 2', sans-serif; color: #64748B; margin: 8px 0 0; }
        .sal-file-type-btns { display: flex; gap: 8px; margin-bottom: 16px; }
        .sal-file-type-btn {
            flex: 1; padding: 10px; border-radius: 10px; text-align: center; cursor: pointer;
            border: 1px solid rgba(30, 58, 95, 0.3); background: transparent;
            font: 500 13px 'Exo 2', sans-serif; color: #64748B;
        }
        .sal-file-type-btn.active { background: rgba(249, 115, 22, 0.15); border-color: #F97316; color: #F97316; }

        /* Tab content animation */
        .sal-tab-content { animation: salFadeIn 0.3s ease; }
        @keyframes salFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

        /* Timesheets day cells */
        .sal-table td.day-work { font: 500 11px 'JetBrains Mono', monospace; text-align: center; width: 28px; padding: 4px 2px; }
        .sal-table td.day-off { color: #64748B; }
        .sal-table td.day-sick { color: #EF4444; }
        .sal-table td.day-vacation { color: #60A5FA; }
        .sal-table td.day-trip { color: #A78BFA; }

        /* Toast */
        .sal-toast {
            position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
            background: #22C55E; color: #fff; font: 600 13px 'Exo 2', sans-serif;
            padding: 10px 24px; border-radius: 20px; z-index: 1200;
            animation: salFadeIn 0.3s ease;
        }

        /* Empty state */
        .sal-empty { text-align: center; padding: 60px 20px; color: #64748B; font: 500 14px 'Exo 2', sans-serif; }
        .sal-empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }

        /* Salary button on dashboard */
        .sal-dash-btn {
            width: 100%; padding: 16px 20px; border: none;
            border-radius: 16px; background: linear-gradient(135deg, rgba(249,115,22,0.12), rgba(167,139,250,0.06));
            color: #F97316; font: 700 15px 'Exo 2', sans-serif; cursor: pointer;
            display: flex; align-items: center; justify-content: center; gap: 8px;
            border: 1px solid rgba(249,115,22,0.2);
        }
        .sal-dash-btn:active { transform: scale(0.97); }

        /* ==========================================
           Liquidator
           ========================================== */
        .liq-dash-btn {
            width: 100%; padding: 16px 20px; border: none;
            border-radius: 16px; background: linear-gradient(135deg, rgba(56,189,248,0.12), rgba(14,165,233,0.06));
            color: #38BDF8; font: 700 15px 'Exo 2', sans-serif; cursor: pointer;
            display: flex; align-items: center; justify-content: center; gap: 8px;
            border: 1px solid rgba(56,189,248,0.2);
        }
        .liq-dash-btn:active { transform: scale(0.97); }

        .liq-overlay {
            position: fixed; inset: 0; z-index: 9999;
            background: var(--bg-primary, #0A0F1C);
            display: flex; flex-direction: column;
            transform: translateX(100%); transition: transform 0.3s ease;
        }
        .liq-overlay.show { transform: translateX(0); }

        .liq-container { display: flex; flex-direction: column; height: 100%; overflow: hidden; }

        .liq-draft-banner {
            background: linear-gradient(135deg, #f4e4c1, #ecdab0);
            border: 2px solid #8b6914;
            border-radius: 8px;
            padding: 12px 16px;
            margin: 12px 20px;
            font: 500 13px 'Inter', sans-serif;
            color: #2c1810;
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }
        .liq-draft-banner > span { flex: 1; min-width: 200px; }
        .liq-draft-banner button {
            padding: 6px 14px;
            border-radius: 5px;
            border: 1px solid #8b6914;
            background: #fff;
            font: 600 12px 'Inter', sans-serif;
            cursor: pointer;
            color: #2c1810;
        }
        .liq-draft-banner button:first-of-type {
            background: linear-gradient(180deg, #c9a84c, #8b6914);
            color: #fff;
        }
        .liq-draft-banner button:hover { filter: brightness(1.05); }

        .liq-header {
            display: flex; align-items: center; gap: 12px;
            padding: 16px 20px; background: var(--bg-card, #131929);
            border-bottom: 1px solid var(--border-light, #1E293B);
            flex-shrink: 0;
        }
        .liq-back {
            background: none; border: none; color: var(--text-primary); font-size: 22px;
            cursor: pointer; padding: 4px 8px; min-width: 44px; min-height: 44px;
            display: flex; align-items: center; justify-content: center;
        }
        .liq-title { flex: 1; font: 700 18px 'Exo 2', sans-serif; color: var(--text-primary); }
        .liq-refresh {
            background: none; border: none; color: var(--accent, #F97316); font-size: 20px;
            cursor: pointer; padding: 4px 8px; min-width: 44px; min-height: 44px;
            display: flex; align-items: center; justify-content: center;
        }

        .liq-stats {
            display: flex; gap: 8px; padding: 12px 16px; overflow-x: auto;
            flex-shrink: 0; background: var(--bg-card, #131929);
            border-bottom: 1px solid var(--border-light, #1E293B);
        }
        .liq-stat-card {
            background: var(--bg-input, #1a1f2e); border-radius: 10px;
            padding: 10px 14px; text-align: center; min-width: 70px; flex-shrink: 0;
        }
        .liq-stat-card.red { border-bottom: 2px solid #EF4444; }
        .liq-stat-card.orange { border-bottom: 2px solid #F97316; }
        .liq-stat-card.yellow { border-bottom: 2px solid #EAB308; }
        .liq-stat-val { font: 700 18px 'JetBrains Mono', monospace; color: var(--text-primary); }
        .liq-stat-lbl { font-size: 10px; color: var(--text-secondary, #64748B); margin-top: 2px; }

        .liq-filters {
            padding: 12px 16px; flex-shrink: 0;
            background: var(--bg-card, #131929);
            border-bottom: 1px solid var(--border-light, #1E293B);
        }
        .liq-cats { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; }
        .liq-cat {
            padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border-light, #1E293B);
            background: var(--bg-input, #1a1f2e); color: var(--text-secondary, #64748B);
            font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
            min-height: 36px;
        }
        .liq-cat.active { background: var(--accent, #F97316); color: white; border-color: var(--accent, #F97316); }
        .liq-cat.red.active { background: #EF4444; border-color: #EF4444; }
        .liq-cat.orange.active { background: #F97316; border-color: #F97316; }
        .liq-cat.yellow.active { background: #EAB308; border-color: #EAB308; }
        .liq-warehouse-select {
            width: 100%; padding: 10px 14px; border-radius: 10px;
            border: 1px solid var(--border-light, #1E293B);
            background: var(--bg-input, #1a1f2e); color: var(--text-primary);
            font-size: 14px; outline: none; margin-bottom: 8px;
            -webkit-appearance: none; appearance: none;
            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='%239CA3AF' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: right 12px center;
        }
        .liq-warehouse-select:focus { border-color: var(--accent, #F97316); }
        .liq-search {
            width: 100%; padding: 10px 14px; border-radius: 10px;
            border: 1px solid var(--border-light, #1E293B);
            background: var(--bg-input, #1a1f2e); color: var(--text-primary);
            font-size: 14px; outline: none;
        }
        .liq-search:focus { border-color: var(--accent, #F97316); }

        .liq-table-wrap {
            flex: 1; overflow: auto; padding: 0 0 120px;
            -webkit-overflow-scrolling: touch;
        }
        .liq-loading { text-align: center; padding: 60px 20px; color: var(--text-secondary); }

        .dss-red { color: #EF4444; }
        .dss-orange { color: #F97316; }
        .dss-yellow { color: #EAB308; }

        /* Table */
        .liq-tbl {
            width: 100%; border-collapse: collapse; font-size: 12px;
            min-width: 1100px;
        }
        .liq-tbl thead { position: sticky; top: 0; z-index: 2; }
        .liq-tbl th {
            background: var(--bg-card, #131929); color: var(--text-secondary, #64748B);
            padding: 8px 6px; text-align: left; font-weight: 600; font-size: 11px;
            border-bottom: 2px solid var(--border-light, #1E293B);
            white-space: nowrap; user-select: none;
        }
        .liq-th-sort { cursor: pointer; }
        .liq-th-sort:hover { color: var(--accent, #F97316); }
        .liq-th-num { text-align: right; }

        .liq-tbl td {
            padding: 7px 6px; border-bottom: 1px solid rgba(30,41,59,0.5);
            vertical-align: middle; color: var(--text-primary);
        }
        .liq-tbl tbody tr:hover { background: rgba(249,115,22,0.05); }

        .liq-row-red { border-left: 3px solid #EF4444; }
        .liq-row-orange { border-left: 3px solid #F97316; }
        .liq-row-yellow { border-left: 3px solid #EAB308; }

        .liq-td-article { font: 700 12px 'JetBrains Mono', monospace; color: var(--accent, #F97316); white-space: nowrap; }
        .liq-td-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary, #64748B); font-size: 11px; }
        .liq-td-wh { font-size: 11px; color: var(--text-secondary, #64748B); white-space: nowrap; }
        .liq-td-num { text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 12px; white-space: nowrap; }
        .liq-td-abc { text-align: center; font: 700 12px 'JetBrains Mono', monospace; }
        .liq-td-input { padding: 4px 2px; }

        .liq-price-input {
            width: 70px; padding: 4px 6px; border-radius: 6px;
            border: 1px solid var(--border-light, #1E293B);
            background: var(--bg-input, #1a1f2e); color: var(--text-primary);
            font: 12px 'JetBrains Mono', monospace; text-align: right;
        }
        .liq-price-input:focus { border-color: var(--accent, #F97316); outline: none; }

        .liq-td-actions { min-width: 130px; }
        .liq-act-group { display: flex; gap: 3px; }
        .liq-act-btn {
            width: 32px; height: 30px; border-radius: 4px;
            border: 1px solid var(--border-light, #1E293B);
            background: var(--bg-input, #1a1f2e);
            font-size: 14px; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.15s; touch-action: manipulation;
        }
        .liq-act-btn:hover { transform: scale(1.15); }
        .liq-act-price { color: #22C55E; border-color: rgba(34,197,94,0.3); }
        .liq-act-destroy { color: #EF4444; border-color: rgba(239,68,68,0.3); }
        .liq-act-move { color: #3B82F6; border-color: rgba(59,130,246,0.3); }
        .liq-act-price:hover { background: rgba(34,197,94,0.1); }
        .liq-act-destroy:hover { background: rgba(239,68,68,0.1); }
        .liq-act-move:hover { background: rgba(59,130,246,0.1); }
        .liq-act-price.liq-act-sel { border-color: #22C55E; background: rgba(34,197,94,0.25); box-shadow: 0 0 10px rgba(34,197,94,0.4); }
        .liq-act-destroy.liq-act-sel { border-color: #EF4444; background: rgba(239,68,68,0.25); box-shadow: 0 0 10px rgba(239,68,68,0.4); }
        .liq-act-move.liq-act-sel { border-color: #3B82F6; background: rgba(59,130,246,0.25); box-shadow: 0 0 10px rgba(59,130,246,0.4); }

        /* Пульсирующая кнопка — подсказка советника рекомендует это действие */
        .liq-act-btn.liq-act-pulse { animation: liqPulse 1.8s ease-in-out infinite; }
        @keyframes liqPulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0); }
            50% { box-shadow: 0 0 0 6px rgba(201,168,76,0.25); border-color: #c9a84c; }
        }

        /* Всплывающая подсказка советника под кнопками */
        .liq-advisor-tip {
            position: absolute; z-index: 50;
            top: 100%; right: 0; margin-top: 4px;
            min-width: 240px; max-width: 320px;
            background: linear-gradient(135deg, #f4e4c1, #ecdab0);
            border: 2px solid #8b6914; border-radius: 6px;
            padding: 8px 10px; font: 500 11px 'Inter', sans-serif; color: #2c1810;
            box-shadow: 0 4px 14px rgba(0,0,0,0.35);
            opacity: 0; pointer-events: none; transition: opacity 0.2s;
            line-height: 1.35;
        }
        .liq-td-actions { position: relative; }
        .liq-td-actions:hover .liq-advisor-tip { opacity: 1; pointer-events: auto; }
        .liq-advisor-tip::before {
            content: '🧙'; margin-right: 4px;
        }
        .liq-advisor-tip b { color: #8b1a1a; }

        /* === 4 состояния cross-sales tooltip === */

        /* Заголовок списка */
        .liq-advisor-tip .cross-list-title {
            font: 700 11px 'Cinzel', serif;
            color: #5c4033;
            padding-bottom: 4px;
            margin-bottom: 6px;
            border-bottom: 1px dashed #b8a88a;
        }

        /* Список складов */
        .liq-advisor-tip .cross-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        .liq-advisor-tip .cross-list li {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 3px 0;
            font: 500 11px 'Inter', sans-serif;
        }
        .liq-advisor-tip .cross-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #16A34A;
            flex-shrink: 0;
        }
        .liq-advisor-tip .cross-wh {
            flex: 1;
            color: #2c1810;
        }
        .liq-advisor-tip .cross-stats {
            font: 600 11px 'JetBrains Mono', monospace;
            color: #5c4033;
        }

        /* Совет о перемещении (опционально внутри списка) */
        .liq-advisor-tip .cross-advice {
            margin-top: 8px;
            padding-top: 6px;
            border-top: 1px dashed #b8a88a;
            font: 500 11px 'Inter', sans-serif;
            color: #2c1810;
        }
        .liq-advisor-tip .cross-advice b {
            color: #8b1a1a;
        }

        /* Состояние загрузки */
        .liq-advisor-tip .cross-loading {
            font: 500 11px 'Inter', sans-serif;
            color: #5c4033;
        }
        .liq-advisor-tip .cross-dots::after {
            content: '';
            display: inline-block;
            width: 14px;
            text-align: left;
            animation: crossDots 1.2s steps(4, end) infinite;
        }
        @keyframes crossDots {
            0%   { content: ''; }
            25%  { content: '.'; }
            50%  { content: '..'; }
            75%  { content: '...'; }
            100% { content: ''; }
        }

        /* Состояние ошибки */
        .liq-advisor-tip .cross-error-title {
            font: 700 11px 'Inter', sans-serif;
            color: #8b1a1a;
            margin-bottom: 4px;
        }
        .liq-advisor-tip .cross-error-hint {
            font: 500 10px 'Inter', sans-serif;
            color: #5c4033;
        }

        /* Состояние "нигде не продаётся" */
        .liq-advisor-tip .cross-empty {
            font: 500 11px 'Inter', sans-serif;
            color: #5c4033;
            font-style: italic;
        }

        .liq-act-detail { margin-top: 4px; }
        .liq-act-comment {
            width: 100%; padding: 3px 6px; margin-top: 3px;
            background: var(--bg-input, #1a1f2e); border: 1px solid var(--border-light, #1E293B);
            border-radius: 4px; color: var(--text-primary); font: 400 10px 'Inter', sans-serif;
            outline: none;
        }
        .liq-act-comment:focus { border-color: var(--accent, #F97316); }
        .liq-act-select {
            width: 100%; padding: 3px 6px;
            background: var(--bg-input, #1a1f2e); border: 1px solid #3B82F6;
            border-radius: 4px; color: var(--text-primary); font: 400 10px 'Inter', sans-serif;
            outline: none; -webkit-appearance: none;
        }

        /* Bottom bar */
        .liq-bottom-bar {
            padding: 8px 16px; flex-shrink: 0;
            background: var(--bg-card, #131929); border-top: 2px solid var(--accent, #F97316);
            display: flex; align-items: center; justify-content: space-between;
        }
        .liq-bottom-stats {
            display: flex; gap: 16px;
            font: 500 12px 'Inter', sans-serif; color: var(--text-secondary);
        }
        .liq-bottom-stats strong { color: var(--text-primary); font-family: 'JetBrains Mono', monospace; }
        .liq-apply-btn {
            padding: 10px 24px;
            background: linear-gradient(135deg, var(--accent, #F97316), #EA580C);
            color: white; border: none; border-radius: 8px;
            font: 700 13px 'Exo 2', sans-serif; cursor: pointer;
            letter-spacing: 0.5px; touch-action: manipulation;
        }
        .liq-apply-btn:active { transform: scale(0.97); }

        .liq-discount { font-weight: 700; }

        /* ===== Decree Scroll (Свиток указа) ===== */
        .decree-overlay {
            position: fixed; inset: 0; z-index: 99999;
            background: rgba(0,0,0,0.75);
            display: flex; align-items: center; justify-content: center;
            animation: decreeOverlayIn 0.3s ease;
        }
        @keyframes decreeOverlayIn { from { opacity: 0; } to { opacity: 1; } }

        .decree-scroll {
            width: 420px; max-width: 92vw; max-height: 88vh;
            display: flex; flex-direction: column; align-items: center;
            animation: decreeScrollIn 0.5s ease;
        }
        @keyframes decreeScrollIn {
            from { opacity: 0; transform: scale(0.85) translateY(30px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }

        .decree-scroll-top, .decree-scroll-bottom {
            width: 100%; height: 20px;
            background: linear-gradient(180deg, #8b6914, #a07828, #8b6914);
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,215,0,0.3);
            position: relative; z-index: 2;
        }
        .decree-scroll-bottom { box-shadow: 0 -2px 8px rgba(0,0,0,0.4), inset 0 -1px 0 rgba(255,215,0,0.3); }

        .decree-body {
            width: calc(100% - 16px); margin: 0 8px;
            background:
                radial-gradient(ellipse at 30% 20%, rgba(200,180,140,0.5) 0%, transparent 60%),
                linear-gradient(180deg, #f0ddb8, #f4e4c1, #ecdab0, #f4e4c1, #f0ddb8);
            padding: 28px 32px;
            box-shadow: inset 0 0 30px rgba(139,107,55,0.15), 4px 0 12px rgba(0,0,0,0.2), -4px 0 12px rgba(0,0,0,0.2);
            overflow-y: auto; max-height: calc(88vh - 80px);
            position: relative; z-index: 1;
        }

        .decree-seal { text-align: center; font-size: 40px; margin-bottom: 8px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }

        .decree-heading {
            text-align: center; font: 800 22px 'Exo 2', serif;
            color: #2c1810; letter-spacing: 4px; margin-bottom: 4px;
        }

        .decree-subheading {
            text-align: center; font: 400 11px 'Inter', serif;
            color: #8b7355; margin-bottom: 12px;
        }

        .decree-divider {
            text-align: center; color: #c9a84c; font-size: 14px;
            letter-spacing: 8px; margin: 12px 0; opacity: 0.6;
        }

        .decree-date {
            text-align: center; font: 600 12px 'Inter', serif;
            color: #5c4033; margin-bottom: 12px; font-style: italic;
        }

        .decree-intro {
            font: 400 13px 'Inter', serif; color: #2c1810;
            line-height: 1.6; margin-bottom: 16px; text-align: center;
        }

        .decree-list { margin-bottom: 12px; }

        .decree-item {
            display: flex; gap: 8px; padding: 10px 0;
            border-bottom: 1px dotted #c4b090;
        }
        .decree-item:last-child { border-bottom: none; }

        .decree-item-num {
            font: 700 14px 'JetBrains Mono', monospace; color: #8b6914;
            min-width: 20px; padding-top: 2px;
        }

        .decree-item-body { display: flex; gap: 8px; flex: 1; }

        .decree-item-icon { font-size: 20px; flex-shrink: 0; padding-top: 2px; }

        .decree-item-content { flex: 1; }

        .decree-item-text { font: 500 13px 'Inter', sans-serif; color: #2c1810; line-height: 1.5; }

        .decree-item-detail { font: 400 11px 'Inter', sans-serif; color: #8b7355; margin-top: 2px; }

        .decree-item-comment {
            font: 400 11px 'Inter', sans-serif; color: #5c4033;
            font-style: italic; margin-top: 3px;
        }

        .decree-footer { text-align: center; margin-top: 8px; }

        .decree-stamp {
            display: inline-block; padding: 6px 16px;
            background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3);
            border-radius: 4px; color: #2d5a27; font: 600 12px 'Inter', sans-serif;
            margin-bottom: 12px;
        }

        .decree-signature {
            font: 600 13px 'Exo 2', serif; color: #8b7355;
            letter-spacing: 2px;
        }

        .decree-close-btn {
            margin-top: 12px; padding: 10px 28px;
            background: linear-gradient(180deg, #c9a84c, #8b6914);
            color: #2c1810; border: 1px solid #ffd700; border-radius: 4px;
            font: 700 13px 'Exo 2', serif; cursor: pointer;
            letter-spacing: 1px; text-shadow: 0 1px 0 rgba(255,255,255,0.3);
            transition: all 0.2s;
        }
        .decree-close-btn:hover { box-shadow: 0 4px 16px rgba(201,168,76,0.4); transform: translateY(-1px); }

        /* Mode switcher */
        .liq-mode-switch { display: flex; border: 1px solid var(--border-light, #1E293B); border-radius: 6px; overflow: hidden; }
        .liq-mode-btn {
            padding: 4px 12px; font: 600 11px 'Exo 2', sans-serif;
            color: var(--text-secondary); background: var(--bg-input, #1a1f2e);
            border: none; cursor: pointer; transition: all 0.2s;
        }
        .liq-mode-btn.active { background: var(--accent, #F97316); color: white; }

        /* Table mode container */
        .liq-table-mode { display: flex; flex-direction: column; flex: 1; overflow: hidden; }

        /* Map mode */
        .liq-map-mode { flex: 1; overflow: hidden; display: flex; }
        .liq-map-layout { display: flex; width: 100%; height: 100%; }

        /* Map area — AI generated background */
        .liq-map-area {
            flex: 1; position: relative; overflow: hidden; min-height: 0;
            background: url('/map.jpg') center center / contain no-repeat, #1a1510 !important;
            color: #2c1810 !important;
        }
        .liq-map-area * { color: inherit; }

        .liq-map-border {
            position: absolute; inset: 6px;
            border: 2px solid #8b7355; pointer-events: none; z-index: 2;
        }
        .liq-map-border::before { content: ''; position: absolute; inset: 3px; border: 1px solid rgba(139,107,55,0.3); }

        .liq-map-cartouche {
            position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 3;
            text-align: center; padding: 6px 24px;
            background: linear-gradient(180deg, #f4e4c1, #d4c4a1);
            border: 2px solid #8b6914; border-radius: 2px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.12);
        }
        .liq-map-cartouche-title { font: 700 12px 'Exo 2', serif; color: #2c1810 !important; letter-spacing: 2px; }
        .liq-map-cartouche-sub { font: 400 9px 'Inter'; color: #8b7355 !important; margin-top: 1px; }

        .liq-terrain {
            position: absolute; inset: 8px;
            width: calc(100% - 16px); height: calc(100% - 16px);
            z-index: 0; pointer-events: none;
        }

        /* Castle markers */
        .liq-castle {
            position: absolute; display: flex; flex-direction: column; align-items: center;
            cursor: pointer; z-index: 5; transition: transform 0.2s;
        }
        .liq-castle:hover { transform: scale(1.1); }
        .liq-castle.active .castle-icon { filter: drop-shadow(0 0 8px #c9a84c) drop-shadow(0 0 16px rgba(201,168,76,0.4)); }
        .castle-hitbox { width: 100px; height: 100px; cursor: pointer; }
        .liq-castle.active .castle-hitbox { box-shadow: 0 0 20px rgba(201,168,76,0.6); border-radius: 50%; background: rgba(201,168,76,0.15); }
        .castle-name { font: 700 10px 'Exo 2', serif; color: #2c1810 !important; text-shadow: 0 0 4px #f4e4c1; margin-top: 1px; white-space: nowrap; }
        .castle-stats { display: flex; gap: 3px; margin-top: 1px; }
        .castle-stat {
            font: 600 9px 'JetBrains Mono', monospace; padding: 0px 4px;
            border-radius: 3px; background: rgba(244,228,193,0.9); border: 1px solid;
        }
        .castle-stat.red { color: #8b1a1a !important; border-color: #8b1a1a; }
        .castle-stat.orange { color: #b45309 !important; border-color: #b45309; }
        .castle-frozen {
            font: 600 9px 'JetBrains Mono', monospace; color: #8b1a1a !important;
            background: rgba(244,228,193,0.9); padding: 0px 5px; border-radius: 3px;
            margin-top: 1px; border: 1px solid rgba(139,26,26,0.3);
        }

        /* Map right panel */
        .liq-map-panel {
            width: 55%; background: var(--bg-primary, #0A0F1C);
            border-left: 2px solid var(--accent, #F97316);
            display: flex; flex-direction: column; overflow: hidden;
        }
        .liq-map-panel-placeholder {
            display: flex; align-items: center; justify-content: center;
            height: 100%; color: var(--text-secondary); font: 500 14px 'Exo 2', sans-serif;
        }
        .liq-map-panel-header {
            padding: 10px 14px; background: var(--bg-card, #131929);
            border-bottom: 1px solid var(--border-light, #1E293B);
        }
        .liq-map-panel-title { font: 700 15px 'Exo 2', sans-serif; color: var(--accent, #F97316); }
        .liq-map-panel-sub { font: 400 11px 'Inter'; color: var(--text-secondary); margin-top: 2px; }
        .liq-map-panel-filters {
            display: flex; gap: 4px; padding: 8px 14px;
            background: var(--bg-card, #131929); border-bottom: 1px solid var(--border-light, #1E293B);
        }
        .liq-map-panel-table { flex: 1; overflow: auto; }

        /* Campaign Progress — пергаментный свиток поверх карты */
        .liq-campaign {
            position: absolute; top: 10px; right: 10px; z-index: 10;
            background: linear-gradient(135deg, #d4c4a1, #c4b491, #b8a480);
            border: 3px solid #8b6914; border-radius: 6px; padding: 10px 14px; width: 240px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,215,0,0.2), inset 0 0 20px rgba(139,105,20,0.1);
        }
        .liq-camp-title {
            font: 700 11px 'Cinzel', serif; color: #2c1810;
            display: flex; justify-content: space-between; align-items: center;
        }
        .liq-camp-pct { font: 900 14px 'JetBrains Mono', monospace; color: #5a3a10; }
        .liq-camp-bar {
            height: 18px; background: rgba(44,24,16,0.2); border: 2px solid #8b6914;
            border-radius: 3px; margin: 6px 0; position: relative; overflow: hidden;
        }
        .liq-camp-fill {
            height: 100%; border-radius: 1px; transition: width 0.5s;
            background: linear-gradient(90deg, #8b1a1a 0%, #c9a84c 60%, #22C55E 100%);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
        }
        .liq-camp-text {
            position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
            font: 700 9px 'JetBrains Mono', monospace; color: #2c1810; text-shadow: 0 0 3px rgba(244,228,193,0.8);
        }
        .liq-camp-stats { display: flex; gap: 3px; }
        .liq-camp-stat {
            flex: 1; text-align: center; padding: 4px 2px;
            background: rgba(44,24,16,0.1); border: 1px solid rgba(139,105,20,0.25);
            border-radius: 3px;
        }
        .liq-camp-n { font: 700 13px 'JetBrains Mono', monospace; color: #2c1810; }
        .liq-camp-l { font: 400 8px 'Inter', sans-serif; color: #5c4033; }

        /* Castle mini progress — деревянный бар внизу карты */
        .liq-castle-progress {
            position: absolute; bottom: 0; left: 0; right: 0; z-index: 10;
            display: flex; gap: 0;
            background: linear-gradient(180deg, #3a2a1a, #2a1e12, #1e1510);
            border-top: 3px solid #5c4c3c; height: 56px; padding: 6px 8px;
            box-shadow: 0 -4px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(139,107,55,0.2);
        }
        .liq-cp-item {
            flex: 1; text-align: center; cursor: pointer; transition: all 0.2s;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            padding: 2px 4px; border-right: 2px solid rgba(92,76,60,0.4); position: relative;
        }
        .liq-cp-item:last-child { border-right: none; }
        .liq-cp-item:hover { background: rgba(201,168,76,0.08); }
        .liq-cp-item.active { background: rgba(201,168,76,0.12); }
        .liq-cp-item.active .liq-cp-name { color: #c9a84c; }
        .liq-cp-name { font: 700 9px 'Cinzel', serif; color: #b8a480; white-space: nowrap; overflow: hidden; transition: all 0.2s; letter-spacing: 0.5px; }
        .liq-cp-bar { width: 80%; height: 5px; background: rgba(0,0,0,0.4); border-radius: 2px; margin: 4px 0 2px; border: 1px solid rgba(92,76,60,0.3); }
        .liq-cp-fill { height: 100%; border-radius: 1px; transition: width 0.3s; box-shadow: 0 0 4px currentColor; }
        .liq-cp-pct { font: 700 11px 'JetBrains Mono', monospace; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }

        /* Advisor */
        .liq-advisor {
            position: absolute; bottom: 70px; left: 15px; z-index: 10;
            display: flex; align-items: flex-end; gap: 10px;
            max-width: 320px;
        }

        .advisor-face-wrap {
            position: relative; cursor: pointer; flex-shrink: 0;
        }

        .advisor-face {
            width: 72px; height: 100px;
            display: flex; align-items: center; justify-content: center;
            background: linear-gradient(180deg, #d4c4a1, #c4b491);
            border: 3px solid #8b6914;
            border-radius: 8px 8px 4px 4px;
            box-shadow: 0 4px 16px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,215,0,0.2);
            transition: transform 0.3s;
            padding: 2px;
            overflow: hidden;
        }

        .advisor-face:hover { transform: scale(1.08); }
        .advisor-face img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px 6px 2px 2px; }

        .advisor-speaking {
            animation: advisorBounce 0.4s ease infinite alternate;
        }

        @keyframes advisorBounce {
            from { transform: scale(1) translateY(0); }
            to { transform: scale(1.08) translateY(-3px); }
        }

        .advisor-mood-ring {
            position: absolute; inset: -4px;
            border-radius: 50%;
            border: 2px solid transparent;
            animation: moodPulse 2s ease infinite;
        }

        .advisor-mood-happy { border-color: #22C55E; box-shadow: 0 0 12px rgba(34,197,94,0.4); }
        .advisor-mood-neutral { border-color: #c9a84c; box-shadow: 0 0 8px rgba(201,168,76,0.3); }
        .advisor-mood-worried { border-color: #F97316; box-shadow: 0 0 12px rgba(249,115,22,0.4); }
        .advisor-mood-angry { border-color: #EF4444; box-shadow: 0 0 12px rgba(239,68,68,0.4); }

        @keyframes moodPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .advisor-speech {
            background: linear-gradient(135deg, #f4e4c1, #ecdab0);
            border: 2px solid #8b6914;
            border-radius: 8px;
            padding: 8px 12px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
            position: relative;
            max-width: 240px;
        }

        .advisor-speech::before {
            content: '';
            position: absolute; left: -8px; bottom: 16px;
            border: 6px solid transparent;
            border-right-color: #8b6914;
        }

        .advisor-title {
            font: 700 11px 'Exo 2', serif;
            color: #2c1810 !important;
            margin-bottom: 4px;
        }

        .advisor-advice {
            font: 400 11px 'Inter', sans-serif;
            color: #5c4033 !important;
            line-height: 1.5;
        }

        .advisor-advice b { color: #2c1810 !important; }

        .advisor-speak-btn {
            position: absolute; top: 4px; right: 4px;
            background: none; border: none; font-size: 14px;
            cursor: pointer; opacity: 0.5; transition: opacity 0.2s;
        }
        .advisor-speak-btn:hover { opacity: 1; }
        .liq-disc-green { color: #22C55E; }
        .liq-disc-red { color: #EF4444; }

        /* Action buttons bar */
        .liq-actions {
            display: flex; gap: 8px; padding: 8px 16px; flex-shrink: 0;
            background: var(--bg-card, #131929);
            border-bottom: 1px solid var(--border-light, #1E293B);
        }
        .liq-action-btn {
            flex: 1; padding: 12px 16px; border-radius: 10px;
            font: 600 14px 'Exo 2', sans-serif; cursor: pointer;
            display: flex; align-items: center; justify-content: center; gap: 6px;
            touch-action: manipulation; -webkit-tap-highlight-color: transparent;
            border: none;
        }
        .liq-action-btn:active { transform: scale(0.97); }
        .liq-action-export { background: rgba(34,197,94,0.15); color: #22C55E; }
        .liq-action-export:active { background: rgba(34,197,94,0.3); }
        .liq-action-ai { background: rgba(139,92,246,0.15); color: #A78BFA; }
        .liq-action-ai:active { background: rgba(139,92,246,0.3); }

        /* AI result panel */
        .liq-ai-result {
            position: fixed; bottom: 0; left: 0; right: 0; z-index: 10001;
            max-height: 60vh; overflow-y: auto;
            background: var(--bg-primary, #0A0F1C);
            border-top: 2px solid #A78BFA;
            box-shadow: 0 -8px 30px rgba(0,0,0,0.5);
        }
        .liq-ai-header {
            display: flex; justify-content: space-between; align-items: center;
            padding: 12px 16px; background: rgba(139,92,246,0.1);
            font: 600 14px 'Exo 2', sans-serif; color: #A78BFA;
            position: sticky; top: 0; z-index: 1;
        }
        .liq-ai-close {
            background: none; border: none; color: var(--text-secondary); font-size: 18px;
            cursor: pointer; padding: 4px 8px;
        }
        .liq-ai-body {
            padding: 16px; font-size: 13px; line-height: 1.7; color: var(--text-primary);
        }
        .liq-ai-body h2, .liq-ai-body h3, .liq-ai-body h4 { color: var(--accent, #F97316); margin: 16px 0 8px; font-family: 'Exo 2', sans-serif; }
        .liq-ai-body h3 { font-size: 15px; }
        .liq-ai-body h4 { font-size: 13px; }
        .liq-ai-body strong { color: var(--text-primary); }
        .liq-ai-loading { text-align: center; padding: 24px; color: #A78BFA; font-size: 14px; }

        .liq-ai-table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 12px; }
        .liq-ai-table th { text-align: left; padding: 6px 8px; color: var(--text-secondary); border-bottom: 1px solid var(--border-light, #1E293B); font-size: 11px; }
        .liq-ai-table td { padding: 6px 8px; border-bottom: 1px solid rgba(30,41,59,0.3); }

        /* ========================================================
           🧪 Лаборатория WERK — оверлей-стенд для integration_n8n
           ======================================================== */
        .lab-overlay {
            position: fixed; inset: 0; z-index: 9999;
            background: var(--bg-primary, #0A0F1C);
            display: flex; flex-direction: column;
            transform: translateX(100%); transition: transform 0.3s ease;
            overflow: hidden;
            overscroll-behavior: none;
        }
        .lab-overlay.show { transform: translateX(0); }

        .lab-container {
            display: flex; flex-direction: column;
            height: 100%;
            min-height: 0;
            overflow: hidden;
        }

        .lab-header {
            display: flex; align-items: center; gap: 12px;
            padding: 16px 20px;
            padding-top: calc(16px + env(safe-area-inset-top, 0px));
            background: linear-gradient(135deg, rgba(139,92,246,0.18) 0%, rgba(249,115,22,0.10) 100%);
            border-bottom: 1px solid var(--border-light, #1E293B);
            flex-shrink: 0;
        }
        .lab-back {
            background: none; border: none; color: var(--text-primary); font-size: 22px;
            cursor: pointer; padding: 4px 8px; min-width: 44px; min-height: 44px;
            display: flex; align-items: center; justify-content: center;
        }
        .lab-title-wrap { flex: 1; min-width: 0; }
        .lab-title {
            font: 700 18px 'Exo 2', sans-serif;
            color: var(--text-primary, #F8FAFC);
            line-height: 1.1;
        }
        .lab-subtitle {
            font: 500 11px 'Inter', sans-serif;
            color: var(--text-muted, #94A3B8);
            margin-top: 2px;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .lab-badge {
            font: 700 10px 'Inter', sans-serif;
            letter-spacing: 1px;
            color: #FCD34D;
            background: rgba(252,211,77,0.12);
            border: 1px solid rgba(252,211,77,0.35);
            padding: 4px 8px; border-radius: 6px;
            flex-shrink: 0;
        }

        .lab-body {
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            padding: 20px 16px;
            padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
        }

        .lab-section-title {
            font: 700 13px 'Exo 2', sans-serif;
            letter-spacing: 0.5px;
            color: var(--text-secondary, #CBD5E1);
            text-transform: uppercase;
            margin: 0 4px 12px;
        }

        .lab-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }
        @media (min-width: 720px) {
            .lab-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        }

        .lab-tile {
            position: relative;
            display: flex; flex-direction: column; gap: 10px;
            text-align: left;
            padding: 14px 14px 12px;
            min-height: 132px;
            background: var(--bg-card, #131929);
            border: 1px solid var(--border-light, #1E293B);
            border-radius: 14px;
            color: var(--text-primary, #F8FAFC);
            cursor: pointer;
            transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
            box-sizing: border-box;
            overflow: hidden;
        }
        .lab-tile::before {
            content: '';
            position: absolute; left: 0; top: 0; bottom: 0;
            width: 3px;
            background: var(--lab-accent, #F97316);
            opacity: 0.85;
        }
        .lab-tile:active { transform: scale(0.97); }
        .lab-tile:hover { border-color: var(--lab-accent, #F97316); background: var(--bg-input, #1a1f2e); }

        .lab-tile-icon {
            width: 40px; height: 40px;
            display: flex; align-items: center; justify-content: center;
            border-radius: 10px;
            font-size: 22px; line-height: 1;
            flex-shrink: 0;
        }
        .lab-tile-text { flex: 1; min-width: 0; }
        .lab-tile-title {
            font: 700 14px 'Exo 2', sans-serif;
            line-height: 1.2;
            margin-bottom: 4px;
            white-space: normal;
        }
        .lab-tile-sub {
            font: 500 11px 'Inter', sans-serif;
            color: var(--text-muted, #94A3B8);
            line-height: 1.35;
        }
        .lab-tile-status {
            position: absolute; top: 10px; right: 10px;
            font: 700 9px 'Inter', sans-serif;
            letter-spacing: 0.5px;
            padding: 3px 6px;
            border-radius: 5px;
            text-transform: uppercase;
        }
        .lab-tile-status.live { color: #34D399; background: rgba(52,211,153,0.12); }
        .lab-tile-status.idea { color: #94A3B8; background: rgba(148,163,184,0.10); }

        .lab-footer-note {
            margin-top: 24px;
            padding: 14px 16px;
            background: rgba(139,92,246,0.06);
            border: 1px dashed rgba(139,92,246,0.35);
            border-radius: 10px;
            font: 500 12px 'Inter', sans-serif;
            color: var(--text-secondary, #CBD5E1);
            line-height: 1.55;
        }
        .lab-footer-note b { color: #C4B5FD; }

        /* ──────── Дефицит-лист (экран в Лабе) ──────── */
        .def-filters {
            display: flex; gap: 8px; padding: 10px 16px;
            background: var(--bg-card, #131929);
            border-bottom: 1px solid var(--border-light, #1E293B);
            flex-shrink: 0;
            overflow-x: auto;
        }
        .def-filters select {
            background: var(--bg-input, #1a1f2e);
            border: 1px solid var(--border-light, #1E293B);
            color: var(--text-primary);
            border-radius: 8px;
            padding: 8px 12px;
            font: 500 13px 'Inter', sans-serif;
            min-height: 40px;
            flex-shrink: 0;
        }
        .def-stats {
            display: flex; gap: 8px;
            margin-bottom: 14px;
        }
        .def-stat-card {
            flex: 1;
            background: var(--bg-card, #131929);
            border: 1px solid var(--border-light, #1E293B);
            border-radius: 10px;
            padding: 12px;
            text-align: center;
        }
        .def-stat-val {
            font: 700 22px 'JetBrains Mono', monospace;
            color: #F43F5E;
            line-height: 1;
        }
        .def-stat-lbl {
            font: 500 11px 'Inter', sans-serif;
            color: var(--text-muted, #94A3B8);
            margin-top: 4px;
        }
        .def-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
            background: var(--bg-card, #131929);
            border-radius: 10px;
            overflow: hidden;
        }
        .def-table th {
            text-align: left;
            padding: 10px 12px;
            font: 700 11px 'Inter', sans-serif;
            color: var(--text-muted, #94A3B8);
            background: var(--bg-input, #1a1f2e);
            border-bottom: 1px solid var(--border-light, #1E293B);
            text-transform: uppercase;
            letter-spacing: 0.4px;
        }
        .def-table td {
            padding: 10px 12px;
            border-bottom: 1px solid rgba(30,41,59,0.4);
            color: var(--text-primary);
        }
        .def-table tr:last-child td { border-bottom: none; }
        .def-table tbody tr:hover { background: var(--bg-input, #1a1f2e); }
        .def-loading {
            text-align: center;
            padding: 32px 16px;
            color: var(--text-muted, #94A3B8);
            font: 500 14px 'Inter', sans-serif;
        }

        /* Кнопка ⓘ */
        .def-info-btn {
            background: rgba(99,102,241,0.15);
            border: 1px solid rgba(99,102,241,0.4);
            color: #A5B4FC;
            font: 700 16px 'Inter', sans-serif;
            border-radius: 8px;
            padding: 0;
            min-width: 36px; min-height: 36px;
            cursor: pointer;
            flex-shrink: 0;
        }
        .def-info-btn:hover { background: rgba(99,102,241,0.3); }

        /* Тоггл «Только важное» */
        .def-toggle {
            display: flex; align-items: center; gap: 8px;
            background: var(--bg-input, #1a1f2e);
            border: 1px solid var(--border-light, #1E293B);
            border-radius: 8px;
            padding: 0 12px;
            cursor: pointer;
            color: var(--text-primary);
            font: 600 12px 'Inter', sans-serif;
            white-space: nowrap;
            min-height: 40px;
            flex-shrink: 0;
        }
        .def-toggle input { width: 16px; height: 16px; cursor: pointer; }

        /* Бэйджи в таблице */
        .def-badge {
            display: inline-block;
            font: 700 10px 'Inter', sans-serif;
            letter-spacing: 0.4px;
            text-transform: uppercase;
            padding: 3px 7px;
            border-radius: 5px;
            white-space: nowrap;
        }
        .def-badge-orange { background: rgba(249,115,22,0.15);  color: #FB923C; border: 1px solid rgba(249,115,22,0.35); }
        .def-badge-blue   { background: rgba(59,130,246,0.15);  color: #93C5FD; border: 1px solid rgba(59,130,246,0.35); }
        .def-badge-gray   { background: rgba(148,163,184,0.10); color: #94A3B8; border: 1px solid rgba(148,163,184,0.25); }

        .def-hidden-note {
            margin: 0 0 12px;
            padding: 10px 14px;
            background: rgba(148,163,184,0.08);
            border-left: 3px solid #94A3B8;
            border-radius: 8px;
            font: 500 12px 'Inter', sans-serif;
            color: var(--text-secondary, #CBD5E1);
        }
        .def-hidden-note b { color: var(--text-primary); }

        /* ─── Шпаргалка «Как это считается» ─── */
        .def-help {
            background: var(--bg-card, #131929);
            border-bottom: 2px solid #6366F1;
            max-height: 70vh;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
        }
        .def-help-inner {
            padding: 20px 18px;
            font: 500 13px 'Inter', sans-serif;
            line-height: 1.55;
            color: var(--text-secondary, #CBD5E1);
        }
        .def-help-title {
            font: 700 18px 'Exo 2', sans-serif;
            color: var(--text-primary, #F8FAFC);
            margin-bottom: 12px;
        }
        .def-help-section {
            background: rgba(99,102,241,0.05);
            border: 1px solid rgba(99,102,241,0.15);
            border-radius: 10px;
            padding: 14px 16px;
            margin-bottom: 12px;
        }
        .def-help-h {
            font: 700 13px 'Exo 2', sans-serif;
            color: #A5B4FC;
            margin-bottom: 8px;
            letter-spacing: 0.3px;
        }
        .def-help-section p { margin: 6px 0; }
        .def-help-list {
            margin: 6px 0 0;
            padding-left: 22px;
        }
        .def-help-list li { margin: 6px 0; }
        .def-help-list li b { color: var(--text-primary, #F8FAFC); }
        .def-help-close {
            display: block;
            width: 100%;
            margin-top: 12px;
            padding: 12px;
            background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
            border: none;
            border-radius: 10px;
            color: #fff;
            font: 700 14px 'Exo 2', sans-serif;
            cursor: pointer;
        }
        .def-help-close:active { transform: scale(0.98); }

        /* Кнопка входа на дашборде */
        .lab-dash-btn {
            display: none;
            width: 100%;
            padding: 14px 16px;
            background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
            border: none;
            border-radius: 12px;
            color: #fff;
            font: 700 15px 'Exo 2', sans-serif;
            cursor: pointer;
            box-shadow: 0 4px 16px rgba(139,92,246,0.3);
            transition: transform 0.15s ease;
            align-items: center;
            gap: 8px;
            justify-content: center;
        }
        .lab-dash-btn:active { transform: scale(0.98); }
