/* =========================================
   CONVERT URL TO QR — 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);
}

    /* ---------- STATS STRIP ---------- */
    .stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
    .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; }
    
    .text-emerald-500 { color: #10b981 !important; display: flex; align-items: center; gap: 8px; }
    .text-emerald-500::before { content: ''; width: 8px; height: 8px; background: #10b981; border-radius: 50%; box-shadow: 0 0 10px rgba(16,185,129,0.5); animation: pulse 2s infinite; }
    @keyframes pulse { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } 100% { opacity: 1; transform: scale(1); } }

    .logo-applied { color: #3b82f6 !important; }

    /* ---------- WORKSPACE GRID ---------- */
    .workspace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 40px; }
    @media (max-width: 900px) { .workspace-grid { grid-template-columns: 1fr; } }
    
    .glass-panel { 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); }
    .panel-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 16px; margin-bottom: 20px; }
    .panel-title { font-size: 16px; font-weight: 900; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
    .panel-title i { width: 18px; height: 18px; }

    .input-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
    .input-label { font-size: 12px; font-weight: 800; color: var(--text-main); }
    .c-input { width: 100%; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px 14px; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--text-main); outline: none; transition: border-color 0.2s; -webkit-appearance: none; }
    .c-input:focus { border-color: var(--primary-color); }
    .c-input:disabled { opacity: 0.7; cursor: not-allowed; background: var(--border-color); }
    
    .controls-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    
    .color-input-wrap { display: flex; align-items: center; gap: 12px; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 8px 14px; }
    .color-picker { -webkit-appearance: none; border: none; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; padding: 0; background: none; }
    .color-picker::-webkit-color-swatch-wrapper { padding: 0; }
    .color-picker::-webkit-color-swatch { border: 1px solid rgba(0,0,0,0.1); border-radius: 6px; }
    
    /* Branding Logo Drop Zone */
    .logo-drop-zone { background: var(--bg-body); border: 2px dashed var(--border-color); border-radius: 16px; padding: 30px 20px; text-align: center; cursor: pointer; transition: all 0.3s; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; }
    .logo-drop-zone:hover, .logo-drop-zone.dragging { border-color: var(--primary-color); background: var(--primary-light); }
    .dz-icon-wrap { width: 48px; height: 48px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.05); margin-bottom: 12px; color: var(--primary-color); }
    .dz-text { font-size: 13px; font-weight: 800; color: var(--text-main); margin-bottom: 4px; }
    .dz-sub { font-size: 11px; font-weight: 700; color: var(--text-muted); }
    
    .logo-preview-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--card-bg); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 10; border: 1px solid var(--border-color); border-radius: 16px; }
    .logo-preview-overlay.active { opacity: 1; pointer-events: auto; }
    
    .lp-img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; border: 1px solid var(--border-color); background: #fff; }
    .lp-info { flex: 1; margin: 0 16px; text-align: left; overflow: hidden; }
    .lp-name { font-size: 13px; font-weight: 800; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .lp-size { font-size: 11px; font-weight: 700; color: var(--text-muted); }
    
    .icon-btn { width: 32px; height: 32px; border-radius: 8px; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }
    .icon-btn.danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
    .icon-btn.danger:hover { background: #ef4444; color: #fff; }

    /* Logo Scale Control */
    .scale-control { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 16px; opacity: 0; height: 0; overflow: hidden; pointer-events: none; transition: all 0.3s; margin-top: -10px; }
    .scale-control.active { opacity: 1; height: auto; pointer-events: auto; margin-top: 10px; }
    input[type=range] { width: 100%; accent-color: var(--primary-color); }

    /* Visual Preview Panel */
    .qr-preview-container { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f8fafc; border: 1px solid var(--border-color); border-radius: 16px; padding: 30px; position: relative; overflow: hidden; min-height: 250px; margin-bottom: 20px; box-shadow: inset 0 2px 10px rgba(0,0,0,0.02); }
    #finalCanvas { max-width: 100%; height: auto; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); background: #fff; transition: transform 0.3s; }
    #finalCanvas:hover { transform: scale(1.02); }
    #qrBuffer { display: none; } /* Hidden buffer for raw QR */

    .download-footer { display: flex; flex-direction: column; }
    .act-btn { width: 100%; padding: 14px; border-radius: 12px; font-size: 14px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s; border: none; }
    .act-btn.primary { background: var(--primary-color); color: #fff; box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3); }
    .act-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(var(--primary-color-rgb), 0.4); }
    
    .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); pointer-events: auto; }
    .toast.success { border-left: 4px solid #10b981; }
    .toast.error { border-left: 4px solid #ef4444; }
    .toast.warn { border-left: 4px solid #f59e0b; }
    .toast.info { border-left: 4px solid #3b82f6; }

    /* =========================================
       ZERO INLINE STYLES EXTENSIONS
       ========================================= */
    #bgCanvas {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        pointer-events: none;
    }

    .icon-hero-badge {
        width: 14px;
        height: 14px;
    }

    .panel-title i.icon-settings-primary {
        color: var(--primary-color);
    }

    .panel-title i.icon-eye-blue {
        color: #3b82f6;
    }

    .color-hex-tag {
        font-size: 12px;
        font-family: var(--font-mono);
    }

    .dz-icon-wrap i {
        width: 24px;
        height: 24px;
    }

    #logoInput {
        display: none;
    }

    .icon-btn.danger i {
        width: 16px;
        height: 16px;
    }

    .scale-header {
        display: flex;
        justify-content: space-between;
        margin-bottom: 10px;
    }

    .scale-header .input-label {
        margin: 0;
    }

    .scale-val {
        font-family: var(--font-mono);
        font-size: 12px;
        font-weight: bold;
        color: var(--primary-color);
    }

    .cd-header i {
        width: 14px;
        height: 14px;
    }

    .glass-panel.flex-col {
        display: flex;
        flex-direction: column;
    }

    #hiddenQrBuffer {
        display: none;
    }

    .act-btn i {
        width: 16px;
        height: 16px;
    }

    .info-div-t {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        font-weight: 800;
        color: var(--text-main);
        margin-bottom: 20px;
        margin-top: 40px;
    }

    .icon-star-primary {
        width: 16px;
        height: 16px;
        color: var(--primary-color);
    }

    .toast i {
        width: 18px;
        height: 18px;
        color: var(--primary-color);
    }

