    /* V38: Header blanco estilo Rotulemos.com */
    .rlm-site-header {
        background: #fff;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
    }
    
    .rlm-header-container {
        max-width: 1400px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .rlm-logo-link {
        text-decoration: none;
        display: flex;
        align-items: baseline;
    }
    
    .rlm-logo-text {
        font-family: 'Montserrat', sans-serif;
        font-size: 2.2rem;
        font-weight: 700;
        letter-spacing: -1px;
    }
    
    .rlm-logo-text .purple { color: #90439e; }
    .rlm-logo-text .black { color: #333; }
    .rlm-logo-com {
        font-family: 'Montserrat', sans-serif;
        font-size: 1.1rem;
        font-weight: 400;
        color: #666;
        margin-left: 2px;
    }
    
    .rlm-header-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        font-size: 0.9rem;
        color: #555;
    }
    
    .rlm-header-info strong {
        color: #333;
    }
    
    .rlm-header-search {
        flex: 1;
        max-width: 400px;
        min-width: 200px;
    }
    
    .rlm-search-input {
        width: 100%;
        padding: 10px 15px;
        border: 1px solid #ddd;
        border-radius: 25px;
        font-size: 0.9rem;
        outline: none;
        transition: border-color 0.2s;
    }
    
    .rlm-search-input:focus {
        border-color: #90439e;
    }
    
    .rlm-search-input::placeholder {
        color: #999;
    }
    
    .rlm-header-icons {
        display: flex;
        align-items: center;
        gap: 15px;
    }
    
    .rlm-icon-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 1px solid #ddd;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        color: #555;
        position: relative;
    }
    
    .rlm-icon-btn:hover {
        border-color: #90439e;
        color: #90439e;
    }
    
    .rlm-icon-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .rlm-cart-badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background: #90439e;
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* V38: Línea divisoria morada animada */
    .rlm-divider {
        height: 4px;
        background: linear-gradient(90deg, #90439e, #c850c0, #90439e, #667eea, #90439e);
        background-size: 200% 100%;
        animation: shimmer 3s ease-in-out infinite;
    }
    
    @keyframes shimmer {
        0%, 100% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
    }
    
    /* V38: Responsive header */
    @media (max-width: 768px) {
        .rlm-site-header {
            padding: 10px 15px;
        }
        
        .rlm-header-container {
            justify-content: center;
        }
        
        .rlm-logo-text {
            font-size: 1.6rem;
        }
        
        .rlm-header-info {
            display: none;
        }
        
        .rlm-header-search {
            order: 3;
            flex: 0 0 100%;
            max-width: 100%;
            margin-top: 10px;
        }
    }
    
    /* ============================================================================
       VARIABLES Y RESET
       ============================================================================ */
    :root {
        --primary: #90439e;
        --primary-hover: #a350b3;
        --primary-glow: rgba(144, 67, 158, 0.4);
        --primary-subtle: rgba(144, 67, 158, 0.15);
        --secondary: #667eea;
        --accent: #00d4aa;
        --bg-darkest: #0a0a0f;
        --bg-dark: #12121a;
        --bg-card: #1a1a24;
        --bg-elevated: #252530;
        --border-dark: rgba(255,255,255,0.08);
        --border-medium: rgba(255,255,255,0.12);
        --border-light: rgba(255,255,255,0.18);
        --text-white: #ffffff;
        --text-primary: #f0f0f5;
        --text-secondary: #a0a0b0;
        --text-muted: #6a6a7a;
        --success: #10b981;
        --warning: #f59e0b;
        --error: #ef4444;
        --neon-pink: #ff00ff;
        --neon-blue: #00ffff;
        --neon-green: #00ff88;
        --radius-sm: 8px;
        --radius-md: 12px;
        --radius-lg: 16px;
        --radius-xl: 24px;
        --shadow-glow: 0 0 30px var(--primary-glow);
        --shadow-neon: 0 0 20px var(--neon-pink), 0 0 40px var(--neon-blue);
    }
    
    *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
    
    body {
        font-family: 'Inter', -apple-system, sans-serif;
        background: var(--bg-darkest);
        color: var(--text-primary);
        line-height: 1.6;
        min-height: 100vh;
        overflow-x: hidden;
    }
    
    /* ============================================================================
       LAYOUT PRINCIPAL
       ============================================================================ */
    .app { display: flex; flex-direction: column; min-height: 100vh; }
    
    .header {
        background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(18,18,26,0.95) 100%);
        border-bottom: 1px solid var(--border-dark);
        padding: 12px 24px;
        position: sticky;
        top: 0;
        z-index: 100;
        backdrop-filter: blur(10px);
    }
    
    .header-inner {
        max-width: 1800px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
    .logo img { height: 32px; }
    .logo-text { color: var(--text-white); font-weight: 600; font-size: 1.1rem; }
    
    .badge-pro {
        background: linear-gradient(135deg, var(--primary), #c850c0);
        color: white;
        font-size: 10px;
        font-weight: 700;
        padding: 4px 10px;
        border-radius: 4px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .header-actions { display: flex; align-items: center; gap: 16px; }
    
    .btn-header {
        background: var(--bg-card);
        border: 1px solid var(--border-medium);
        border-radius: var(--radius-sm);
        padding: 8px 16px;
        color: var(--text-secondary);
        font-size: 0.85rem;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .btn-header:hover { border-color: var(--primary); color: var(--primary); }
    
    .main {
        flex: 1;
        display: grid;
        grid-template-columns: 400px 1fr 320px;
        max-width: 1800px;
        margin: 0 auto;
        width: 100%;
    }
    
    @media (max-width: 1400px) { .main { grid-template-columns: 380px 1fr; } .panel-tools { display: none; } }
    @media (max-width: 1024px) { .main { grid-template-columns: 1fr; } }
    
    /* ============================================================================
       PANEL IZQUIERDO - FORMULARIO
       ============================================================================ */
    .panel-form {
        background: var(--bg-dark);
        border-right: 1px solid var(--border-dark);
        padding: 20px;
        overflow-y: auto;
        max-height: calc(100vh - 57px);
    }
    
    .panel-title {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--text-white);
        margin-bottom: 4px;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .panel-subtitle { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 20px; }
    
    /* Steps */
    .step { margin-bottom: 16px; }
    .step-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border-dark);
    }
    .step-num {
        width: 24px; height: 24px;
        background: var(--primary);
        color: white;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        font-size: 11px; font-weight: 700;
    }
    .step-title { font-size: 0.85rem; font-weight: 600; color: var(--text-white); }
    .step-opt { color: var(--text-muted); font-size: 0.75rem; font-weight: 400; }
    
    /* Categorías Grid */
    .cat-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .cat-btn {
        background: var(--bg-card);
        border: 2px solid var(--border-dark);
        border-radius: var(--radius-sm);
        padding: 8px 4px;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }
    .cat-btn:hover { border-color: var(--primary); transform: translateY(-2px); }
    .cat-btn.active {
        border-color: var(--primary);
        background: var(--primary-subtle);
        box-shadow: var(--shadow-glow);
    }
    .cat-btn img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; }
    .cat-btn span { font-size: 8px; color: var(--text-secondary); text-align: center; line-height: 1.2; }
    .cat-btn.active span { color: var(--primary); font-weight: 600; }
    
    /* V29: Selector de materiales corte láser */
    .material-laser-selector {
        background: var(--bg-card);
        border-radius: var(--radius-md);
        padding: 12px;
    }
    
    .material-laser-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .material-laser-btn {
        background: var(--bg-page);
        border: 2px solid var(--border-dark);
        border-radius: var(--radius-sm);
        padding: 8px;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    
    .material-laser-btn:hover {
        border-color: var(--primary);
        transform: translateY(-2px);
    }
    
    .material-laser-btn.active {
        border-color: var(--primary);
        background: var(--primary-subtle);
        box-shadow: var(--shadow-glow);
    }
    
    .material-laser-btn .material-preview {
        width: 50px;
        height: 50px;
        border-radius: 8px;
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .material-laser-btn .material-name {
        font-size: 0.6rem;
        color: var(--text-secondary);
        text-align: center;
        line-height: 1.2;
        font-weight: 500;
    }
    
    .material-laser-btn.active .material-name {
        color: var(--primary);
        font-weight: 600;
    }
    
    @media (max-width: 400px) {
        .material-laser-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    
    /* Hints */
    .cat-hint {
        background: linear-gradient(135deg, var(--primary-subtle), rgba(102, 126, 234, 0.1));
        border: 1px solid var(--primary);
        border-radius: var(--radius-sm);
        padding: 10px;
        margin-top: 10px;
        display: none;
        animation: fadeIn 0.3s ease;
    }
    .cat-hint.active { display: block; }
    .cat-hint-title { font-size: 0.8rem; font-weight: 600; color: var(--primary); margin-bottom: 4px; }
    .cat-hint-text { font-size: 0.7rem; color: var(--text-secondary); line-height: 1.4; }
    
    @keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
    
    /* Form Elements */
    .form-group { margin-bottom: 12px; }
    .form-group label {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.75rem;
        color: var(--text-secondary);
        margin-bottom: 6px;
        font-weight: 500;
    }
    .form-group label .required { color: var(--error); }
    
    .form-input {
        width: 100%;
        background: var(--bg-card);
        border: 1px solid var(--border-dark);
        border-radius: var(--radius-sm);
        padding: 10px 12px;
        font-size: 0.85rem;
        color: var(--text-primary);
        font-family: inherit;
        transition: all 0.2s;
    }
    .form-input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-subtle);
    }
    .form-input::placeholder { color: var(--text-muted); }
    
    .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    
    /* Textarea con botón mejorar */
    .textarea-wrap { position: relative; }
    .textarea-wrap textarea {
        padding-bottom: 44px;
        min-height: 90px;
        resize: vertical;
    }
    
    .btn-improve {
        position: absolute;
        right: 8px;
        bottom: 8px;
        background: linear-gradient(135deg, var(--primary), #c850c0);
        border: none;
        border-radius: 6px;
        padding: 6px 12px;
        font-size: 11px;
        font-weight: 600;
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 4px;
        transition: all 0.2s;
    }
    .btn-improve:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(144, 67, 158, 0.4); }
    .btn-improve:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
    
    /* Color Swatches */
    .color-picker-row { display: flex; gap: 8px; align-items: center; }
    .color-picker-row input[type="text"] { flex: 1; }
    .color-picker-swatches { display: flex; gap: 4px; }
    .color-swatch {
        width: 26px; height: 26px;
        border-radius: 6px;
        border: 2px solid transparent;
        cursor: pointer;
        transition: all 0.2s;
        position: relative;
    }
    .color-swatch:hover { transform: scale(1.15); }
    .color-swatch.active {
        border-color: white;
        box-shadow: 0 0 12px currentColor;
    }
    .color-swatch.active::after {
        content: '✓';
        position: absolute;
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        color: white;
        font-size: 10px;
        font-weight: bold;
        text-shadow: 0 0 2px black;
    }
    
    /* Paleta PANTONE */
    .pantone-palette {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .pantone-row {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
    }
    .pantone-palette .color-swatch {
        width: 32px; 
        height: 32px;
        border-radius: 4px;
        border: 1px solid rgba(255,255,255,0.2);
    }
    .pantone-palette .color-swatch:hover {
        transform: scale(1.1);
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
    
    /* ========================================
       V14: COLOR PICKER HSB
       ======================================== */
    .color-picker-hsb {
        background: var(--bg-card);
        border-radius: var(--radius-md);
        padding: 12px;
        margin-top: 8px;
    }
    .color-picker-tabs {
        display: flex;
        gap: 8px;
        margin-bottom: 10px;
    }
    .color-picker-tab {
        flex: 1;
        padding: 8px;
        background: var(--bg-page);
        border: 1px solid var(--border-dark);
        border-radius: var(--radius-sm);
        font-size: 0.7rem;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s;
    }
    .color-picker-tab.active {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }
    .color-gradient-box {
        position: relative;
        width: 100%;
        height: 150px;
        border-radius: var(--radius-sm);
        cursor: crosshair;
        margin-bottom: 10px;
        background: hsl(0, 100%, 50%);
    }
    .color-gradient-overlay {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        border-radius: var(--radius-sm);
    }
    .color-picker-cursor {
        position: absolute;
        width: 14px;
        height: 14px;
        border: 2px solid white;
        border-radius: 50%;
        box-shadow: 0 0 4px rgba(0,0,0,0.5);
        pointer-events: none;
        transform: translate(-50%, -50%);
    }
    .color-hue-slider {
        width: 100%;
        height: 16px;
        border-radius: 8px;
        background: linear-gradient(to right, 
            #ff0000 0%, #ffff00 17%, #00ff00 33%, 
            #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
        cursor: pointer;
        position: relative;
        margin-bottom: 10px;
    }
    .hue-slider-thumb {
        position: absolute;
        top: -2px;
        width: 8px;
        height: 20px;
        background: white;
        border: 1px solid #333;
        border-radius: 4px;
        transform: translateX(-50%);
        cursor: grab;
    }
    .color-preview-row {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .color-preview-swatch {
        width: 40px;
        height: 40px;
        border-radius: var(--radius-sm);
        border: 2px solid white;
    }
    .color-hex-input {
        flex: 1;
        padding: 8px;
        background: var(--bg-page);
        border: 1px solid var(--border-dark);
        border-radius: var(--radius-sm);
        color: var(--text-primary);
        font-size: 0.8rem;
        font-family: monospace;
    }
    .btn-add-color {
        background: var(--primary);
        border: none;
        border-radius: var(--radius-sm);
        padding: 8px 16px;
        color: white;
        font-size: 0.75rem;
        font-weight: 600;
        cursor: pointer;
    }
    .btn-add-color:hover { background: var(--primary-hover); }
    
    /* Paleta de colores seleccionados */
    .selected-colors {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        margin-top: 10px;
    }
    .selected-color-chip {
        display: flex;
        align-items: center;
        gap: 4px;
        background: var(--bg-page);
        border: 1px solid var(--border-dark);
        border-radius: 20px;
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    .selected-color-chip .color-dot {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        border: 1px solid rgba(255,255,255,0.3);
    }
    .selected-color-chip .remove-color {
        background: transparent;
        border: none;
        color: var(--text-muted);
        cursor: pointer;
        font-size: 0.8rem;
        padding: 0 2px;
    }
    .selected-color-chip .remove-color:hover { color: var(--error); }
    
    /* ========================================
       V14: SELECTOR DE TIPOGRAFÍAS
       ======================================== */
    .font-selector {
        margin-top: 10px;
    }
    .font-dropdown {
        position: relative;
    }
    .font-dropdown-btn {
        width: 100%;
        padding: 10px 12px;
        background: var(--bg-card);
        border: 1px solid var(--border-dark);
        border-radius: var(--radius-sm);
        color: var(--text-primary);
        font-size: 0.85rem;
        text-align: left;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .font-dropdown-btn:hover { border-color: var(--primary); }
    .font-dropdown-list {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: 250px;
        overflow-y: auto;
        background: var(--bg-card);
        border: 1px solid var(--border-dark);
        border-radius: var(--radius-sm);
        margin-top: 4px;
        z-index: 100;
        display: none;
    }
    .font-dropdown-list.open { display: block; }
    .font-dropdown-item {
        padding: 10px 12px;
        cursor: pointer;
        font-size: 0.85rem;
        border-bottom: 1px solid var(--border-dark);
    }
    .font-dropdown-item:hover { background: var(--primary-subtle); }
    .font-dropdown-item.active { background: var(--primary); color: white; }
    .font-dropdown-search {
        width: 100%;
        padding: 10px;
        border: none;
        border-bottom: 1px solid var(--border-dark);
        background: var(--bg-page);
        color: var(--text-primary);
        font-size: 0.8rem;
    }
    
    /* ========================================
       V14: SELECTOR DE TIPOS DE LETRAS CORPÓREAS
       ======================================== */
    .corporea-type-selector {
        display: none;
        margin-top: 12px;
    }
    .corporea-type-selector.visible { display: block; }
    .corporea-types-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .corporea-type-btn {
        background: var(--bg-card);
        border: 1px solid var(--border-dark);
        border-radius: var(--radius-sm);
        padding: 10px 8px;
        cursor: pointer;
        transition: all 0.2s;
        text-align: center;
    }
    .corporea-type-btn:hover {
        border-color: var(--primary);
        background: var(--primary-subtle);
    }
    .corporea-type-btn.active {
        border-color: var(--primary);
        background: var(--primary);
    }
    .corporea-type-btn .type-icon {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }
    .corporea-type-btn .type-name {
        font-size: 0.65rem;
        color: var(--text-secondary);
        line-height: 1.2;
    }
    .corporea-type-btn.active .type-name { color: white; }
    
    /* Relief selector para corpóreas */
    .relief-selector {
        margin-top: 12px;
        display: none;
    }
    .relief-selector.visible { display: block; }
    .relief-options {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    .relief-option {
        flex: 1;
        min-width: 80px;
        padding: 12px 8px;
        background: var(--bg-card);
        border: 1px solid var(--border-dark);
        border-radius: var(--radius-sm);
        cursor: pointer;
        text-align: center;
        transition: all 0.2s;
    }
    .relief-option:hover { border-color: var(--primary); }
    .relief-option.active {
        border-color: var(--primary);
        background: var(--primary);
    }
    .relief-option .relief-icon {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }
    .relief-option .relief-value {
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--text-primary);
    }
    .relief-option.active .relief-value { color: white; }
    .relief-option .relief-label {
        font-size: 0.65rem;
        color: var(--text-muted);
    }
    .relief-option.active .relief-label { color: rgba(255,255,255,0.7); }
    
    /* V15: Selector de color de luz LED */
    .luz-color-selector {
        margin-top: 12px;
        display: none;
    }
    .luz-color-selector.visible { display: block; }
    .luz-colors-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
    .luz-color-btn {
        padding: 8px 4px;
        background: var(--bg-card);
        border: 2px solid var(--border-dark);
        border-radius: var(--radius-sm);
        cursor: pointer;
        text-align: center;
        transition: all 0.2s;
    }
    .luz-color-btn:hover { border-color: var(--primary); transform: scale(1.05); }
    .luz-color-btn.active {
        border-color: var(--primary);
        box-shadow: 0 0 8px rgba(144, 67, 158, 0.5);
    }
    .luz-color-btn .luz-preview {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        margin: 0 auto 4px;
        box-shadow: 0 0 10px currentColor;
    }
    .luz-color-btn .luz-name {
        font-size: 0.6rem;
        color: var(--text-secondary);
        line-height: 1.1;
    }
    .luz-color-btn.active .luz-name { color: var(--primary); font-weight: 600; }
    
    /* ========================================
       V14: MOCKUP 3D PRO - DISEÑO EN PARED
       ======================================== */
    .mockup-3d-container {
        position: relative;
        width: 100%;
        height: 500px;
        background: #0a0a12;
        border-radius: var(--radius-md);
        overflow: hidden;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }
    
    .mockup-3d-container * {
        user-select: none;
        -webkit-user-select: none;
    }
    
    #threejs-canvas {
        width: 100%;
        height: 100%;
        display: block;
        cursor: grab;
        outline: none;
    }
    
    #threejs-canvas:active {
        cursor: grabbing;
    }
    
    /* Selector de escenarios */
    .mockup-3d-scenes {
        position: absolute;
        top: 12px;
        right: 12px;
        display: flex;
        gap: 6px;
        z-index: 20;
        background: rgba(0,0,0,0.85);
        padding: 8px 12px;
        border-radius: var(--radius-sm);
        backdrop-filter: blur(10px);
    }
    
    .scene-btn {
        width: 38px;
        height: 38px;
        border: 2px solid transparent;
        border-radius: 8px;
        background: rgba(255,255,255,0.1);
        cursor: pointer;
        font-size: 1.2rem;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .scene-btn:hover {
        background: rgba(255,255,255,0.25);
        transform: scale(1.1);
    }
    
    .scene-btn.active {
        border-color: var(--primary);
        background: rgba(144, 67, 158, 0.4);
        box-shadow: 0 0 12px rgba(144,67,158,0.5);
    }
    
    /* Controles de posición */
    .mockup-3d-position {
        position: absolute;
        top: 12px;
        left: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        z-index: 20;
        background: rgba(0,0,0,0.85);
        padding: 10px;
        border-radius: var(--radius-sm);
        backdrop-filter: blur(10px);
    }
    
    .mockup-3d-position .pos-row {
        display: flex;
        gap: 4px;
    }
    
    .pos-btn {
        width: 32px;
        height: 32px;
        border: 1px solid rgba(255,255,255,0.3);
        border-radius: 6px;
        background: rgba(255,255,255,0.1);
        color: white;
        cursor: pointer;
        font-size: 0.8rem;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .pos-btn:hover {
        background: var(--primary);
        border-color: var(--primary);
    }
    
    .pos-btn.center {
        background: rgba(144,67,158,0.4);
        border-color: var(--primary);
    }
    
    /* Controles principales */
    .mockup-3d-controls {
        position: absolute;
        bottom: 12px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 18px;
        background: rgba(0,0,0,0.92);
        padding: 14px 24px;
        border-radius: var(--radius-md);
        z-index: 20;
        align-items: center;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.1);
    }
    
    .mockup-3d-control {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    .mockup-3d-control label {
        font-size: 0.6rem;
        color: rgba(255,255,255,0.7);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 500;
    }
    
    .mockup-3d-control input[type="range"] {
        width: 80px;
        height: 5px;
        -webkit-appearance: none;
        background: rgba(255,255,255,0.15);
        border-radius: 3px;
    }
    
    .mockup-3d-control input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        background: linear-gradient(135deg, var(--primary), #c850c0);
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    }
    
    .mockup-3d-control span {
        font-size: 0.6rem;
        color: var(--primary);
        font-weight: 600;
    }
    
    .mockup-3d-control .depth-display {
        background: rgba(144,67,158,0.3);
        padding: 4px 10px;
        border-radius: 4px;
        font-size: 0.75rem;
    }
    
    /* V26: Estilos para selector de espesor */
    .depth-select {
        padding: 6px 12px;
        border-radius: 6px;
        background: #ffffff;
        color: #000000;
        border: 1px solid rgba(255,255,255,0.3);
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .depth-select:hover {
        background: var(--primary);
        color: #ffffff;
        border-color: var(--primary);
    }
    
    .depth-select:focus {
        outline: none;
    }

    /* ========================================
       V31: CONTROLES DE ILUMINACIÓN HDRI
       ======================================== */
    .lighting-controls {
        position: absolute;
        bottom: 20px;
        right: 20px;
        background: rgba(0, 0, 0, 0.9);
        border-radius: 12px;
        padding: 16px;
        z-index: 20;
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
        max-width: 200px;
    }

    .lighting-header h4 {
        margin: 0 0 12px 0;
        font-size: 0.9rem;
        color: white;
        font-weight: 600;
        text-align: center;
    }

    .lighting-modes {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .lighting-btn {
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid transparent;
        border-radius: 8px;
        padding: 10px 14px;
        color: rgba(255, 255, 255, 0.8);
        font-size: 0.85rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .lighting-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        color: white;
        transform: translateX(4px);
    }

    .lighting-btn.active {
        background: linear-gradient(135deg, var(--primary), #c850c0);
        border-color: var(--primary);
        color: white;
        box-shadow: 0 4px 16px rgba(144, 67, 158, 0.4);
    }

    .lighting-btn.active:hover {
        transform: translateX(2px);
        box-shadow: 0 6px 20px rgba(144, 67, 158, 0.6);
    }

    @media (max-width: 768px) {
        .lighting-controls {
            bottom: 10px;
            right: 10px;
            max-width: 180px;
            padding: 12px;
        }

        .lighting-btn {
            padding: 8px 12px;
            font-size: 0.8rem;
        }
    }

    /* ========================================
       V31: CONTROLES POST-PROCESSING
       ======================================== */
    .postprocessing-controls {
        position: absolute;
        bottom: 20px;
        left: 20px;
        background: rgba(0, 0, 0, 0.9);
        border-radius: 12px;
        padding: 16px;
        z-index: 20;
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
        min-width: 220px;
    }

    .pp-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
    }

    .pp-header h4 {
        margin: 0;
        font-size: 0.9rem;
        color: white;
        font-weight: 600;
    }

    .pp-toggle-btn {
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid transparent;
        border-radius: 6px;
        padding: 4px 10px;
        color: white;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.3s;
    }

    .pp-toggle-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: var(--primary);
    }

    .pp-options {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .pp-option {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .pp-option label {
        display: flex;
        align-items: center;
        gap: 8px;
        color: rgba(255, 255, 255, 0.9);
        font-size: 0.85rem;
        font-weight: 500;
        cursor: pointer;
        transition: color 0.2s;
    }

    .pp-option label:hover {
        color: white;
    }

    .pp-option input[type="checkbox"] {
        width: 16px;
        height: 16px;
        cursor: pointer;
        accent-color: var(--primary);
    }

    .pp-option input[type="range"] {
        width: 100%;
        height: 4px;
        -webkit-appearance: none;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 2px;
        outline: none;
    }

    .pp-option input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 14px;
        height: 14px;
        background: linear-gradient(135deg, var(--primary), #c850c0);
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    }

    .pp-option input[type="range"]::-moz-range-thumb {
        width: 14px;
        height: 14px;
        background: linear-gradient(135deg, var(--primary), #c850c0);
        border-radius: 50%;
        cursor: pointer;
        border: none;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    }

    @media (max-width: 768px) {
        .postprocessing-controls {
            bottom: 10px;
            left: 10px;
            min-width: 180px;
            padding: 12px;
        }

        .pp-header h4 {
            font-size: 0.8rem;
        }

        .pp-option label {
            font-size: 0.75rem;
        }
    }

    /* ========================================
       V31: LIVE TEXT EDITOR INDICATOR
       ======================================== */
    .typing-indicator {
        position: absolute;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(144, 67, 158, 0.95);
        color: white;
        padding: 12px 24px;
        border-radius: 24px;
        display: flex;
        align-items: center;
        gap: 12px;
        z-index: 100;
        box-shadow: 0 4px 16px rgba(144, 67, 158, 0.4);
        backdrop-filter: blur(10px);
        animation: fadeInDown 0.3s ease;
    }

    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateX(-50%) translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
    }

    .typing-dots {
        display: flex;
        gap: 4px;
    }

    .typing-dots span {
        width: 6px;
        height: 6px;
        background: white;
        border-radius: 50%;
        animation: typingBounce 1.4s infinite ease-in-out;
    }

    .typing-dots span:nth-child(1) {
        animation-delay: 0s;
    }

    .typing-dots span:nth-child(2) {
        animation-delay: 0.2s;
    }

    .typing-dots span:nth-child(3) {
        animation-delay: 0.4s;
    }

    @keyframes typingBounce {
        0%, 60%, 100% {
            transform: translateY(0);
            opacity: 1;
        }
        30% {
            transform: translateY(-8px);
            opacity: 0.7;
        }
    }

    .typing-text {
        font-size: 0.9rem;
        font-weight: 600;
        letter-spacing: 0.3px;
    }

        box-shadow: 0 0 0 2px rgba(144,67,158,0.5);
    }
    
    .depth-select option {
        background: #ffffff;
        color: #000000;
        padding: 8px;
    }
    
    .mockup-3d-info {
        position: absolute;
        bottom: 130px; /* V29.6: Subido de 80px a 130px para no ser tapado por controles */
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0,0,0,0.7);
        padding: 6px 18px;
        border-radius: 20px;
        font-size: 0.65rem;
        color: rgba(255,255,255,0.8);
        z-index: 10;
    }
    
    .mockup-3d-btn {
        background: linear-gradient(135deg, rgba(144,67,158,0.3), rgba(200,80,192,0.3));
        border: 1px solid rgba(200,80,192,0.5);
        border-radius: var(--radius-sm);
        padding: 10px 16px;
        color: white;
        font-size: 0.75rem;
        cursor: pointer;
        transition: all 0.2s;
        font-weight: 500;
    }
    
    .mockup-3d-btn:hover { 
        background: linear-gradient(135deg, var(--primary), #c850c0);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(144,67,158,0.5);
    }
    
    .mockup-3d-loading,
    .mockup-3d-nodesign {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.95);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 15px;
        z-index: 100;
    }
    
    .mockup-3d-loading .loading-spinner {
        width: 50px;
        height: 50px;
        border: 3px solid rgba(255,255,255,0.1);
        border-top-color: var(--primary);
        border-radius: 50%;
        animation: spin3d 1s linear infinite;
    }
    
    @keyframes spin3d {
        to { transform: rotate(360deg); }
    }
    
    .mockup-3d-loading p,
    .mockup-3d-nodesign p {
        color: white;
        font-size: 1rem;
        margin: 0;
    }
    
    .mockup-3d-nodesign p:first-child {
        font-size: 2.5rem;
    }
    
    @media (max-width: 768px) {
        .mockup-3d-container { height: 400px; }
        .mockup-3d-scenes { top: 8px; right: 8px; gap: 4px; padding: 6px 8px; }
        .scene-btn { width: 32px; height: 32px; font-size: 1rem; }
        .mockup-3d-position { top: 8px; left: 8px; padding: 6px; }
        .pos-btn { width: 28px; height: 28px; }
        .mockup-3d-controls { gap: 12px; padding: 10px 16px; flex-wrap: wrap; max-width: 95%; }
        .mockup-3d-control input[type="range"] { width: 60px; }
    }
    /* ========================================
       V14: SISTEMA DE CAPAS MOCKUP
       ======================================== */
    .mockup-layers-panel {
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(0,0,0,0.75);
        border-radius: var(--radius-sm);
        padding: 8px;
        min-width: 150px;
        z-index: 20;
    }
    .mockup-layers-title {
        font-size: 0.7rem;
        color: var(--text-muted);
        margin-bottom: 8px;
        padding-bottom: 4px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .mockup-layer-item {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px;
        border-radius: 4px;
        margin-bottom: 4px;
        cursor: pointer;
        transition: background 0.2s;
    }
    .mockup-layer-item:hover { background: rgba(255,255,255,0.1); }
    .mockup-layer-item.active { background: var(--primary); }
    .mockup-layer-thumb {
        width: 30px;
        height: 30px;
        border-radius: 4px;
        background: #333;
        object-fit: cover;
    }
    .mockup-layer-info {
        flex: 1;
        min-width: 0;
    }
    .mockup-layer-name {
        font-size: 0.65rem;
        color: var(--text-primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mockup-layer-cat {
        font-size: 0.55rem;
        color: var(--text-muted);
    }
    .mockup-layer-actions {
        display: flex;
        gap: 2px;
    }
    .mockup-layer-btn {
        background: transparent;
        border: none;
        color: var(--text-muted);
        cursor: pointer;
        font-size: 0.7rem;
        padding: 2px 4px;
    }
    .mockup-layer-btn:hover { color: white; }
    .mockup-layer-btn.delete:hover { color: var(--error); }
    
    /* Botón añadir capa */
    .btn-add-layer {
        width: 100%;
        padding: 6px;
        background: var(--primary-subtle);
        border: 1px dashed var(--primary);
        border-radius: 4px;
        color: var(--primary);
        font-size: 0.65rem;
        cursor: pointer;
        margin-top: 8px;
    }
    .btn-add-layer:hover { background: var(--primary); color: white; }
    
    /* Upload Area */
    .upload-area {
        border: 2px dashed var(--border-medium);
        border-radius: var(--radius-md);
        padding: 16px;
        text-align: center;
        cursor: pointer;
        background: var(--bg-card);
        transition: all 0.2s;
    }
    .upload-area:hover { border-color: var(--primary); background: var(--primary-subtle); }
    .upload-icon { font-size: 24px; margin-bottom: 4px; }
    .upload-text { font-size: 0.8rem; color: var(--text-secondary); }
    .upload-hint { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }
    
    .upload-preview { display: inline-block; position: relative; }
    .upload-preview img { max-width: 70px; border-radius: 8px; background: white; padding: 4px; }
    .upload-remove {
        position: absolute; top: -8px; right: -8px;
        width: 20px; height: 20px;
        background: var(--error);
        border: 2px solid var(--bg-card);
        border-radius: 50%;
        color: white; font-size: 10px;
        cursor: pointer;
        display: flex; align-items: center; justify-content: center;
    }
    
    /* Style Pills */
    .style-pills { display: flex; flex-wrap: wrap; gap: 6px; }
    .style-pill {
        background: var(--bg-card);
        border: 1px solid var(--border-dark);
        border-radius: 16px;
        padding: 6px 12px;
        font-size: 0.7rem;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s;
    }
    .style-pill:hover { border-color: var(--primary); color: var(--text-primary); }
    .style-pill.active {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }
    
    /* Error Message */
    .error-msg {
        background: rgba(239, 68, 68, 0.15);
        border: 1px solid rgba(239, 68, 68, 0.4);
        border-radius: var(--radius-sm);
        padding: 10px;
        color: #fca5a5;
        font-size: 0.8rem;
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    /* Generate Button */
    .btn-generate {
        width: 100%;
        background: linear-gradient(135deg, var(--primary), #c850c0);
        border: none;
        border-radius: var(--radius-md);
        padding: 14px;
        font-size: 1rem;
        font-weight: 600;
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin-top: 16px;
        transition: all 0.3s;
        position: relative;
        overflow: hidden;
    }
    .btn-generate::before {
        content: '';
        position: absolute;
        top: 0; left: -100%;
        width: 100%; height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.5s;
    }
    .btn-generate:hover::before { left: 100%; }
    .btn-generate:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(144, 67, 158, 0.4); }
    .btn-generate:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
    
    /* ============================================================================
       PANEL CENTRAL - PREVIEW
       ============================================================================ */
    .panel-preview {
        background: var(--bg-darkest);
        padding: 20px;
        display: flex;
        flex-direction: column;
        position: relative;
    }
    
    /* Tabs */
    .tabs {
        display: flex;
        gap: 4px;
        background: var(--bg-card);
        border-radius: var(--radius-md);
        padding: 4px;
        margin-bottom: 16px;
    }
    .tab {
        flex: 1;
        background: transparent;
        border: none;
        border-radius: var(--radius-sm);
        padding: 10px 8px;
        font-size: 0.8rem;
        font-weight: 500;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
    .tab:hover { color: var(--text-primary); background: var(--bg-elevated); }
    .tab.active { background: var(--primary); color: white; }
    .tab .badge {
        background: var(--accent);
        color: var(--bg-darkest);
        font-size: 9px;
        padding: 2px 6px;
        border-radius: 4px;
        font-weight: 700;
    }
    
    .preview-content { flex: 1; display: flex; flex-direction: column; }
    .tab-content { display: none; flex: 1; flex-direction: column; }
    .tab-content.active { display: flex; }
    
    /* Empty State */
    .empty {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 40px;
    }
    .empty-visual {
        width: 100%;
        max-width: 320px;
        aspect-ratio: 16/10;
        background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
        border-radius: var(--radius-lg);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 24px;
        position: relative;
        overflow: hidden;
    }
    .empty-visual::before {
        content: '';
        position: absolute;
        inset: 16px;
        background: var(--bg-dark);
        border-radius: var(--radius-md);
        border: 2px dashed var(--border-medium);
    }
    .empty-visual::after {
        content: '✨';
        font-size: 48px;
        position: relative;
        animation: float 3s ease-in-out infinite;
    }
    @keyframes float {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-10px); }
    }
    .empty-title { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
    .empty-text { font-size: 0.85rem; color: var(--text-muted); max-width: 300px; }
    
    /* Loading State */
    .loading {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    .loading-spinner {
        width: 60px; height: 60px;
        position: relative;
        margin-bottom: 20px;
    }
    .loading-spinner::before, .loading-spinner::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 50%;
        border: 3px solid transparent;
    }
    .loading-spinner::before {
        border-top-color: var(--primary);
        animation: spin 1s linear infinite;
    }
    .loading-spinner::after {
        border-right-color: var(--neon-blue);
        animation: spin 0.5s linear infinite reverse;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    
    .loading-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
    .loading-text { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }
    .loading-progress {
        width: 200px;
        height: 4px;
        background: var(--bg-card);
        border-radius: 2px;
        overflow: hidden;
    }
    .loading-progress-bar {
        height: 100%;
        background: linear-gradient(90deg, var(--primary), var(--neon-pink));
        border-radius: 2px;
        animation: progress 2s ease-in-out infinite;
    }
    @keyframes progress {
        0% { width: 0%; }
        50% { width: 70%; }
        100% { width: 100%; }
    }
    
    /* Result */
    .result { flex: 1; display: flex; flex-direction: column; }
    .result-main {
        flex: 1;
        background: var(--bg-card);
        border-radius: var(--radius-lg);
        overflow: hidden;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 300px;
        position: relative;
    }
    .result-main.transparent-bg {
        background: 
            linear-gradient(45deg, #2a2a35 25%, transparent 25%),
            linear-gradient(-45deg, #2a2a35 25%, transparent 25%),
            linear-gradient(45deg, transparent 75%, #2a2a35 75%),
            linear-gradient(-45deg, transparent 75%, #2a2a35 75%);
        background-size: 20px 20px;
        background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
        background-color: #1a1a24;
    }
    .result-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
    
    /* Processing Overlay */
    .processing-overlay {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.85);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 10;
        backdrop-filter: blur(4px);
    }
    .processing-overlay .loading-spinner { margin-bottom: 16px; }
    .processing-overlay p { color: var(--text-secondary); font-size: 0.9rem; }
    
    /* Quality Badge */
    .quality-badge {
        position: absolute;
        top: 12px;
        right: 12px;
        background: rgba(0,0,0,0.7);
        border-radius: 6px;
        padding: 6px 10px;
        font-size: 0.7rem;
        color: var(--text-secondary);
        display: flex;
        align-items: center;
        gap: 6px;
        backdrop-filter: blur(4px);
    }
    .quality-badge.hd { color: var(--success); }
    .quality-badge.hd::before { content: '✓'; color: var(--success); }
    
    /* Result Warning */
    .result-warning {
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
        border: 1px solid rgba(245, 158, 11, 0.3);
        border-radius: var(--radius-sm);
        padding: 10px 14px;
        color: #fcd34d;
        font-size: 0.75rem;
        text-align: center;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    /* Thumbnails */
    .result-thumbs {
        display: flex;
        gap: 8px;
        margin-bottom: 12px;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .result-thumb {
        width: 60px; height: 60px;
        border-radius: var(--radius-sm);
        overflow: hidden;
        cursor: pointer;
        border: 2px solid transparent;
        flex-shrink: 0;
        transition: all 0.2s;
    }
    .result-thumb:hover { border-color: var(--border-light); transform: scale(1.05); }
    .result-thumb.active { border-color: var(--primary); box-shadow: var(--shadow-glow); }
    .result-thumb img { width: 100%; height: 100%; object-fit: cover; }
    
    /* Action Buttons */
    .result-actions {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        margin-bottom: 10px;
    }
    .btn-action {
        border: none;
        border-radius: var(--radius-sm);
        padding: 10px 6px;
        font-size: 0.7rem;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        transition: all 0.2s;
    }
    .btn-action:hover { transform: translateY(-2px); }
    .btn-action:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
    .btn-action .icon { font-size: 18px; }
    
    .btn-download { background: var(--success); color: white; }
    .btn-download:hover { background: #059669; }
    .btn-remove-bg { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
    .btn-upscale { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
    .btn-variations { background: linear-gradient(135deg, #00d4aa, #00a896); color: white; }
    .btn-mockup { background: var(--primary); color: white; }
    .btn-ar { background: linear-gradient(135deg, var(--neon-pink), var(--neon-blue)); color: white; }
    
    .btn-secondary {
        width: 100%;
        background: transparent;
        border: 1px solid var(--border-medium);
        border-radius: var(--radius-sm);
        padding: 10px;
        font-size: 0.8rem;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s;
    }
    .btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
    
    /* ============================================================================
       TAB: MOCKUP
       ============================================================================ */
    .mockup-controls-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
        flex-wrap: wrap;
    }
    
    .upload-facade-btn {
        background: var(--bg-card);
        border: 2px dashed var(--border-medium);
        border-radius: var(--radius-sm);
        padding: 8px 16px;
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        font-size: 0.8rem;
        color: var(--text-secondary);
        transition: all 0.2s;
    }
    .upload-facade-btn:hover { border-color: var(--primary); color: var(--primary); }
    
    .facade-filters { display: flex; gap: 4px; flex-wrap: wrap; }
    .filter-btn {
        background: var(--bg-card);
        border: 1px solid var(--border-dark);
        border-radius: 6px;
        padding: 6px 12px;
        font-size: 0.7rem;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s;
    }
    .filter-btn:hover, .filter-btn.active {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-subtle);
    }
    
    /* Galería de fachadas */
    .facade-gallery {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        max-height: 320px;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 4px 2px;
        margin-bottom: 12px;
        scrollbar-width: thin;
        scrollbar-color: var(--border-light) transparent;
    }
    .facade-gallery::-webkit-scrollbar { width: 5px; }
    .facade-gallery::-webkit-scrollbar-track { background: transparent; }
    .facade-gallery::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

    .facade-card,
    .facade-card[data-facade] {
        position: relative;
        height: 130px;
        border-radius: var(--radius-sm);
        overflow: hidden;
        cursor: pointer;
        border: 2px solid transparent;
        transition: all 0.2s;
        background: #1a1a1a;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .facade-card:hover,
    .facade-card[data-facade]:hover { border-color: var(--border-light); transform: scale(1.03); }

    .facade-card.active,
    .facade-card[data-facade].active { border-color: var(--primary); box-shadow: var(--shadow-glow); }

    .facade-card img,
    .facade-card[data-facade] img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

    .facade-label,
    .facade-card[data-facade] .facade-label {
        position: absolute;
        bottom: 0; left: 0; right: 0;
        background: linear-gradient(transparent, rgba(0,0,0,0.82));
        padding: 12px 5px 4px;
        font-size: 0.58rem;
        color: white;
        text-align: center;
        text-transform: capitalize;
        letter-spacing: 0.3px;
        pointer-events: none;
    }
    
    /* Mockup Preview */
    .mockup-preview {
        flex: 1;
        background: var(--bg-card);
        border-radius: var(--radius-lg);
        position: relative;
        min-height: 280px;
        max-height: 500px; /* NUEVO: Limitar altura máxima */
        overflow: hidden;
    }
    .mockup-canvas { 
        width: 100%; 
        height: 100%; 
        max-height: 500px; /* NUEVO: Limitar altura */
        position: relative; 
    }
    .mockup-facade { 
        width: 100%; 
        height: 100%; 
        max-height: 500px; /* NUEVO: Limitar altura de fachada */
        object-fit: contain; /* CAMBIADO: de cover a contain para no cortar */
        transition: filter 0.3s; 
    }
    
    .mockup-overlay {
        position: absolute;
        cursor: move;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: filter 0.3s;
    }
    .mockup-overlay img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        pointer-events: none;
    }
    .mockup-overlay.neon-effect img {
        filter: drop-shadow(0 0 10px var(--neon-pink)) drop-shadow(0 0 20px var(--neon-pink)) drop-shadow(0 0 40px var(--neon-blue));
    }
    .mockup-overlay.night-glow img {
        filter: brightness(1.3) drop-shadow(0 0 15px currentColor) drop-shadow(0 0 30px currentColor);
    }
    
    .mockup-empty {
        position: absolute;
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        color: var(--text-muted);
        text-align: center;
        font-size: 0.9rem;
    }
    
    /* Mockup Controls */
    .mockup-controls {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
        padding: 12px;
        background: var(--bg-card);
        border-radius: var(--radius-md);
        margin-top: 12px;
        max-height: 180px;
        overflow-y: auto;
    }
    .control-item { }
    .control-label {
        font-size: 0.7rem;
        color: var(--text-secondary);
        margin-bottom: 6px;
        display: flex;
        justify-content: space-between;
    }
    .control-slider {
        width: 100%;
        accent-color: var(--primary);
        height: 4px;
    }
    
    /* Day/Night Toggle */
    .daynight-toggle {
        display: flex;
        background: var(--bg-elevated);
        border-radius: 20px;
        padding: 4px;
        gap: 4px;
    }
    .daynight-btn {
        flex: 1;
        background: transparent;
        border: none;
        border-radius: 16px;
        padding: 8px 16px;
        font-size: 0.75rem;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
    .daynight-btn:hover { color: var(--text-primary); }
    .daynight-btn.active {
        background: var(--primary);
        color: white;
    }
    
    .btn-small {
        background: var(--bg-elevated);
        border: 1px solid var(--border-dark);
        color: var(--text-secondary);
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: all 0.2s;
    }
    .btn-small:hover {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }
    
    .mockup-actions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-top: 12px;
    }
    
    /* ============================================================================
       TAB: REALIDAD AUMENTADA
       ============================================================================ */
    .ar-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 20px;
    }
    
    .ar-preview {
        width: 100%;
        max-width: 400px;
        aspect-ratio: 3/4;
        background: var(--bg-card);
        border-radius: var(--radius-lg);
        overflow: hidden;
        position: relative;
        margin-bottom: 20px;
    }
    
    .ar-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .ar-overlay {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
    }
    
    .ar-overlay img {
        max-width: 60%;
        max-height: 40%;
        object-fit: contain;
    }
    
    .ar-instructions {
        background: var(--bg-card);
        border-radius: var(--radius-md);
        padding: 16px;
        margin-bottom: 20px;
        max-width: 400px;
    }
    .ar-instructions h4 { font-size: 0.9rem; color: var(--text-white); margin-bottom: 10px; }
    .ar-instructions ol {
        list-style-position: inside;
        font-size: 0.8rem;
        color: var(--text-secondary);
    }
    .ar-instructions li { margin-bottom: 6px; }
    
    .btn-ar-start {
        background: linear-gradient(135deg, var(--neon-pink), var(--neon-blue));
        border: none;
        border-radius: var(--radius-md);
        padding: 16px 32px;
        font-size: 1rem;
        font-weight: 600;
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 10px;
        transition: all 0.3s;
    }
    .btn-ar-start:hover { transform: scale(1.05); box-shadow: var(--shadow-neon); }
    .btn-ar-start:disabled { opacity: 0.5; cursor: not-allowed; }
    
    /* ============================================================================
       TAB: LEGIBILIDAD
       ============================================================================ */
    .readability-container { padding: 20px; }
    
    .readability-preview {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        margin-bottom: 20px;
    }
    
    .distance-card {
        background: var(--bg-card);
        border-radius: var(--radius-md);
        overflow: hidden;
        text-align: center;
    }
    .distance-preview {
        aspect-ratio: 4/3;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-elevated);
        padding: 10px;
    }
    .distance-preview img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
    .distance-info { padding: 12px; }
    .distance-label { font-size: 0.8rem; color: var(--text-white); font-weight: 600; }
    .distance-status { font-size: 0.7rem; margin-top: 4px; }
    .distance-status.good { color: var(--success); }
    .distance-status.warning { color: var(--warning); }
    .distance-status.bad { color: var(--error); }
    
    .readability-score {
        background: var(--bg-card);
        border-radius: var(--radius-lg);
        padding: 20px;
        text-align: center;
    }
    .score-title { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 10px; }
    .score-value {
        font-size: 3rem;
        font-weight: 800;
        background: linear-gradient(135deg, var(--success), var(--accent));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    .score-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }
    
    .readability-recommendations {
        background: var(--bg-card);
        border-radius: var(--radius-md);
        padding: 16px;
        margin-top: 16px;
    }
    .recommendations-title { font-size: 0.85rem; color: var(--text-white); margin-bottom: 12px; }
    .recommendation-item {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-dark);
    }
    .recommendation-item:last-child { border-bottom: none; }
    .recommendation-icon { font-size: 1.2rem; }
    .recommendation-text { font-size: 0.8rem; color: var(--text-secondary); }
    
    /* ============================================================================
       PANEL DERECHO - HERRAMIENTAS
       ============================================================================ */
    .panel-tools {
        background: var(--bg-dark);
        border-left: 1px solid var(--border-dark);
        padding: 20px;
        overflow-y: auto;
        max-height: calc(100vh - 57px);
    }
    
    .tools-title {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text-white);
        margin-bottom: 16px;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .tool-card {
        background: var(--bg-card);
        border: 1px solid var(--border-dark);
        border-radius: var(--radius-md);
        padding: 14px;
        margin-bottom: 12px;
        transition: all 0.2s;
    }
    .tool-card:hover { border-color: var(--border-medium); }
    .tool-card.active { border-color: var(--primary); background: var(--primary-subtle); }
    .tool-card.disabled { opacity: 0.5; pointer-events: none; }
    
    .tool-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 8px;
    }
    .tool-icon {
        width: 36px; height: 36px;
        background: var(--bg-elevated);
        border-radius: var(--radius-sm);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
    }
    .tool-info { flex: 1; }
    .tool-name { font-size: 0.85rem; font-weight: 600; color: var(--text-white); }
    .tool-desc { font-size: 0.7rem; color: var(--text-muted); }
    
    .tool-status {
        font-size: 0.65rem;
        padding: 3px 8px;
        border-radius: 4px;
        font-weight: 600;
    }
    .tool-status.ready { background: rgba(16, 185, 129, 0.2); color: var(--success); }
    .tool-status.processing { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
    .tool-status.new { background: rgba(144, 67, 158, 0.2); color: var(--primary); }
    
    .tool-btn {
        width: 100%;
        background: var(--bg-elevated);
        border: 1px solid var(--border-dark);
        border-radius: var(--radius-sm);
        padding: 8px;
        font-size: 0.75rem;
        color: var(--text-secondary);
        cursor: pointer;
        margin-top: 10px;
        transition: all 0.2s;
    }
    .tool-btn:hover { border-color: var(--primary); color: var(--primary); }
    .tool-btn:disabled { opacity: 0.5; cursor: not-allowed; }
    
    /* Presupuesto Card */
    .quote-card {
        background: linear-gradient(135deg, var(--primary-subtle), rgba(102, 126, 234, 0.1));
        border: 1px solid var(--primary);
        border-radius: var(--radius-lg);
        padding: 16px;
        margin-top: 20px;
    }
    .quote-title {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-white);
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .quote-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid var(--border-dark);
        font-size: 0.8rem;
    }
    .quote-row:last-of-type { border-bottom: none; }
    .quote-label { color: var(--text-secondary); }
    .quote-value { color: var(--text-white); font-weight: 500; }
    .quote-total {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 2px solid var(--primary);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .quote-total-label { font-size: 0.9rem; color: var(--text-white); font-weight: 600; }
    .quote-total-value {
        font-size: 1.4rem;
        font-weight: 800;
        color: var(--accent);
    }
    .quote-total-iva { font-size: 0.7rem; color: var(--text-muted); }
    
    .quote-btn {
        width: 100%;
        background: var(--accent);
        border: none;
        border-radius: var(--radius-sm);
        padding: 12px;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--bg-darkest);
        cursor: pointer;
        margin-top: 12px;
        transition: all 0.2s;
    }
    .quote-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 212, 170, 0.4); }
    
    /* ============================================================================
       MODALES
       ============================================================================ */
    .modal-overlay {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.9);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
        padding: 20px;
        backdrop-filter: blur(4px);
    }
    
    .modal {
        background: var(--bg-card);
        border-radius: var(--radius-xl);
        max-width: 480px;
        width: 100%;
        padding: 28px;
        position: relative;
        animation: modalIn 0.3s ease;
    }
    @keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } }
    
    .modal-close {
        position: absolute;
        top: 16px; right: 16px;
        background: var(--bg-elevated);
        border: none;
        width: 32px; height: 32px;
        border-radius: 50%;
        color: var(--text-muted);
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }
    .modal-close:hover { background: var(--error); color: white; }
    
    .modal-icon {
        width: 60px; height: 60px;
        background: var(--primary-subtle);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 28px;
        margin: 0 auto 16px;
    }
    
    .modal-title {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--text-white);
        text-align: center;
        margin-bottom: 8px;
    }
    .modal-subtitle {
        font-size: 0.85rem;
        color: var(--text-muted);
        text-align: center;
        margin-bottom: 24px;
    }
    
    .modal .form-group { margin-bottom: 16px; }
    .modal .form-group label { font-size: 0.8rem; }
    
    .checkbox-wrap {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        margin-top: 16px;
    }
    .checkbox-wrap input[type="checkbox"] {
        margin-top: 3px;
        accent-color: var(--primary);
    }
    .checkbox-wrap label {
        font-size: 0.75rem;
        color: var(--text-secondary);
        line-height: 1.4;
    }
    .checkbox-wrap a { color: var(--primary); text-decoration: none; }
    
    /* Modal Variaciones */
    .variations-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin: 20px 0;
    }
    .variation-item {
        aspect-ratio: 1;
        border-radius: var(--radius-md);
        overflow: hidden;
        cursor: pointer;
        border: 2px solid transparent;
        transition: all 0.2s;
    }
    .variation-item:hover { border-color: var(--border-light); }
    .variation-item.selected { border-color: var(--primary); box-shadow: var(--shadow-glow); }
    .variation-item img { width: 100%; height: 100%; object-fit: cover; }
    
    /* Modal AR Full */
    .modal-ar {
        max-width: 100%;
        width: 100%;
        height: 100%;
        padding: 0;
        border-radius: 0;
        background: black;
    }
    .modal-ar .modal-close {
        top: 20px;
        right: 20px;
        z-index: 100;
        background: rgba(0,0,0,0.5);
    }
    
    #ar-scene {
        width: 100vw;
        height: 100vh;
    }
    
    /* ============================================================================
       V18: VISOR 3D CORPÓREAS - SISTEMA PROGRAMÁTICO
       ============================================================================ */
    .corporeas-3d-container {
        position: relative;
        width: 100%;
        aspect-ratio: 16/10;
        background: #1a1a24;
        border-radius: var(--radius-lg);
        overflow: hidden;
    }
    
    .corporeas-3d-canvas {
        width: 100%;
        height: 100%;
        display: block;
    }
    
    .corporeas-3d-loading {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: rgba(10, 10, 15, 0.9);
        z-index: 10;
    }
    .corporeas-3d-loading.hidden { display: none; }
    
    .corporeas-3d-controls {
        display: flex;
        gap: 10px;
        margin-top: 12px;
        flex-wrap: wrap;
    }
    
    .corp3d-control-group {
        display: flex;
        align-items: center;
        gap: 8px;
        background: var(--bg-card);
        padding: 8px 12px;
        border-radius: var(--radius-sm);
    }
    .corp3d-control-label {
        font-size: 0.75rem;
        color: var(--text-secondary);
    }
    
    .corp3d-bg-btn {
        width: 24px;
        height: 24px;
        border-radius: 4px;
        border: 2px solid transparent;
        cursor: pointer;
        transition: all 0.2s;
    }
    .corp3d-bg-btn.active { border-color: var(--primary); }
    .corp3d-bg-btn:hover { transform: scale(1.1); }
    
    /* Badge modo 3D */
    .mode-3d-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: linear-gradient(135deg, #10b981, #00d4aa);
        color: white;
        font-size: 0.65rem;
        font-weight: 700;
        padding: 4px 10px;
        border-radius: 4px;
        text-transform: uppercase;
        margin-left: 8px;
    }
    
    /* ============================================================================
       V30: SISTEMA HÍBRIDO DE LONAS
       ============================================================================ */
    .lona-config-section {
        display: none;
        margin-top: 15px;
        padding: 15px;
        background: var(--bg-elevated);
        border-radius: 12px;
        border: 1px solid var(--border-dark);
    }
    .lona-config-section.active { display: block; }
    .lona-section-title {
        font-size: 0.75rem;
        color: var(--text-secondary);
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .lona-business-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        margin-bottom: 15px;
    }
    .lona-business-btn {
        background: var(--bg-card);
        border: 2px solid transparent;
        border-radius: 10px;
        padding: 10px 5px;
        cursor: pointer;
        text-align: center;
        transition: all 0.3s;
        color: var(--text-primary);
        font-family: inherit;
    }
    .lona-business-btn:hover {
        border-color: var(--primary-subtle);
        transform: translateY(-2px);
    }
    .lona-business-btn.active {
        border-color: var(--primary);
        background: var(--primary-subtle);
    }
    .lona-business-icon { font-size: 22px; margin-bottom: 4px; }
    .lona-business-name { font-size: 9px; color: var(--text-secondary); line-height: 1.2; }
    .lona-style-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    .lona-style-btn {
        background: var(--bg-card);
        border: 2px solid transparent;
        border-radius: 8px;
        padding: 8px 5px;
        cursor: pointer;
        text-align: center;
        transition: all 0.3s;
        color: var(--text-primary);
        font-family: inherit;
    }
    .lona-style-btn:hover { border-color: var(--primary-subtle); }
    .lona-style-btn.active { border-color: var(--primary); background: var(--primary-subtle); }
    .lona-style-preview { width: 100%; height: 25px; border-radius: 4px; margin-bottom: 4px; }
    .lona-style-name { font-size: 8px; color: var(--text-secondary); }
    .lona-info-box {
        background: var(--primary-subtle);
        border-left: 3px solid var(--primary);
        padding: 10px 12px;
        margin-top: 12px;
        border-radius: 0 8px 8px 0;
        font-size: 11px;
        color: var(--text-secondary);
    }
    .lona-info-box strong { color: var(--primary); }
    
    /* ============================================================================
       RESPONSIVE
       ============================================================================ */
    @media (max-width: 768px) {
        .panel-form { padding: 16px; }
        .cat-grid { grid-template-columns: repeat(3, 1fr); }
        .result-actions { grid-template-columns: repeat(2, 1fr); }
        .mockup-actions { grid-template-columns: 1fr; }
        .readability-preview { grid-template-columns: 1fr; }
    }
