﻿    /* =========================================
       STYLE SYNC AI — PREMIUM UI
       ========================================= */
    .da-wrapper {
        --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
        --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
        display: flex;
        justify-content: center;
            padding: clamp(0px, 5vw, 0px) 20px;
    }

    .da-panel {
        position: relative;                
        width: 100%;
        max-width: 1200px;
        border-radius: 28px;
        padding: clamp(28px, 5vw, 56px);
        overflow: hidden;
    }

    

    /* ---------- HERO ---------- */
    .da-hero { text-align: center; max-width: 800px; margin: 0 auto; padding: clamp(10px, 4vw, 30px) 0; }

    .da-hero-badge {
        display: inline-flex; align-items: center; gap: 8px;
        font-size: 12.5px; font-weight: 800; letter-spacing: 0.3px;
        color: var(--primary-color); background: var(--primary-light);
        padding: 7px 16px; border-radius: 100px; margin-bottom: 22px;
    }

    .da-hero-title {
        font-size: clamp(30px, 4.4vw, 44px);
        font-weight: 900;
        line-height: 1.15;
        letter-spacing: -0.025em;
        color: var(--text-main);
        margin-bottom: 16px;
    }

    .da-hero-title em {
        font-style: normal;
        background: linear-gradient(120deg, #10b981, var(--primary-color));
        -webkit-background-clip: text; background-clip: text; color: transparent;
    }

    .da-hero-desc { font-size: 16.5px; color: var(--text-muted); line-height: 1.7; margin-bottom: 36px; }

    /* --- GLOBAL DRAG OVERLAY --- */
    .global-drag-overlay { position: fixed; inset: 0; background: rgba(var(--bg-body-rgb), 0.9); backdrop-filter: blur(8px); z-index: 100000; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: all 0.3s; border: 8px dashed var(--primary-color); }
    .global-drag-overlay.active { opacity: 1; pointer-events: auto; }
    .gdo-icon { color: var(--primary-color); margin-bottom: 24px; animation: bounce 2s infinite; }
    .gdo-title { font-size: 32px; font-weight: 900; color: var(--text-main); }
    @keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

    /* --- OPTIONS BAR --- */
    .options-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 12px 16px; margin-bottom: 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.02); }
    .ob-lbl { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-right: 4px; }
    .ob-sep { width: 1px; height: 24px; background: var(--border-color); margin: 0 4px; }
    
    .f-btn { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 8px; padding: 8px 12px; font-size: 12px; font-weight: 800; color: var(--text-muted); cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 6px; }
    .f-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
    .f-btn.on { background: var(--primary-light); color: var(--primary-color); border-color: var(--primary-color); }
    
    .usage-meter { display: flex; align-items: center; gap: 12px; margin-left: auto; }
    .usage-pips { display: flex; gap: 4px; }
    .pip { width: 8px; height: 8px; border-radius: 50%; background: var(--border-color); }
    .pip.used { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }

    /* --- DARKROOM WORKSPACE --- */
    .darkroom-workspace { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 24px; padding: 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.02); min-height: 500px; display: flex; flex-direction: column; }
    
    .panorama-dropzone { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f8fafc; border: 2px dashed var(--border-color); border-radius: 16px; padding: 60px 20px; text-align: center; cursor: pointer; transition: all 0.3s; min-height: 400px; }
    .panorama-dropzone:hover, .panorama-dropzone.dragover { border-color: var(--primary-color); background: var(--primary-light); }
    .pd-icon { color: var(--primary-color); margin-bottom: 24px; }
    .pd-title { font-size: 24px; font-weight: 900; color: var(--text-main); margin-bottom: 12px; }
    .pd-sub { font-size: 14px; font-weight: 700; color: var(--text-muted); margin-bottom: 32px; }
    .pd-btn { background: var(--primary-color); color: #fff; font-size: 14px; font-weight: 800; padding: 12px 32px; border-radius: 10px; box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3); }

    /* --- STUDIO INTERFACE --- */
    .studio-interface { display: flex; flex-direction: column; gap: 24px; }

    /* Film Strip */
    .film-strip-wrap { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 16px; padding: 16px; }
    .fs-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
    .fs-title { font-size: 14px; font-weight: 900; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
    .fs-actions { display: flex; gap: 8px; }
    .fs-btn { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 8px 12px; font-size: 12px; font-weight: 800; color: var(--text-main); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.2s; }
    .fs-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
    .fs-btn.danger { color: #ef4444; }
    .fs-btn.danger:hover { border-color: #ef4444; background: rgba(239, 68, 68, 0.1); }
    
    .film-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
    .fs-thumb { width: 90px; height: 90px; border-radius: 12px; overflow: hidden; position: relative; border: 2px solid transparent; cursor: pointer; transition: all 0.2s; flex-shrink: 0; background: #fff; }
    .fs-thumb.active { border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light); }
    .fs-thumb img, .fs-thumb canvas { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
    .fs-thumb .thumb-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; }
    .fs-thumb:hover .thumb-overlay { opacity: 1; }
    .fs-thumb .thumb-num { position: absolute; bottom: 4px; right: 4px; font-size: 10px; font-weight: 900; color: #fff; background: rgba(0,0,0,0.6); padding: 2px 6px; border-radius: 4px; backdrop-filter: blur(4px); }
    .fs-thumb .status-dot { position: absolute; top: 6px; left: 6px; width: 8px; height: 8px; background: #ef4444; border-radius: 50%; box-shadow: 0 0 0 2px #fff; transition: all 0.3s; z-index: 10; }
    .fs-thumb.processed .status-dot { background: #10b981; }

    /* Viewer Layout */
    .viewer-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; }
    @media (max-width: 1024px) { .viewer-layout { grid-template-columns: 1fr; } }

    /* Lens Container */
    .lens-container { position: relative; background: repeating-conic-gradient(rgba(255,255,255,0.05) 0% 25%, transparent 0% 50%) 0 0 / 14px 14px; border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; min-height: 400px; display: flex; flex-direction: column; }
    .badge-after { position: absolute; top: 16px; left: 16px; font-size: 11px; font-weight: 800; color: #fff; background: rgba(0,0,0,0.6); padding: 6px 12px; border-radius: 100px; z-index: 20; backdrop-filter: blur(4px); }
    .badge-before { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 800; color: #fff; background: rgba(0,0,0,0.6); padding: 6px 12px; border-radius: 100px; z-index: 20; backdrop-filter: blur(4px); }
    
    .lens-inner { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; user-select: none; }
    .lens-inner canvas { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1)); display: block; margin: auto; }
    
    .filtered-clip { position: absolute; inset: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 20px; }
    
    .slider-handle { position: absolute; top: 50%; width: 36px; height: 36px; background: var(--primary-color); border: 2px solid #fff; border-radius: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; cursor: ew-resize; z-index: 15; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
    .slider-divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--primary-color); transform: translateX(-50%); z-index: 14; pointer-events: none; }
    
    .lens-info-bar { background: rgba(0,0,0,0.8); backdrop-filter: blur(10px); padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; }
    .lib-name { font-size: 13px; font-weight: 800; color: #fff; }
    .lib-filter { font-size: 12px; font-weight: 700; color: var(--primary-color); background: rgba(var(--primary-color-rgb), 0.2); padding: 4px 10px; border-radius: 6px; }

    /* Processing Overlay */
    .processing-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
    .processing-overlay.active { opacity: 1; pointer-events: auto; }
    .po-spinner { width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.2); border-top-color: var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 16px; }
    .po-text { font-size: 14px; font-weight: 900; color: #fff; letter-spacing: 1px; }

    /* Style Deck */
    .style-deck { background: #f8fafc; border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 20px; height: 100%; max-height: 800px; overflow-y: auto; }
    .sd-header { font-size: 16px; font-weight: 900; color: var(--text-main); display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
    
    .filter-search-wrap { position: relative; }
    .filter-search { width: 100%; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 10px; padding: 10px 14px 10px 36px; font-size: 13px; font-weight: 700; color: var(--text-main); outline: none; transition: all 0.2s; }
    .filter-search:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light); }
    .fs-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

    .filter-cats { display: flex; flex-wrap: wrap; gap: 8px; }
    .cat-btn { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 100px; padding: 6px 14px; font-size: 11px; font-weight: 800; color: var(--text-muted); cursor: pointer; transition: all 0.2s; }
    .cat-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
    .cat-btn.on { background: var(--text-main); color: #fff; border-color: var(--text-main); }

    /* Dynamic Color Tool */
    .color-focus-tool { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; border-left: 4px solid var(--primary-color); }
    .cft-title { font-size: 13px; font-weight: 900; color: var(--text-main); display: flex; align-items: center; gap: 6px; }
    .cft-desc { font-size: 11px; font-weight: 700; color: var(--text-muted); line-height: 1.5; }
    .color-picker-wrap { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
    .c-picker { width: 40px; height: 40px; border: none; border-radius: 8px; cursor: pointer; padding: 0; background: none; }
    .c-picker::-webkit-color-swatch-wrapper { padding: 0; }
    .c-picker::-webkit-color-swatch { border: 2px solid var(--border-color); border-radius: 8px; }
    .hex-val { font-family: 'Space Mono', monospace; font-size: 13px; font-weight: 800; color: var(--text-main); background: #f1f5f9; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border-color); }

    /* Intensity */
    .intensity-wrap { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 16px; }
    .int-header { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 800; color: var(--text-main); margin-bottom: 12px; }
    .int-slider { width: 100%; accent-color: var(--primary-color); }

    /* Filter Grid */
    .filter-grid-wrap { border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); background: var(--bg-body); }
    .filter-grid { display: grid; grid-template-columns: 1fr; max-height: 250px; overflow-y: auto; }
    .f-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-color); cursor: pointer; transition: all 0.2s; }
    .f-card:last-child { border-bottom: none; }
    .f-card:hover { background: #f8fafc; }
    .f-card.active { background: var(--primary-light); }
    .fc-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1); flex-shrink: 0; }
    .fc-info { display: flex; flex-direction: column; }
    .fc-name { font-size: 13px; font-weight: 900; color: var(--text-main); }
    .fc-sub { font-size: 11px; font-weight: 700; color: var(--text-muted); }
    .f-card.hidden-filter { display: none; }

    /* Adjustments */
    .adjustments-wrap { display: flex; flex-direction: column; gap: 16px; }
    .adj-title { font-size: 14px; font-weight: 900; color: var(--text-main); display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border-color); }
    .adj-row { display: flex; flex-direction: column; gap: 8px; }
    .adj-label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; color: var(--text-muted); }
    .adj-slider { width: 100%; height: 4px; border-radius: 2px; outline: none; -webkit-appearance: none; background: var(--border-color); }
    .adj-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; background: #fff; border: 2px solid var(--primary-color); border-radius: 50%; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

    /* Histogram */
    .histogram-wrap { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 16px; margin-top: 10px; }
    .hist-title { font-size: 12px; font-weight: 900; color: var(--text-main); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
    .hist-canvas { width: 100%; height: 80px; background: #0f172a; border-radius: 8px; }

    /* Export Area */
    .export-area { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; padding-top: 20px; border-top: 1px solid var(--border-color); }
    .exp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .exp-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 10px; font-size: 13px; font-weight: 900; cursor: pointer; transition: all 0.2s; border: none; }
    .exp-btn.secondary { background: var(--bg-body); color: var(--text-main); border: 1px solid var(--border-color); }
    .exp-btn.secondary:hover { border-color: var(--primary-color); color: var(--primary-color); background: var(--primary-light); }
    .exp-btn.primary { background: var(--primary-color); color: #fff; box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3); }
    .exp-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(var(--primary-color-rgb), 0.4); }

    /* --- STATS STRIP --- */
    .stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 24px; margin-bottom: 40px; }
    .sc { background: var(--card-bg); border-radius: 16px; padding: 20px; border: 1px solid var(--border-color); display: flex; flex-direction: column; box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
    .sc-lbl { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
    .sc-val { font-size: 24px; font-weight: 900; color: var(--text-main); font-family: 'Space Mono', monospace; }
    
    .sc.c-red .sc-lbl i { color: #ef4444; width: 14px; height: 14px; }
    .sc.c-blue .sc-lbl i { color: #3b82f6; width: 14px; height: 14px; }
    .sc.c-indigo .sc-lbl i { color: #6366f1; width: 14px; height: 14px; }
    .sc.c-green .sc-lbl i { color: #10b981; width: 14px; height: 14px; }

    /* ── Comparison Panel & Analytics ── */
    .comparison-panel {
        background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 24px;
        padding: 28px; margin-top: 32px; box-shadow: 0 10px 30px rgba(0,0,0,0.02); margin-bottom: 40px;
    }
    .cp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
    .cp-title { font-size: 16px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 10px; }
    .cp-badge { font-size: 12px; font-weight: 800; padding: 6px 14px; border-radius: 100px; }
    .badge-high { background: color-mix(in srgb, var(--success, #10b981) 15%, transparent); color: var(--success, #10b981); border: 1px solid color-mix(in srgb, var(--success, #10b981) 30%, transparent); }

    .cp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
    .cp-card { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
    .cpc-header { display: flex; justify-content: space-between; align-items: center; }
    .cpc-title { font-size: 13.5px; font-weight: 800; color: var(--text-main); }
    .cpc-tag { font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 6px; }
    .cpc-tag.success { background: color-mix(in srgb, var(--success, #10b981) 15%, transparent); color: var(--success, #10b981); }

    .cpc-body { display: flex; flex-direction: column; gap: 10px; }
    .cpc-stat-row { font-size: 13px; color: var(--text-muted); display: flex; justify-content: space-between; }
    .cpc-stat-row strong { color: var(--text-main); font-weight: 700; }
    .cpc-progress-bar { width: 100%; height: 8px; background: var(--border-color); border-radius: 100px; overflow: hidden; margin-top: 4px; }
    .cpc-progress-fill { height: 100%; background: var(--primary-color); border-radius: 100px; transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
    .cpc-progress-fill.bg-gradient { background: linear-gradient(90deg, var(--primary-color), var(--primary-gradient-end)); }

    /* Toast */
    .toast { position: fixed; bottom: 24px; right: 24px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px 20px; display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; color: var(--text-main); box-shadow: 0 10px 30px rgba(0,0,0,0.1); z-index: 100000; opacity: 0; pointer-events: none; transform: translateY(20px); transition: all 0.3s var(--ease-spring); }
    .toast.show { opacity: 1; transform: translateY(0); }
   