/**
 * PrintHouser Gang Sheet Builder Styles
 * @package PrintHouser_V3
 */

        .summary .price, .summary .product_meta, .summary .yith-wcwl-add-to-wishlist, .summary .single_add_to_cart_button, .summary .quantity { display: none !important; }
        
        /* Основен контейнер - Оригинален дизайн с надграждане */
        #ph-main-wrapper { background: #fff; border-radius: 40px; overflow: hidden; box-shadow: 0 25px 70px rgba(0,0,0,0.07); border: 1px solid #f1f5f9; max-width: 950px; margin: 20px auto; transition: 0.3s ease; }

        /* ===== TOP HEADER BAR (SaaS Pro Cap with 3D Depth) ===== */
        .ph-slider-subbar {
            background: linear-gradient(180deg, #1e293b 0%, #0f172a 60%, #0b1120 100%) !important;
            color: #ffffff !important;
            text-align: center !important;
            padding: 13px 24px !important;
            font-size: 13px !important;
            font-weight: 850 !important;
            letter-spacing: 2px !important;
            text-transform: uppercase !important;
            border-radius: 40px 40px 0 0 !important;
            border-bottom: 2px solid #00a0e9 !important;
            margin: 0 !important;
            line-height: 1.4 !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 9px !important;
            box-shadow: 0 6px 20px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
        }
        .ph-header-bolt {
            color: #00a0e9 !important;
            font-size: 14px !important;
            filter: drop-shadow(0 0 8px rgba(0, 160, 233, 0.7)) !important;
        }
        .ph-header-title {
            color: #ffffff !important;
            font-weight: 850 !important;
            letter-spacing: 2px !important;
        }

        /* ===== FLOATING PILL TICKER (3D POP EFFECT & NEON LOGO) ===== */
        .ph-ticker-wrap {
            margin: -12px 0 24px 0 !important;
            display: flex;
            justify-content: center;
            width: 100%;
            position: relative;
            z-index: 5;
        }
        .ph-ticker-pill {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 14px;
            width: 100%;
            max-width: 860px;
            background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
            border: 1px solid #e2e8f0;
            border-bottom: 2.5px solid #cbd5e1;
            border-radius: 999px;
            padding: 8px 20px 8px 12px;
            box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04), inset 0 1.5px 0 #ffffff, inset 0 -1.5px 0 rgba(226, 232, 240, 0.6);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            box-sizing: border-box;
            position: relative;
        }
        .ph-ticker-pill:hover {
            border-color: #cbd5e1;
            border-bottom-color: #94a3b8;
            box-shadow: 0 16px 36px -6px rgba(0, 160, 233, 0.2), 0 8px 16px -4px rgba(15, 23, 42, 0.08), inset 0 1.5px 0 #ffffff, inset 0 -1.5px 0 #cbd5e1;
            transform: translateY(-2px);
        }

        /* Neon Pulsing Round Logo */
        @keyframes ph-neon-pulse {
            0% {
                transform: scale(1);
                box-shadow: 0 0 0 0 rgba(0, 160, 233, 0.7), 0 0 10px rgba(0, 160, 233, 0.8), inset 0 0 8px rgba(0, 160, 233, 0.5);
                border-color: #00a0e9;
            }
            50% {
                transform: scale(1.08);
                box-shadow: 0 0 0 10px rgba(0, 160, 233, 0), 0 0 25px #00e5ff, 0 0 40px rgba(0, 160, 233, 0.6), inset 0 0 12px #00e5ff;
                border-color: #38bdf8;
            }
            100% {
                transform: scale(1);
                box-shadow: 0 0 0 0 rgba(0, 160, 233, 0), 0 0 10px rgba(0, 160, 233, 0.8), inset 0 0 8px rgba(0, 160, 233, 0.5);
                border-color: #00a0e9;
            }
        }
        .ph-ticker-logo-badge {
            width: 38px;
            height: 38px;
            min-width: 38px;
            min-height: 38px;
            border-radius: 50%;
            background: #ffffff;
            border: 2px solid #00a0e9;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            animation: ph-neon-pulse 1.8s infinite ease-in-out;
            cursor: pointer;
            position: relative;
            flex-shrink: 0;
            padding: 2px;
            box-sizing: border-box;
        }
        .ph-ticker-logo-badge img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 50%;
            display: block;
        }
        .ph-ticker-track-box {
            flex: 1;
            overflow: hidden;
            position: relative;
            min-height: 26px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .ph-slider-track {
            display: flex;
            transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
            will-change: transform;
            width: 100%;
        }
        .ph-slide {
            min-width: 100%;
            width: 100%;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 4px;
            box-sizing: border-box;
            background: transparent !important;
            margin: 0;
            min-height: auto;
        }
        .ph-slide::before {
            display: none !important;
        }
        .ph-slide-content {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
        }
        .ph-ticker-text {
            font-size: 13.5px !important;
            font-weight: 750 !important;
            color: #0f172a !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            line-height: 1.4 !important;
            letter-spacing: 0.1px !important;
            text-align: center !important;
        }
        .ph-ticker-controls {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            flex-shrink: 0;
            background: #f1f5f9;
            padding: 3px 6px;
            border-radius: 999px;
            border: 1px solid #e2e8f0;
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 0 #ffffff;
        }
        .ph-ticker-arrow {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #ffffff;
            border: 1px solid #cbd5e1;
            border-bottom: 1.5px solid #94a3b8;
            color: #475569;
            font-size: 13px;
            font-weight: 800;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            padding: 0;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), inset 0 1px 0 #ffffff;
        }
        .ph-ticker-arrow:hover {
            background: #00a0e9;
            border-color: #0284c7;
            border-bottom-color: #0369a1;
            color: #ffffff;
            transform: translateY(-1px) scale(1.05);
            box-shadow: 0 3px 8px rgba(0, 160, 233, 0.35);
        }
        .ph-ticker-arrow:active {
            transform: translateY(1px) scale(0.95);
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
        }
        .ph-ticker-indicator {
            font-size: 11.5px;
            font-weight: 800;
            color: #475569;
            padding: 0 6px;
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.5px;
            user-select: none;
        }
        #ph-ticker-current {
            color: #00a0e9;
            font-weight: 900;
        }
        
        #ph-app { padding: 45px; font-family: 'Inter', sans-serif !important; color: #1e293b; }
        
        .ph-grid { display: flex; gap: 15px; margin-bottom: 45px; }
        
        /* Ценови кутии с Hover ефект */
        .ph-box { flex: 1; background: #fff; padding: 18px 5px; border-radius: 20px; text-align: center; border: 1px solid #f1f5f9; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); cursor: default; }
        .ph-box:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,160,233,0.15); border-color: #e0f2fe; }
        
        .ph-tier-name { display: block; font-size: 11px; font-weight: 900; letter-spacing: 1px; margin-bottom: 5px; color: #94a3b8; }
        
        @keyframes ph-pulse-glow { 0% { box-shadow: 0 0 0 0 rgba(0, 160, 233, 0.4); transform: translateY(-8px) scale(1.02); } 70% { box-shadow: 0 0 0 15px rgba(0, 160, 233, 0); transform: translateY(-8px) scale(1.05); } 100% { box-shadow: 0 0 0 0 rgba(0, 160, 233, 0); transform: translateY(-8px) scale(1.02); } }
        .ph-box.active { border-color: #00a0e9 !important; background: #f0f9ff !important; animation: ph-pulse-glow 2s infinite ease-in-out !important; z-index: 10; }
        .ph-box.active .ph-tier-name { color: #00a0e9; }
        
        #ph-dropzone { border: 2px dashed #cbd5e1; border-radius: 40px; padding: 80px 20px; text-align: center; background: #fbfcfe; cursor: pointer; transition: all 0.3s ease; }
        #ph-dropzone:hover { border-color: #00a0e9; background: #f0f9ff; transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,160,233,0.1); }
        #ph-dropzone.dragover { border-color: #28a745; background: #f0fff4; transform: scale(1.02); }
        
        /* Анимирано появяване на продуктите */
        @keyframes slideUpFade { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
        
        .ph-item { animation: slideUpFade 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; display: flex; align-items: center; background: #fff; border: 1px solid #f1f5f9; border-radius: 30px; padding: 25px; margin-bottom: 25px; position: relative; gap: 25px; box-shadow: 0 10px 25px rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s; }
        .ph-item:hover { transform: translateY(-2px); box-shadow: 0 15px 35px rgba(0,160,233,0.12); border-color: #e0f2fe; }
        
        .ph-del-btn { position: absolute; top: -10px; right: -10px; width: 34px; height: 34px; background: #fff; color: #ff4757; border: 1px solid #fee2e2; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; transition: 0.3s; box-shadow: 0 5px 15px rgba(255, 71, 87, 0.2); }
        .ph-del-btn:hover { background: #ff4757; color: #fff; transform: rotate(90deg) scale(1.1); box-shadow: 0 5px 20px rgba(255, 71, 87, 0.4); }
        
        .ph-preview-box { width: 105px; height: 105px; border-radius: 22px; background: #f8fafc; border: 1px solid #edf2f7; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-in; position: relative; }
        .ph-preview-box img { transition: 0.3s ease; }
        .ph-preview-box:hover img { transform: scale(1.08); }
        
        .ph-blue-tag { background: #00a0e9; color: #fff; font-weight: 800; font-size: 13px; padding: 4px 12px; border-radius: 10px; margin-bottom: 4px; display: inline-block; }
        
        .ph-qty-box { background: #f8fafc; padding: 5px; border-radius: 18px; display: flex; align-items: center; border: 1px solid #edf2f7; }
        
        .ph-qty-btn { width: 34px; height: 34px; border: none; background: #00a0e9; color: #fff; border-radius: 12px; cursor: pointer; font-weight: 900; transition: 0.2s; }
        .ph-qty-btn:hover { background: #008ac9; transform: scale(1.08); }
        
        .ph-qty-input::-webkit-outer-spin-button,
        .ph-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
        .ph-qty-input { -moz-appearance: textfield; width: 65px !important; text-align: center !important; font-size: 16px !important; font-weight: 950 !important; color: #1e293b !important; border: none !important; background: transparent !important; padding: 0 !important; }
        
        .ph-footer {
            animation: slideUpFade 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: fixed;
            bottom: 25px;
            left: 50%;
            transform: translateX(-50%);
            width: 95%;
            max-width: 960px;
            padding: 18px 36px;
            border-radius: 30px;
            background: rgba(15, 23, 42, 0.95) !important;
            backdrop-filter: blur(20px) !important;
            -webkit-backdrop-filter: blur(20px) !important;
            box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.65), 0 0 0 1.5px rgba(255, 255, 255, 0.12), 0 10px 30px rgba(0, 160, 233, 0.18) !important;
            display: none;
            align-items: center;
            z-index: 9999;
            color: #ffffff !important;
            transition: all 0.3s ease;
        }
        .ph-footer-item {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .ph-footer-item-count {
            margin-left: 36px;
        }
        .ph-footer-label {
            font-size: 10.5px !important;
            font-weight: 850 !important;
            color: #94a3b8 !important;
            letter-spacing: 0.8px !important;
            text-transform: uppercase !important;
        }
        .ph-footer-total {
            font-size: 32px !important;
            font-weight: 950 !important;
            color: #4ade80 !important;
            text-shadow: 0 0 20px rgba(74, 222, 128, 0.35) !important;
            letter-spacing: -0.5px !important;
            line-height: 1.1 !important;
        }
        .ph-footer-count {
            font-size: 32px !important;
            font-weight: 950 !important;
            color: #ffffff !important;
            letter-spacing: -0.5px !important;
            line-height: 1.1 !important;
        }
        .ph-footer-progress-wrap {
            flex: 1;
            margin: 0 36px;
            min-width: 0;
        }
        #ph-progress-msg {
            font-size: 13px !important;
            font-weight: 800 !important;
            color: #38bdf8 !important;
            text-align: center !important;
            margin-bottom: 7px !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            letter-spacing: 0.2px !important;
        }
        .ph-progress-track {
            height: 10px !important;
            background: rgba(255, 255, 255, 0.12) !important;
            border-radius: 999px !important;
            overflow: hidden !important;
            border: 1px solid rgba(255, 255, 255, 0.08) !important;
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.4) !important;
        }
        #ph-progress-fill {
            height: 100% !important;
            background: linear-gradient(90deg, #00a0e9, #22c55e) !important;
            box-shadow: 0 0 12px rgba(34, 197, 94, 0.5) !important;
            transition: width 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
        }
        
        /* Пулсиращ ефект за Зеления Бутон за Поръчка */
        @keyframes buyPulse { 0% { box-shadow: 0 10px 20px rgba(46, 204, 113, 0.3), 0 0 0 0 rgba(46, 204, 113, 0.4); } 70% { box-shadow: 0 10px 20px rgba(46, 204, 113, 0.3), 0 0 0 15px rgba(46, 204, 113, 0); } 100% { box-shadow: 0 10px 20px rgba(46, 204, 113, 0.3), 0 0 0 0 rgba(46, 204, 113, 0); } }
        
        .ph-buy-btn {
            background: linear-gradient(135deg, #16a34a, #22c55e) !important;
            color: #ffffff !important;
            border: none !important;
            padding: 16px 36px !important;
            border-radius: 20px !important;
            font-size: 18px !important;
            font-weight: 950 !important;
            cursor: pointer !important;
            margin-left: auto !important;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
            animation: buyPulse 2s infinite !important;
            box-shadow: 0 10px 25px rgba(34, 197, 94, 0.45) !important;
            white-space: nowrap !important;
            letter-spacing: 0.3px !important;
        }
        .ph-buy-btn:disabled {
            background: rgba(255, 255, 255, 0.12) !important;
            color: rgba(255, 255, 255, 0.35) !important;
            cursor: not-allowed !important;
            opacity: 1 !important;
            animation: none !important;
            box-shadow: none !important;
            border: 1px solid rgba(255, 255, 255, 0.08) !important;
        }
        .ph-buy-btn:hover:not(:disabled) {
            transform: translateY(-2px) scale(1.03) !important;
            box-shadow: 0 16px 35px rgba(34, 197, 94, 0.6) !important;
        }
        
        /* Добави още файлове */
        #ph-more { display:none; width:100%; padding:20px; margin-top:15px; border:none; border-radius:28px; background: linear-gradient(135deg, #00a0e9, #0077cc); color:#fff; cursor:pointer; font-weight:900; font-size:15px; letter-spacing:1px; text-transform:uppercase; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 8px 25px rgba(0,160,233,0.35); }
        #ph-more:hover { transform: translateY(-3px) scale(1.01); box-shadow: 0 15px 35px rgba(0,160,233,0.5); background: linear-gradient(135deg, #0090d9, #0066bb); }
        #ph-more:active { transform: translateY(0) scale(0.99); }

        /* Изчисти всички дизайни */
        #ph-clear-all { display:none; width:100%; padding:16px; margin-top:10px; border:none; border-radius:28px; background: linear-gradient(135deg, #ff4757, #cc2233); color:#fff; cursor:pointer; font-weight:900; font-size:14px; letter-spacing:1px; text-transform:uppercase; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 8px 25px rgba(255,71,87,0.3); }
        #ph-clear-all:hover { transform: translateY(-3px) scale(1.01); box-shadow: 0 15px 35px rgba(255,71,87,0.5); background: linear-gradient(135deg, #ff2f43, #bb1122); }
        #ph-clear-all:active { transform: translateY(0) scale(0.99); }
        
        #ph-lb { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); display: none; align-items: center; justify-content: center; z-index: 100000; }
        
        /* =========================
           MOBILE RESPONSIVE
           ========================= */
        @media (max-width: 900px) {
          #ph-main-wrapper { max-width: 100%; margin: 14px auto; border-radius: 28px; }
          .ph-header-bar { padding: 18px 18px; }
          #ph-app { padding: 22px; }
          .ph-footer { max-width: 100%; padding: 16px 18px; border-radius: 26px; }
        }

        @media (max-width: 768px) {
          .ph-header-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
          .ph-header-title { font-size: 12px; }
          .ph-header-price { font-size: 14px; padding: 8px 14px; border-radius: 12px; }
          .ph-grid { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; gap: 10px; margin-bottom: 22px; padding-bottom: 6px; }
          .ph-box { flex: 0 0 auto; min-width: 220px; padding: 14px 10px; border-radius: 18px; scroll-snap-align: start; }
          .ph-box:hover { transform: none; box-shadow: none; border-color: rgba(255,255,255,0.05); }
          .ph-grid { scrollbar-width: none; }
          .ph-grid::-webkit-scrollbar { display: none; }
          #ph-dropzone { padding: 46px 14px; border-radius: 26px; }
          #ph-dropzone > div { font-size: 48px !important; margin-bottom: 14px !important; }
          .ph-item { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; border-radius: 22px; }
          .ph-preview-box { width: 86px; height: 86px; border-radius: 18px; }
          .ph-item > div:last-child { min-width: 0 !important; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left !important; }
          .ph-item > div:last-child > div:first-child { font-size: 20px !important; margin-bottom: 0 !important; white-space: nowrap; }
          .ph-qty-box { border-radius: 16px; }
          .ph-qty-btn { width: 34px; height: 34px; border-radius: 12px; }
          .ph-qty-input { width: 58px !important; font-size: 16px !important; }
          .ph-footer { left: 50%; width: calc(100% - 16px); transform: translateX(-50%); bottom: 10px; padding: 14px 16px; border-radius: 22px; flex-wrap: wrap; gap: 12px; }
          .ph-footer-item-count { margin-left: 20px; }
          .ph-footer-progress-wrap { flex: 0 0 100% !important; margin: 0 !important; order: 3; }
          .ph-buy-btn { width: 100%; margin-left: 0 !important; padding: 14px 18px; border-radius: 18px; font-size: 18px; order: 4; }
          .ph-footer-total { font-size: 26px !important; }
          .ph-footer-count { font-size: 26px !important; }
          #ph-total-display { font-size: 26px !important; }
          #ph-count-display { font-size: 26px !important; }
          #ph-more { border-radius: 22px; padding: 16px; }
        }

        @media (max-width: 480px) {
          #ph-app { padding: 16px; }
          .ph-box { min-width: 190px; }
          #ph-dropzone strong { font-size: 18px !important; }
          #ph-dropzone p { font-size: 13px !important; }
          .ph-item > div:last-child { flex-direction: column; align-items: flex-start; }
          .ph-footer { padding: 12px 14px; }
          .ph-footer-total { font-size: 24px !important; }
          .ph-footer-count { font-size: 24px !important; }
          #ph-total-display { font-size: 24px !important; }
          #ph-count-display { font-size: 24px !important; }
          #ph-progress-msg { font-size: 12px !important; }
        }

        /* =========================================================
           3D POPPING BUILDER CARDS & VIBRANT CONTROLS (PRO STYLING)
           ========================================================= */
        /* Hide HTML5 number input spinners (up/down arrows) */
        input[type=number]::-webkit-inner-spin-button, 
        input[type=number]::-webkit-outer-spin-button { 
            -webkit-appearance: none !important; 
            margin: 0 !important; 
        }
        input[type=number] {
            -moz-appearance: textfield !important;
        }

        .ph-builder-card {
            background: #ffffff;
            border: 2px solid #cbd5e1;
            border-radius: 22px;
            padding: 16px;
            margin-bottom: 18px;
            box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.05), inset 0 1px 0 #ffffff;
            transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
        }
        .ph-builder-card:hover {
            border-color: #00a0e9;
            transform: translateY(-3px);
            box-shadow: 0 20px 40px -8px rgba(0, 160, 233, 0.28), 0 8px 16px -4px rgba(0, 0, 0, 0.1);
        }
        
        .ph-builder-card-header {
            display: flex;
            align-items: center;
            gap: 12px;
            border-bottom: 1.5px dashed #cbd5e1;
            padding-bottom: 10px;
            margin-bottom: 12px;
        }
        .ph-builder-thumb {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            background-color: #ffffff;
            background-image: 
                linear-gradient(45deg, #e2e8f0 25%, transparent 25%), 
                linear-gradient(-45deg, #e2e8f0 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #e2e8f0 75%), 
                linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
            background-size: 8px 8px;
            background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
            border: 2px solid #cbd5e1;
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.05);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            flex-shrink: 0;
            cursor: zoom-in;
            position: relative;
            transition: all 0.2s ease;
        }
        .ph-builder-thumb:hover {
            border-color: #00a0e9;
            transform: scale(1.06);
            box-shadow: 0 4px 12px rgba(0, 160, 233, 0.25);
        }
        .ph-thumb-zoom-badge {
            position: absolute;
            bottom: 2px;
            right: 2px;
            width: 17px;
            height: 17px;
            background: rgba(15, 23, 42, 0.88);
            color: #ffffff;
            border-radius: 5px;
            font-size: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: none;
            box-shadow: 0 1px 3px rgba(0,0,0,0.4);
            transition: all 0.2s ease;
        }
        .ph-builder-thumb:hover .ph-thumb-zoom-badge {
            background: #00a0e9;
            transform: scale(1.15);
        }
        .ph-card-header-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-left: auto;
            flex-shrink: 0;
        }
        .ph-card-preview-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
            color: #0284c7;
            border: 1.5px solid #bae6fd;
            padding: 6px 13px;
            border-radius: 10px;
            font-size: 12.5px;
            font-weight: 850;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            box-shadow: 0 2px 5px rgba(2, 132, 199, 0.12);
            white-space: nowrap;
        }
        .ph-card-preview-btn:hover {
            background: linear-gradient(180deg, #00a0e9 0%, #0284c7 100%);
            color: #ffffff;
            border-color: #00a0e9;
            transform: translateY(-1px) scale(1.04);
            box-shadow: 0 4px 12px rgba(0, 160, 233, 0.3);
        }
        .ph-card-preview-btn:active {
            transform: translateY(0) scale(0.98);
        }

        /* In-Page Image Preview Modal with Transparency Checkerboard */
        #ph-preview-modal {
            position: fixed !important;
            inset: 0 !important;
            background: rgba(15, 23, 42, 0.82) !important;
            backdrop-filter: blur(8px) !important;
            -webkit-backdrop-filter: blur(8px) !important;
            display: none !important;
            align-items: center !important;
            justify-content: center !important;
            z-index: 9999999 !important;
            padding: 10px !important;
        }
        #ph-preview-modal.show {
            display: flex !important;
        }
        .ph-preview-dialog {
            background: #090e1a !important;
            border-radius: 20px !important;
            max-width: 96vw !important;
            width: 96vw !important;
            height: 94vh !important;
            max-height: 94vh !important;
            display: flex !important;
            flex-direction: column !important;
            overflow: hidden !important;
            border: 1px solid rgba(0, 240, 255, 0.22) !important;
            box-shadow: 0 25px 80px -10px rgba(0, 0, 0, 0.95), 0 0 35px rgba(0, 240, 255, 0.15) !important;
            animation: ph-modal-slide 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
        }
        .ph-preview-header {
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            padding: 14px 22px !important;
            background: linear-gradient(180deg, #111a2e 0%, #0d1527 100%) !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
            position: relative !important;
            z-index: 5 !important;
        }
        .ph-preview-title-box {
            display: flex !important;
            flex-direction: column !important;
            gap: 3px !important;
            min-width: 0 !important;
        }
        .ph-preview-title {
            font-size: 15.5px !important;
            font-weight: 850 !important;
            color: #ffffff !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            max-width: calc(100% - 60px) !important;
            display: flex !important;
            align-items: center !important;
            gap: 6px !important;
            letter-spacing: 0.2px !important;
            text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7) !important;
        }
        .ph-preview-meta {
            font-size: 12px !important;
            color: #38bdf8 !important;
            font-weight: 750 !important;
            text-shadow: 0 0 10px rgba(56, 189, 248, 0.45) !important;
        }
        .ph-preview-close {
            width: 36px !important;
            height: 36px !important;
            border-radius: 50% !important;
            background: linear-gradient(145deg, #1e293b, #0f172a) !important;
            border: 1px solid rgba(255, 255, 255, 0.18) !important;
            color: #cbd5e1 !important;
            font-size: 16px !important;
            font-weight: 950 !important;
            cursor: pointer !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
            line-height: 1 !important;
            padding: 0 !important;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
        }
        .ph-preview-close:hover {
            background: linear-gradient(145deg, #ef4444, #b91c1c) !important;
            color: #ffffff !important;
            border-color: #f87171 !important;
            transform: rotate(90deg) scale(1.12) !important;
            box-shadow: 0 0 20px rgba(239, 68, 68, 0.8), 0 4px 12px rgba(0, 0, 0, 0.6) !important;
        }

        /* Preview Toolbar: Background Swatches & Controls */
        .ph-preview-toolbar {
            background: linear-gradient(180deg, #0b1120 0%, #080d19 100%) !important;
            padding: 10px 20px !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            gap: 12px !important;
            flex-wrap: wrap !important;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
            position: relative !important;
            z-index: 4 !important;
        }
        .ph-bg-picker-wrap {
            display: flex !important;
            align-items: center !important;
            gap: 10px !important;
            flex-wrap: wrap !important;
        }
        .ph-toolbar-label {
            font-size: 12.5px !important;
            font-weight: 800 !important;
            color: #cbd5e1 !important;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7) !important;
        }
        .ph-swatches {
            display: flex !important;
            align-items: center !important;
            gap: 8px !important;
        }
        .ph-swatch {
            width: 28px !important;
            height: 28px !important;
            border-radius: 8px !important;
            border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
            cursor: pointer !important;
            padding: 0 !important;
            position: relative !important;
            transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
            outline: none !important;
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
        }
        .ph-swatch:hover {
            transform: translateY(-2px) scale(1.15) !important;
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.4) !important;
        }
        .ph-swatch.active {
            border-color: #00f0ff !important;
            transform: translateY(-2px) scale(1.15) !important;
            box-shadow: 0 0 16px rgba(0, 240, 255, 0.9), inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 0 0 2px rgba(0, 240, 255, 0.45) !important;
        }
        .ph-swatch-check {
            background-color: #1e293b !important;
            background-image: linear-gradient(45deg, #475569 25%, transparent 25%), linear-gradient(-45deg, #475569 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #475569 75%), linear-gradient(-45deg, transparent 75%, #475569 75%) !important;
            background-size: 10px 10px !important;
            background-position: 0 0, 0 5px, 5px -5px, -5px 0px !important;
        }
        .ph-swatch-black { background: #020617 !important; border-color: rgba(255, 255, 255, 0.2) !important; }
        .ph-swatch-white { background: #f8fafc !important; border-color: #ffffff !important; }
        .ph-swatch-navy  { background: #1d4ed8 !important; border-color: rgba(255, 255, 255, 0.3) !important; }
        .ph-swatch-red   { background: #e11d48 !important; border-color: rgba(255, 255, 255, 0.3) !important; }
        .ph-swatch-green { background: #10b981 !important; border-color: rgba(255, 255, 255, 0.3) !important; }

        .ph-swatch-custom-label {
            width: 28px !important;
            height: 28px !important;
            border-radius: 8px !important;
            border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
            cursor: pointer !important;
            position: relative !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            overflow: hidden !important;
            transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
            background: linear-gradient(135deg, #ff4757, #ffa502, #2ed573, #1e90ff, #9b59b6) !important;
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
        }
        .ph-swatch-custom-label:hover {
            transform: translateY(-2px) scale(1.15) !important;
            box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 255, 255, 0.3) !important;
        }
        .ph-swatch-custom-label.active {
            border-color: #00f0ff !important;
            transform: translateY(-2px) scale(1.15) !important;
            box-shadow: 0 0 16px rgba(0, 240, 255, 0.9), inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 0 0 2px rgba(0, 240, 255, 0.45) !important;
        }
        .ph-swatch-custom-label input[type="color"] {
            opacity: 0 !important;
            position: absolute !important;
            inset: 0 !important;
            width: 100% !important;
            height: 100% !important;
            cursor: pointer !important;
        }
        .ph-swatch-rainbow {
            font-size: 14px !important;
            pointer-events: none !important;
            filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)) !important;
        }

        .ph-toolbar-actions {
            display: flex !important;
            align-items: center !important;
            gap: 10px !important;
            flex-wrap: wrap !important;
        }

        .ph-zoom-controls {
            display: inline-flex !important;
            align-items: center !important;
            background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
            border: 1px solid rgba(255, 255, 255, 0.16) !important;
            border-radius: 10px !important;
            overflow: hidden !important;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.18) !important;
        }
        .ph-zoom-btn {
            background: transparent !important;
            border: none !important;
            padding: 7px 11px !important;
            font-size: 12px !important;
            font-weight: 850 !important;
            color: #e2e8f0 !important;
            cursor: pointer !important;
            transition: all 0.15s ease !important;
            line-height: 1 !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
        }
        .ph-zoom-btn:hover {
            background: rgba(0, 240, 255, 0.18) !important;
            color: #00f0ff !important;
            text-shadow: 0 0 10px rgba(0, 240, 255, 0.8) !important;
        }
        .ph-zoom-btn:active {
            background: rgba(0, 240, 255, 0.3) !important;
            transform: scale(0.96) !important;
        }
        .ph-zoom-badge {
            padding: 7px 10px !important;
            font-size: 11.5px !important;
            font-weight: 900 !important;
            color: #00f0ff !important;
            border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
            border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
            background: rgba(0, 0, 0, 0.35) !important;
            cursor: pointer !important;
            user-select: none !important;
            min-width: 44px !important;
            text-align: center !important;
            text-shadow: 0 0 8px rgba(0, 240, 255, 0.7) !important;
        }
        .ph-zoom-badge:hover {
            background: rgba(0, 240, 255, 0.22) !important;
        }
        .ph-zoom-reset-btn {
            border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
            font-size: 11px !important;
            padding: 7px 10px !important;
            color: #cbd5e1 !important;
        }

        .ph-ruler-toggle-btn,
        .ph-frames-toggle-btn,
        .ph-white-channel-btn {
            background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
            color: #cbd5e1 !important;
            border: 1px solid rgba(255, 255, 255, 0.16) !important;
            padding: 7px 14px !important;
            border-radius: 10px !important;
            font-size: 12px !important;
            font-weight: 800 !important;
            cursor: pointer !important;
            transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
            display: inline-flex !important;
            align-items: center !important;
            gap: 6px !important;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.18) !important;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
        }
        .ph-ruler-toggle-btn:hover,
        .ph-frames-toggle-btn:hover,
        .ph-white-channel-btn:hover {
            border-color: rgba(0, 240, 255, 0.5) !important;
            color: #ffffff !important;
            box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6), 0 0 14px rgba(0, 240, 255, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.3) !important;
            transform: translateY(-2px) !important;
        }
        .ph-ruler-toggle-btn.active {
            background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%) !important;
            border-color: #38bdf8 !important;
            color: #ffffff !important;
            box-shadow: 0 0 18px rgba(56, 189, 248, 0.75), inset 0 1px 2px rgba(255, 255, 255, 0.4), 0 4px 12px rgba(0, 0, 0, 0.5) !important;
            transform: translateY(-1px) !important;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
        }
        .ph-frames-toggle-btn.active {
            background: linear-gradient(180deg, #0d9488 0%, #0f766e 100%) !important;
            border-color: #2dd4bf !important;
            color: #ffffff !important;
            box-shadow: 0 0 18px rgba(45, 212, 191, 0.75), inset 0 1px 2px rgba(255, 255, 255, 0.4), 0 4px 12px rgba(0, 0, 0, 0.5) !important;
            transform: translateY(-1px) !important;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
        }
        .ph-white-channel-btn.active {
            background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 100%) !important;
            border-color: #ffffff !important;
            color: #090e1a !important;
            box-shadow: 0 0 20px rgba(255, 255, 255, 0.85), inset 0 1px 2px #ffffff, 0 4px 12px rgba(0, 0, 0, 0.6) !important;
            transform: translateY(-1px) !important;
            text-shadow: none !important;
        }

        .ph-preview-note {
            font-size: 11px !important;
            color: #94a3b8 !important;
            background: #070b14 !important;
            padding: 5px 22px !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
            font-style: italic !important;
            letter-spacing: 0.2px !important;
        }
        .ph-white-channel-hint {
            font-size: 11px !important;
            font-weight: 700 !important;
            color: #f8fafc !important;
            background: #020617 !important;
            padding: 7px 22px !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
            line-height: 1.4 !important;
        }

        .ph-preview-body {
            padding: 14px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            overflow: auto !important;
            flex: 1 1 0 !important;
            min-height: 0 !important;
            background: #080d1a !important;
        }
        /* Canvas & Stage */
        .ph-preview-canvas {
            border-radius: 16px !important;
            padding: 16px !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 15px 35px rgba(0,0,0,0.5) !important;
            max-width: 100% !important;
            max-height: 100% !important;
            transition: background 0.25s ease !important;
            position: relative !important;
        }
        .ph-preview-canvas.checker {
            background-color: #ffffff !important;
            background-image: 
                linear-gradient(45deg, #cbd5e1 25%, transparent 25%), 
                linear-gradient(-45deg, #cbd5e1 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #cbd5e1 75%), 
                linear-gradient(-45deg, transparent 75%, #cbd5e1 75%) !important;
            background-size: 20px 20px !important;
            background-position: 0 0, 0 10px, 10px -10px, -10px 0px !important;
        }

        .ph-preview-stage {
            position: relative !important;
            display: inline-block !important;
            padding: 44px 16px 16px 48px !important;
            min-width: 180px !important;
            min-height: 180px !important;
            transition: transform 0.2s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
            transform-origin: center center !important;
        }
        .ph-preview-loader {
            position: absolute !important;
            top: 50% !important;
            left: 50% !important;
            transform: translate(-50%, -50%) !important;
            background: rgba(15, 23, 42, 0.92) !important;
            color: #ffffff !important;
            padding: 10px 20px !important;
            border-radius: 999px !important;
            font-size: 13px !important;
            font-weight: 800 !important;
            display: none !important;
            align-items: center !important;
            gap: 8px !important;
            z-index: 10 !important;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
            pointer-events: none !important;
            white-space: nowrap !important;
        }
        .ph-preview-loader.show {
            display: flex !important;
        }
        .ph-preview-stage img {
            max-width: min(84vw, 1100px) !important;
            max-height: calc(94vh - 290px) !important;
            object-fit: contain !important;
            display: block !important;
            border-radius: 2px !important;
            transition: opacity 0.25s ease !important;
        }
        .ph-preview-stage img.white-channel {
            filter: brightness(0) invert(1) !important;
            -webkit-filter: brightness(0) invert(1) !important;
        }

        /* Frame Overlays & Legend */
        .ph-preview-img-wrap {
            position: relative !important;
            display: inline-block !important;
            line-height: 0 !important;
        }
        .ph-preview-frame {
            pointer-events: none !important;
            transition: all 0.2s ease !important;
        }
        .ph-preview-frame.hidden,
        .ph-preview-legend.hidden {
            display: none !important;
        }
        /* Neon Cyan Frame: Размер на файла */
        .ph-preview-frame.real-frame {
            position: absolute !important;
            inset: 0 !important;
            border: 2.5px solid #00f0ff !important;
            box-shadow: 0 0 14px rgba(0, 240, 255, 0.75), inset 0 0 8px rgba(0, 240, 255, 0.4) !important;
            border-radius: 2px !important;
        }
        /* Neon Orange Frame: Реален размер на графиката */
        .ph-preview-frame.crop-frame {
            position: absolute !important;
            border: 2.5px dashed #ff9900 !important;
            background: rgba(255, 153, 0, 0.12) !important;
            box-shadow: 0 0 14px rgba(255, 153, 0, 0.75), inset 0 0 10px rgba(255, 153, 0, 0.25) !important;
            border-radius: 2px !important;
        }
        .ph-frame-tag {
            display: none !important;
        }

        /* Preview Legend */
        .ph-preview-legend {
            background: #0a0f1d !important;
            border-top: 1px solid #1e293b !important;
            padding: 8px 22px !important;
            display: flex !important;
            align-items: center !important;
            gap: 20px !important;
            flex-wrap: wrap !important;
            font-size: 12px !important;
            color: #e2e8f0 !important;
        }
        .ph-legend-title {
            font-weight: 850 !important;
            text-transform: uppercase !important;
            letter-spacing: 0.5px !important;
            color: #94a3b8 !important;
            font-size: 11px !important;
        }
        .ph-legend-item {
            display: flex !important;
            align-items: center !important;
            gap: 8px !important;
        }
        .ph-legend-dot {
            width: 14px !important;
            height: 14px !important;
            border-radius: 4px !important;
            display: inline-block !important;
            flex-shrink: 0 !important;
        }
        .ph-dot-real {
            border: 2px solid #00f0ff !important;
            background: rgba(0, 240, 255, 0.35) !important;
            box-shadow: 0 0 8px rgba(0, 240, 255, 0.7) !important;
        }
        .ph-dot-crop {
            border: 2px dashed #ff9900 !important;
            background: rgba(255, 153, 0, 0.35) !important;
            box-shadow: 0 0 8px rgba(255, 153, 0, 0.7) !important;
        }
        .ph-legend-label {
            color: #cbd5e1 !important;
        }

        /* Blue Dimension Lines (Rulers) */
        .ph-ruler {
            position: absolute !important;
            pointer-events: none !important;
            transition: opacity 0.2s ease !important;
        }
        .ph-ruler.hidden {
            display: none !important;
        }

        /* Horizontal Ruler (Top) */
        .ph-ruler-h {
            top: 12px !important;
            left: 48px !important;
            right: 16px !important;
            height: 24px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
        }
        .ph-ruler-h .ph-ruler-line {
            position: absolute !important;
            left: 0 !important;
            right: 0 !important;
            height: 2px !important;
            background: #00f0ff !important;
            box-shadow: 0 0 8px rgba(0, 240, 255, 0.9) !important;
            top: 50% !important;
            transform: translateY(-50%) !important;
        }
        .ph-ruler-h .ph-ruler-tick.tick-left {
            position: absolute !important;
            left: 0 !important;
            width: 2px !important;
            height: 14px !important;
            background: #00f0ff !important;
            box-shadow: 0 0 8px rgba(0, 240, 255, 0.9) !important;
            top: 50% !important;
            transform: translateY(-50%) !important;
        }
        .ph-ruler-h .ph-ruler-tick.tick-right {
            position: absolute !important;
            right: 0 !important;
            width: 2px !important;
            height: 14px !important;
            background: #00f0ff !important;
            box-shadow: 0 0 8px rgba(0, 240, 255, 0.9) !important;
            top: 50% !important;
            transform: translateY(-50%) !important;
        }
        .ph-ruler-h .ph-ruler-badge {
            position: relative !important;
            z-index: 2 !important;
            background: #00e5ff !important;
            color: #03131e !important;
            padding: 2px 10px !important;
            border-radius: 12px !important;
            font-size: 11.5px !important;
            font-weight: 900 !important;
            letter-spacing: 0.3px !important;
            box-shadow: 0 0 12px rgba(0, 229, 255, 0.9), 0 2px 6px rgba(0,0,0,0.5) !important;
            border: 1.5px solid #ffffff !important;
            white-space: nowrap !important;
        }

        /* Vertical Ruler (Left) */
        .ph-ruler-v {
            top: 44px !important;
            bottom: 16px !important;
            left: 8px !important;
            width: 28px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
        }
        .ph-ruler-v .ph-ruler-line {
            position: absolute !important;
            top: 0 !important;
            bottom: 0 !important;
            width: 2px !important;
            background: #00f0ff !important;
            box-shadow: 0 0 8px rgba(0, 240, 255, 0.9) !important;
            left: 50% !important;
            transform: translateX(-50%) !important;
        }
        .ph-ruler-v .ph-ruler-tick.tick-top {
            position: absolute !important;
            top: 0 !important;
            height: 2px !important;
            width: 14px !important;
            background: #00f0ff !important;
            box-shadow: 0 0 8px rgba(0, 240, 255, 0.9) !important;
            left: 50% !important;
            transform: translateX(-50%) !important;
        }
        .ph-ruler-v .ph-ruler-tick.tick-bottom {
            position: absolute !important;
            bottom: 0 !important;
            height: 2px !important;
            width: 14px !important;
            background: #00f0ff !important;
            box-shadow: 0 0 8px rgba(0, 240, 255, 0.9) !important;
            left: 50% !important;
            transform: translateX(-50%) !important;
        }
        .ph-ruler-v .ph-ruler-badge {
            position: relative !important;
            z-index: 2 !important;
            background: #00e5ff !important;
            color: #03131e !important;
            padding: 2px 10px !important;
            border-radius: 12px !important;
            font-size: 11.5px !important;
            font-weight: 900 !important;
            letter-spacing: 0.3px !important;
            box-shadow: 0 0 12px rgba(0, 229, 255, 0.9), 0 2px 6px rgba(0,0,0,0.5) !important;
            border: 1.5px solid #ffffff !important;
            white-space: nowrap !important;
            transform: rotate(-90deg) !important;
            transform-origin: center center !important;
        }
        .ph-builder-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
        .ph-builder-file-info { flex: 1; min-width: 0; }
        .ph-builder-file-title { font-size: 15px; font-weight: 950; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.2px; }
        .ph-builder-file-meta { font-size: 11px; font-weight: 800; color: #64748b; margin-top: 1px; }
        
        .ph-builder-del-group-btn {
            width: 34px;
            height: 34px;
            border: 1.5px solid #fee2e2;
            background: linear-gradient(180deg, #ffffff, #fff5f5);
            color: #ef4444;
            border-radius: 10px;
            cursor: pointer;
            font-size: 15px;
            transition: 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            box-shadow: 0 2px 6px rgba(239,68,68,0.15);
        }
        .ph-builder-del-group-btn:hover { background: #ef4444; color: #fff; border-color: #ef4444; transform: scale(1.1); box-shadow: 0 4px 12px rgba(239,68,68,0.35); }

        /* 3D Size Block Inside Group */
        .ph-size-block {
            background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
            border: 1.5px solid #cbd5e1;
            border-radius: 14px;
            padding: 12px 14px;
            margin-bottom: 10px;
            box-shadow: 0 4px 10px rgba(0,0,0,0.04), inset 0 1px 0 #ffffff;
            transition: 0.2s;
        }
        .ph-size-block:hover {
            border-color: #94a3b8;
            box-shadow: 0 6px 16px rgba(0,0,0,0.07), inset 0 1px 0 #ffffff;
        }
        .ph-size-block-header {
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            margin-bottom: 8px !important;
            gap: 8px !important;
            position: relative !important;
        }
        .ph-size-block-header.is-empty {
            display: none !important;
            margin: 0 !important;
            padding: 0 !important;
        }
        .ph-sbh-left {
            display: flex !important;
            align-items: center !important;
            justify-content: flex-start !important;
        }
        .ph-size-block-actions {
            display: flex !important;
            align-items: center !important;
            justify-content: flex-end !important;
            gap: 6px !important;
            margin-left: auto !important;
        }
        .ph-sub-num-title {
            font-size: 11.5px !important;
            font-weight: 800 !important;
            color: #475569 !important;
            margin-left: 6px !important;
        }
        .ph-size-preview-btn {
            background: #f0f9ff !important;
            color: #0284c7 !important;
            border: 1px solid #bae6fd !important;
            padding: 4px 10px !important;
            border-radius: 8px !important;
            font-size: 11.5px !important;
            font-weight: 800 !important;
            cursor: pointer !important;
            display: inline-flex !important;
            align-items: center !important;
            gap: 4px !important;
            transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
            line-height: 1.2 !important;
        }
        .ph-size-preview-btn:hover {
            background: #0284c7 !important;
            color: #ffffff !important;
            border-color: #0284c7 !important;
            transform: translateY(-1px) scale(1.03) !important;
            box-shadow: 0 3px 8px rgba(2, 132, 199, 0.25) !important;
        }
        .ph-size-preview-btn:active {
            transform: translateY(0) scale(0.97) !important;
        }
        .ph-reset-btn {
            background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
            border: 1px solid #f59e0b !important;
            color: #b45309 !important;
            cursor: pointer !important;
            font-size: 16px !important;
            font-weight: 950 !important;
            line-height: 1 !important;
            width: 30px !important;
            height: 30px !important;
            border-radius: 50% !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            box-shadow: 0 2px 5px rgba(245,158,11,0.2) !important;
            transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
            padding: 0 !important;
        }
        .ph-reset-btn:hover {
            background: linear-gradient(135deg, #f59e0b, #d97706) !important;
            color: #ffffff !important;
            transform: rotate(-90deg) scale(1.15) !important;
            box-shadow: 0 4px 10px rgba(245,158,11,0.35) !important;
        }
        .ph-del-subsize-btn {
            background: #fff;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            padding: 4px 8px;
            cursor: pointer;
            font-size: 11px;
            color: #64748b;
            transition: 0.2s;
        }
        .ph-del-subsize-btn:hover { background: #ef4444; color: #fff; border-color: #ef4444; }

        /* Big Primary "Add More Files" Button (100% width, top of manifest) */
        .ph-btn-add-more-main {
            box-sizing: border-box !important;
            height: 52px !important;
            min-height: 52px !important;
            max-height: 52px !important;
            width: 100% !important;
            padding: 0 20px !important;
            margin: 0 0 14px 0 !important;
            border-radius: 16px !important;
            font-size: 14px !important;
            font-weight: 950 !important;
            letter-spacing: 0.5px !important;
            cursor: pointer !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 10px !important;
            text-transform: uppercase !important;
            border: 1px solid rgba(255,255,255,0.3) !important;
            background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%) !important;
            color: #ffffff !important;
            box-shadow: 0 8px 22px rgba(0, 114, 255, 0.35), inset 0 1px 1px rgba(255,255,255,0.4) !important;
            transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
        }
        .ph-btn-add-more-main:hover {
            transform: translateY(-2px) scale(1.01) !important;
            box-shadow: 0 12px 28px rgba(0, 114, 255, 0.5), inset 0 1px 1px rgba(255,255,255,0.5) !important;
            background: linear-gradient(135deg, #00d2ff 0%, #0066eb 100%) !important;
        }
        .ph-btn-add-more-main:active {
            transform: translateY(1px) scale(0.98) !important;
            box-shadow: 0 4px 12px rgba(0, 114, 255, 0.3) !important;
        }

        .ph-size-block-inputs input[type=number]::-webkit-outer-spin-button,
        .ph-size-block-inputs input[type=number]::-webkit-inner-spin-button {
            -webkit-appearance: none !important;
            margin: 0 !important;
        }
        .ph-size-block-inputs input[type=number] {
            -moz-appearance: textfield !important;
        }

        .ph-size-block-inputs { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 10px; align-items: flex-end; margin-bottom: 8px; }
        .ph-input-group { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
        .ph-input-group label { font-size: 10px !important; font-weight: 950 !important; color: #475569 !important; letter-spacing: 0.5px !important; text-transform: uppercase !important; margin: 0 0 4px 0 !important; padding: 0 !important; line-height: 1.2 !important; display: block !important; }
        .ph-input-group input[type="number"] {
            width: 100% !important;
            height: 42px !important;
            max-height: 42px !important;
            border: 2px solid #cbd5e1 !important;
            border-radius: 12px !important;
            background: #ffffff !important;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
            font-size: 17px !important;
            font-weight: 800 !important;
            color: #0f172a !important;
            padding: 0 8px !important;
            text-align: center !important;
            letter-spacing: 0.3px !important;
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04) !important;
            transition: all 0.2s;
            box-sizing: border-box !important;
            margin: 0 !important;
        }
        .ph-input-group input[type="number"]:focus {
            outline: none !important;
            border-color: #00a0e9 !important;
            box-shadow: inset 0 1px 2px rgba(0,0,0,0.03), 0 0 0 3px rgba(0,160,233,0.2) !important;
        }
        
        .ph-qty-control {
            display: flex !important;
            align-items: center !important;
            background: #ffffff !important;
            border: 2px solid #cbd5e1 !important;
            border-radius: 12px !important;
            height: 42px !important;
            max-height: 42px !important;
            overflow: hidden !important;
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.04) !important;
            box-sizing: border-box !important;
            margin: 0 !important;
            padding: 0 !important;
        }
        .ph-qty-control button {
            width: 36px !important;
            height: 100% !important;
            border: none !important;
            background: linear-gradient(135deg, #00a0e9, #0077cc) !important;
            color: #ffffff !important;
            font-weight: 950 !important;
            font-size: 18px !important;
            cursor: pointer !important;
            transition: 0.2s !important;
            box-shadow: 0 2px 6px rgba(0,160,233,0.35) !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            padding: 0 !important;
            margin: 0 !important;
            flex-shrink: 0 !important;
        }
        .ph-qty-control button:hover { background: linear-gradient(135deg, #0088dd, #0066bb) !important; transform: scale(1.05) !important; }
        .ph-qty-control button:active { transform: scale(0.95) !important; }
        .ph-qty-control input[type="number"] {
            width: 100% !important;
            height: 100% !important;
            border: none !important;
            background: transparent !important;
            text-align: center !important;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
            font-size: 17px !important;
            font-weight: 800 !important;
            color: #0f172a !important;
            letter-spacing: 0.3px !important;
            margin: 0 !important;
            padding: 0 !important;
            box-shadow: none !important;
            outline: none !important;
        }

        /* Flashing Red DPI Danger Warning */
        @keyframes ph-blink-red {
            0%, 100% {
                opacity: 1;
                background: #fef2f2;
                border-color: #ef4444;
                box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
            }
            50% {
                opacity: 0.4;
                background: #ffffff;
                border-color: #fca5a5;
                box-shadow: none;
            }
        }
        .ph-dpi-danger-warn {
            display: flex;
            align-items: center;
            gap: 6px;
            background: #fef2f2;
            border: 2px solid #ef4444;
            border-radius: 10px;
            padding: 8px 12px;
            margin-top: 6px;
            margin-bottom: 6px;
            font-size: 11px;
            font-weight: 950;
            color: #dc2626;
            animation: ph-blink-red 1.2s infinite ease-in-out;
        }

        /* Light Slate Subinfo Banner with Glossy 3D Total Price Badge */
        .ph-size-block-subinfo {
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            font-size: 12px !important;
            font-weight: 800 !important;
            color: #334155 !important;
            background: #f8fafc !important;
            border: 1.5px solid #e2e8f0 !important;
            padding: 8px 12px !important;
            border-radius: 12px !important;
            box-shadow: inset 0 1px 2px rgba(255,255,255,0.8), 0 2px 5px rgba(0,0,0,0.03) !important;
            margin-top: 8px !important;
            gap: 8px !important;
        }
        .ph-sub-details { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #64748b; }
        .ph-sub-details strong { color: #0f172a; font-weight: 950; }
        .ph-sub-sep { color: #cbd5e1; }
        .ph-sub-total-badge {
            background: linear-gradient(180deg, #10b981 0%, #047857 100%) !important;
            color: #ffffff !important;
            padding: 6px 14px !important;
            border-radius: 10px !important;
            display: flex !important;
            align-items: center !important;
            gap: 6px !important;
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4), inset 0 1.5px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.25) !important;
            border: 1px solid #047857 !important;
            flex-shrink: 0 !important;
            transform: translateY(-1px) !important;
        }
        .ph-sub-total-label { font-size: 10px !important; font-weight: 900 !important; letter-spacing: 0.5px !important; opacity: 0.95 !important; text-transform: uppercase !important; text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important; }
        .ph-sub-total-val { font-size: 16px !important; font-weight: 950 !important; letter-spacing: 0.3px !important; text-shadow: 0 1px 3px rgba(0,0,0,0.4) !important; }

        .ph-add-size-btn {
            width: 100%;
            padding: 12px;
            border: 2px dashed #00a0e9;
            border-radius: 14px;
            background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
            color: #0077cc;
            font-weight: 950;
            font-size: 13px;
            letter-spacing: 0.5px;
            cursor: pointer;
            transition: 0.25s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 4px 12px rgba(0,160,233,0.15);
        }
        .ph-add-size-btn:hover { background: linear-gradient(135deg, #00a0e9, #0077cc); color: #ffffff; border-style: solid; box-shadow: 0 8px 22px rgba(0,160,233,0.4); transform: translateY(-2px); }

        @media (max-width: 600px) {
            .ph-size-block-inputs { grid-template-columns: 1fr 1fr; }
            .ph-qty-group { grid-column: span 2; }
            .ph-action-btns-row { grid-template-columns: 1fr !important; }
        }

        /* 3D Action Row Buttons - Vibrant Color Pair with 3D Depth & Micro-Animation */
        .ph-manifest-box { margin-top: 16px; background: #ffffff; border: 2px solid #cbd5e1; border-radius: 20px; padding: 18px; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.06); }
        .ph-action-btns-row { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 14px !important; margin-bottom: 16px !important; align-items: stretch !important; width: 100% !important; }
        
        .ph-btn-clear-secondary, .ph-btn-report {
            box-sizing: border-box !important;
            height: 50px !important;
            min-height: 50px !important;
            max-height: 50px !important;
            padding: 0 16px !important;
            margin: 0 !important;
            border-radius: 16px !important;
            font-size: 13px !important;
            font-weight: 950 !important;
            letter-spacing: 0.4px !important;
            cursor: pointer !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 8px !important;
            text-transform: uppercase !important;
            text-align: center !important;
            width: 100% !important;
            transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
        }

        .ph-btn-clear-secondary {
            border: 1px solid rgba(255, 255, 255, 0.25) !important;
            background: linear-gradient(135deg, #ff4757 0%, #c0392b 100%) !important;
            color: #ffffff !important;
            box-shadow: 0 8px 20px rgba(255, 71, 87, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.35) !important;
        }
        .ph-btn-clear-secondary:hover {
            transform: translateY(-2px) scale(1.02) !important;
            box-shadow: 0 12px 28px rgba(255, 71, 87, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.5) !important;
            background: linear-gradient(135deg, #ff5e6c 0%, #d63031 100%) !important;
        }
        .ph-btn-clear-secondary:active {
            transform: translateY(1px) scale(0.98) !important;
            box-shadow: 0 4px 12px rgba(255, 71, 87, 0.25) !important;
        }

        .ph-btn-report {
            border: 1px solid rgba(255, 255, 255, 0.3) !important;
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
            color: #ffffff !important;
            box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
            transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
        }
        .ph-btn-report:hover { transform: translateY(-3px) scale(1.02) !important; box-shadow: 0 12px 28px rgba(99, 102, 241, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.5) !important; background: linear-gradient(135deg, #818cf8 0%, #4338ca 100%) !important; }
        .ph-btn-report:active { transform: translateY(1px) scale(0.98) !important; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important; }

        /* Order Notes Box - Sleek & Modern */
        .ph-order-notes-wrap {
            margin-top: 14px !important;
            margin-bottom: 14px !important;
            background: #ffffff !important;
            border: 1.5px solid #cbd5e1 !important;
            border-radius: 18px !important;
            padding: 14px 18px !important;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
            transition: all 0.25s ease !important;
        }
        .ph-order-notes-wrap:focus-within {
            border-color: #00a0e9 !important;
            box-shadow: 0 6px 20px rgba(0, 160, 233, 0.15) !important;
        }
        .ph-notes-label {
            display: flex !important;
            align-items: center !important;
            gap: 8px !important;
            font-size: 12px !important;
            font-weight: 900 !important;
            color: #1e293b !important;
            margin-bottom: 8px !important;
            cursor: pointer !important;
            letter-spacing: 0.3px !important;
            text-transform: uppercase !important;
        }
        .ph-notes-optional {
            font-size: 11px !important;
            color: #94a3b8 !important;
            font-weight: 600 !important;
            text-transform: none !important;
        }
        .ph-notes-textarea {
            width: 100% !important;
            box-sizing: border-box !important;
            background: #f8fafc !important;
            border: 1.5px solid #e2e8f0 !important;
            border-radius: 12px !important;
            padding: 12px 14px !important;
            font-family: inherit !important;
            font-size: 13px !important;
            color: #0f172a !important;
            font-weight: 600 !important;
            resize: vertical !important;
            min-height: 56px !important;
            max-height: 180px !important;
            outline: none !important;
            line-height: 1.5 !important;
            transition: all 0.2s ease !important;
        }
        .ph-notes-textarea:focus {
            background: #ffffff !important;
            border-color: #00a0e9 !important;
            box-shadow: 0 0 0 3px rgba(0, 160, 233, 0.12) !important;
        }

        /* Legal Disclaimer Box matching Builder 1-to-1 with Pulse Glow */
        @keyframes ph-check-pulse {
            0%, 100% {
                transform: scale(1);
                box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.8);
            }
            50% {
                transform: scale(1.4);
                box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
            }
        }
        @keyframes ph-box-glow {
            0%, 100% {
                border-color: #cbd5e1;
                background: #ffffff;
                box-shadow: none;
            }
            50% {
                border-color: #ef4444;
                background: #fef2f2;
                box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
            }
        }
        .ph-legal-box {
            display: flex !important;
            align-items: flex-start !important;
            gap: 14px !important;
            background: #ffffff !important;
            border: 1.5px solid #cbd5e1 !important;
            border-radius: 18px !important;
            padding: 16px 18px !important;
            transition: all 0.3s ease !important;
        }
        .ph-legal-box.ph-pulse-warn {
            animation: ph-box-glow 0.8s ease-in-out 3 !important;
        }
        .ph-legal-box input[type="checkbox"] {
            width: 22px !important;
            height: 22px !important;
            accent-color: #00a0e9 !important;
            cursor: pointer !important;
            margin-top: 2px !important;
            flex-shrink: 0 !important;
            transition: transform 0.2s ease, box-shadow 0.2s ease !important;
            border-radius: 6px !important;
        }
        .ph-legal-box.ph-pulse-warn input[type="checkbox"] {
            animation: ph-check-pulse 0.6s ease-in-out 4 !important;
            outline: 2px solid #ef4444 !important;
        }
        .ph-legal-text { font-size: 12px; font-weight: 600; color: #475569; line-height: 1.55; }
        .ph-legal-text strong { color: #0f172a; font-weight: 950; }

        /* Tip Banner */
        .ph-tip-banner { background: linear-gradient(135deg, #00a0e9, #0077cc); color: #fff; border-radius: 16px; padding: 14px 18px; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; box-shadow: 0 6px 16px rgba(0,160,233,0.2); }
        .ph-tip-icon { font-size: 20px; flex-shrink: 0; }
        .ph-tip-text { font-size: 12px; font-weight: 600; line-height: 1.45; }
        .ph-tip-text strong { font-weight: 900; }

        /* Close Button */
        .ph-close-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #cbd5e1; background: #f8fafc; color: #64748b; font-size: 15px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
        .ph-close-btn:hover { background: #ef4444; color: #fff; border-color: #ef4444; }

        /* Colorful Technical Report Modal (SCREEN OVERLAY) */
        #ph-report-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(10px); display: none; align-items: center; justify-content: center; z-index: 300000; padding: 20px; }
        #ph-report-modal.show { display: flex !important; }
        .ph-report-card { background: #fff; border-radius: 32px; padding: 32px; max-width: min(96vw, 980px); width: 100%; max-height: 90vh; overflow-y: auto; overflow-x: hidden; box-shadow: 0 30px 90px rgba(0,0,0,0.3); border: 1px solid #f1f5f9; }
        .ph-rpt-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
        .ph-report-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px dashed #e2e8f0; padding-bottom: 16px; margin-bottom: 18px; }
        .ph-report-header h3 { font-size: 18px; font-weight: 950; color: #0f172a; margin: 0; display: flex; align-items: center; gap: 8px; }
        
        .ph-rpt-banner { background: linear-gradient(135deg, #00a0e9, #0077cc); color: #fff; border-radius: 16px; padding: 16px 20px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 8px 20px rgba(0,160,233,0.3); }
        .ph-rpt-banner-title { font-size: 15px; font-weight: 950; text-transform: uppercase; letter-spacing: 0.5px; }
        
        .ph-rpt-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
        .ph-rpt-stat-card { background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 16px; padding: 14px; text-align: center; }
        .ph-rpt-lbl { font-size: 10px; font-weight: 950; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 4px; }
        .ph-rpt-val { font-size: 17px; font-weight: 950; color: #0f172a; }
        
        .ph-rpt-table { width: 100%; border-collapse: separate; border-spacing: 0 5px; margin-top: 8px; }
        .ph-rpt-table th { background: #0f172a; color: #f8fafc; font-size: 11px; font-weight: 900; text-transform: uppercase; padding: 10px 12px; text-align: left; }
        .ph-rpt-table th:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
        .ph-rpt-table th:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; text-align: right; }
        .ph-rpt-table td { background: #f8fafc; padding: 10px 12px; font-size: 12px; color: #1e293b; font-weight: 700; border-top: 1px solid #edf2f7; border-bottom: 1px solid #edf2f7; }
        .ph-rpt-table td:first-child { border-left: 1px solid #edf2f7; border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
        .ph-rpt-table td:last-child { border-right: 1px solid #edf2f7; border-top-right-radius: 10px; border-bottom-right-radius: 10px; text-align: right; }
        
        .ph-rpt-grand-total { background: linear-gradient(135deg, #10b981, #059669); color: #fff; border-radius: 18px; padding: 18px 22px; margin-top: 20px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 8px 20px rgba(16,185,129,0.3); }
        .ph-rpt-grand-label { font-size: 14px; font-weight: 950; text-transform: uppercase; letter-spacing: 0.5px; }
        .ph-rpt-grand-val { font-size: 26px; font-weight: 950; }

        .ph-report-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; border-top: 2px solid #f1f5f9; padding-top: 16px; }
        .ph-report-print-btn { background: linear-gradient(135deg, #00a0e9, #0077cc); color: #fff; border: none; padding: 12px 24px; border-radius: 14px; font-size: 13px; font-weight: 950; cursor: pointer; transition: 0.25s; }
        .ph-report-print-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,160,233,0.4); }
        .ph-report-close-btn { background: #f1f5f9; color: #64748b; border: none; padding: 12px 20px; border-radius: 14px; font-size: 13px; font-weight: 800; cursor: pointer; transition: 0.2s; }
        .ph-report-close-btn:hover { background: #e2e8f0; color: #1e293b; }

        /* Badges: Black Sub-number badge & Vibrant Pill DPI badge */
        .ph-sub-num-badge {
            background: #0f172a !important;
            color: #ffffff !important;
            font-size: 11px !important;
            font-weight: 900 !important;
            padding: 2px 8px !important;
            border-radius: 7px !important;
            letter-spacing: 0.4px !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            box-shadow: 0 2px 4px rgba(0,0,0,0.18) !important;
            line-height: 1.3 !important;
            vertical-align: middle !important;
        }

        .ph-dpi-badge {
            font-size: 10.5px !important;
            font-weight: 850 !important;
            padding: 2.5px 9px !important;
            border-radius: 999px !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 4px !important;
            letter-spacing: 0.2px !important;
            box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
            line-height: 1.25 !important;
            vertical-align: middle !important;
            margin-left: 2px !important;
        }
        .ph-dpi-badge.ok {
            background: linear-gradient(135deg, #dcfce7, #bbf7d0) !important;
            color: #14532d !important;
            border: 1.5px solid #86efac !important;
        }
        .ph-dpi-badge.warn {
            background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
            color: #991b1b !important;
            border: 1.5px solid #f87171 !important;
        }

        /* Modal slide keyframe */
        @keyframes ph-modal-slide {
            from { opacity: 0; transform: translateY(24px) scale(0.96); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        @media (max-width: 600px) {
            .ph-action-btns-row { grid-template-columns: 1fr; }
        }

        @media print {
            @page {
                size: A4 portrait;
                margin: 10mm;
            }
            html, body {
                height: auto !important;
                min-height: 0 !important;
                margin: 0 !important;
                padding: 0 !important;
                background: #fff !important;
                overflow: visible !important;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }
            body > *:not(#ph-report-modal) {
                display: none !important;
            }
            #ph-report-modal:not(.show) {
                display: none !important;
            }
            #ph-report-modal.show {
                display: block !important;
                position: static !important;
                top: auto !important;
                left: auto !important;
                width: 100% !important;
                height: auto !important;
                background: #fff !important;
                backdrop-filter: none !important;
                padding: 0 !important;
                margin: 0 !important;
                box-shadow: none !important;
                z-index: 9999999 !important;
                overflow: visible !important;
            }
            .ph-report-card {
                box-shadow: none !important;
                max-width: 100% !important;
                width: 100% !important;
                max-height: none !important;
                overflow: visible !important;
                padding: 0 !important;
                border-radius: 0 !important;
                border: none !important;
                animation: none !important;
            }
            .ph-report-header .ph-close-btn,
            .ph-report-footer,
            .ph-close-btn,
            .ph-report-close-btn,
            .ph-report-print-btn {
                display: none !important;
            }
            .ph-rpt-banner, .ph-rpt-summary-grid, .ph-rpt-table-wrap, .ph-rpt-grand-total {
                break-inside: avoid;
                page-break-inside: avoid;
            }
            .ph-rpt-table tr {
                break-inside: avoid;
                page-break-inside: avoid;
            }
        }
    
        /* DPI Modal Warning Overlay (Fixed full-screen backdrop) */
        #ph-dpi-modal {
            position: fixed !important;
            inset: 0 !important;
            background: rgba(15, 23, 42, 0.75) !important;
            backdrop-filter: blur(8px) !important;
            -webkit-backdrop-filter: blur(8px) !important;
            display: none !important;
            align-items: center !important;
            justify-content: center !important;
            z-index: 999999 !important;
            padding: 20px !important;
        }
        #ph-dpi-modal.show {
            display: flex !important;
        }
        .ph-dpi-card {
            background: #ffffff !important;
            border-radius: 28px !important;
            padding: 36px 32px 28px !important;
            max-width: 440px !important;
            width: 100% !important;
            box-shadow: 0 30px 90px rgba(0,0,0,0.35) !important;
            text-align: center !important;
            border: 1px solid #f1f5f9 !important;
            animation: ph-dpi-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
        }
        @keyframes ph-dpi-pop {
            from { opacity: 0; transform: scale(0.92) translateY(10px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }
        .ph-dpi-card-icon { font-size: 48px; margin-bottom: 12px; }
        .ph-dpi-card-title { font-size: 19px; font-weight: 950; color: #0f172a; margin-bottom: 10px; }
        .ph-dpi-card-body { font-size: 13px; color: #64748b; font-weight: 600; line-height: 1.6; margin-bottom: 22px; }
        .ph-dpi-card-body b { color: #d97706; }
        .ph-dpi-card-btns { display: flex; gap: 12px; }
        .ph-dpi-btn-cancel { flex: 1; padding: 12px; border: 2px solid #e2e8f0; border-radius: 14px; background: #fff; color: #64748b; font-weight: 800; cursor: pointer; transition: 0.2s; font-size: 13px; }
        .ph-dpi-btn-cancel:hover { background: #fee2e2; border-color: #fca5a5; color: #ef4444; }
        .ph-dpi-btn-confirm { flex: 1.5; padding: 12px; border: none; border-radius: 14px; background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; font-weight: 950; cursor: pointer; transition: 0.2s; font-size: 13px; box-shadow: 0 6px 18px rgba(245,158,11,0.3); }
        .ph-dpi-btn-confirm:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(245,158,11,0.4); }

        /* Auto-Trim empty space notice and buttons */
        .ph-trim-notice {
            margin: 10px 0 14px 0 !important;
            background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
            border: 1.5px solid #fde68a !important;
            border-left: 5px solid #f59e0b !important;
            border-radius: 14px !important;
            padding: 12px 16px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            gap: 12px !important;
            flex-wrap: wrap !important;
            box-shadow: 0 3px 10px rgba(245, 158, 11, 0.1) !important;
            animation: slideUpFade 0.3s ease forwards !important;
        }
        .ph-trim-icon {
            font-size: 24px !important;
            line-height: 1 !important;
        }
        .ph-trim-text {
            font-size: 12.5px !important;
            color: #92400e !important;
            line-height: 1.45 !important;
            flex: 1 !important;
            min-width: 220px !important;
        }
        .ph-trim-text strong {
            color: #78350f !important;
            font-size: 13px !important;
        }
        .ph-btn-trim {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
            color: #ffffff !important;
            border: none !important;
            padding: 8px 16px !important;
            border-radius: 10px !important;
            font-weight: 800 !important;
            font-size: 12px !important;
            cursor: pointer !important;
            display: inline-flex !important;
            align-items: center !important;
            gap: 6px !important;
            box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3) !important;
            transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
            white-space: nowrap !important;
        }
        .ph-btn-trim:hover {
            transform: translateY(-2px) !important;
            box-shadow: 0 6px 14px rgba(245, 158, 11, 0.4) !important;
            background: linear-gradient(135deg, #fbbf24 0%, #b45309 100%) !important;
        }
        .ph-btn-trim:disabled {
            opacity: 0.65 !important;
            cursor: not-allowed !important;
            transform: none !important;
        }
        .ph-trim-success {
            margin: 10px 0 14px 0 !important;
            background: #f0fdf4 !important;
            border: 1.5px solid #bbf7d0 !important;
            border-left: 5px solid #22c55e !important;
            border-radius: 14px !important;
            padding: 10px 16px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            gap: 10px !important;
            flex-wrap: wrap !important;
            animation: slideUpFade 0.3s ease forwards !important;
        }
        .ph-btn-restore {
            background: #ffffff !important;
            color: #64748b !important;
            border: 1px solid #cbd5e1 !important;
            padding: 6px 12px !important;
            border-radius: 8px !important;
            font-size: 11.5px !important;
            cursor: pointer !important;
            font-weight: 700 !important;
            transition: 0.2s !important;
        }
        .ph-btn-restore:hover {
            background: #f8fafc !important;
            color: #0f172a !important;
            border-color: #94a3b8 !important;
        }
        .ph-trim-batch-banner {
            margin-bottom: 20px !important;
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
            border: 1.5px solid #f59e0b !important;
            border-radius: 20px !important;
            padding: 14px 22px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            gap: 16px !important;
            box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15) !important;
            flex-wrap: wrap !important;
            animation: slideUpFade 0.35s ease forwards !important;
        }

        /* Suppress legacy / v3 bulk clear button in cart */
        .ph-empty-cart-btn-wrap,
        a[href*="clear_all"],
        a[href*="ph_clear_all"],
        a[href*="ph3_clear_all"],
        a[href*="ph47_clear_all"] {
            display: none !important;
        }