/* ═══════════════════════════════════════════════════════════════════
   COLORNITIDO TOOLS — VECTORIZADOR DE IMÁGENES
   Estilos Limpios, Modo Oscuro Neón & Diseño Ergonómico de la Suite
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --cnt-emerald: #0284c7;
    --cnt-emerald-bright: #00c2ff;
    --cnt-emerald-glow: rgba(0, 194, 255, 0.35);
    --cnt-emerald-dark: #6366f1;
    --cnt-cyan-bright: #38bdf8;
    --cnt-bg-surface: rgba(15, 23, 42, 0.90);
    --cnt-bg-card: rgba(20, 28, 48, 0.75);
    --cnt-border-subtle: rgba(255, 255, 255, 0.08);
    --cnt-text-primary: #f8fafc;
    --cnt-text-secondary: #94a3b8;
    --cnt-text-muted: #64748b;
    --cnt-danger: #ef4444;
}

/* ─── Contenedor Principal y Reserva de Header Transparente de Blocksy ─── */
.cnt-tool-page .cnt-wrap#cnt-vectorizador-de-imagenes,
.cnt-vector-wrap#cnt-vectorizador-de-imagenes,
#cnt-vectorizador-de-imagenes {
    position: relative;
    width: 100%;
    max-width: none !important;
    color: var(--cnt-text-primary);
    box-sizing: border-box;
    padding-top: clamp(8.5rem, 13vw, 11rem) !important;
    padding-bottom: 5rem;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 auto;
}

#cnt-vectorizador-de-imagenes * {
    box-sizing: border-box;
}

/* ─── Resplandor de fondo ─── */
.cnt-bg-glow-emerald {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 650px;
    height: 450px;
    background: radial-gradient(circle, rgba(0, 194, 255, 0.18) 0%, rgba(99, 102, 241, 0.05) 50%, transparent 75%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

/* ─── Encabezado Centrado de la Suite ─── */
.cnt-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
    width: var(--theme-container-width, min(100%, 90vw));
    max-width: var(--theme-normal-container-max-width, 1290px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.cnt-header-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cnt-tool-icon-emerald {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(0, 194, 255, 0.25), rgba(0, 194, 255, 0.1));
    border: 1px solid rgba(0, 194, 255, 0.4);
    color: var(--cnt-emerald-bright);
    box-shadow: 0 0 25px rgba(0, 194, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.2rem;
}

.cnt-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.85rem;
    background: rgba(0, 194, 255, 0.12);
    border: 1px solid rgba(0, 194, 255, 0.3);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--cnt-emerald-bright);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.6rem;
}

.cnt-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cnt-emerald-bright);
    box-shadow: 0 0 8px var(--cnt-emerald-bright);
}

.cnt-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    line-height: 1.25;
    margin: 0 0 0.55rem;
    padding: 0.05em 0 0.22em;
    letter-spacing: -.03em;
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    overflow: visible;
}

.cnt-subtitle {
    font-size: 1rem;
    color: #71717a;
    margin: 0 auto;
    max-width: 640px;
    line-height: 1.7;
    text-align: center;
}

/* ─── Layout Principal (2 Columnas Idéntico a la Suite) ─── */
.cnt-vector-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: var(--theme-container-width, min(100%, 90vw));
    max-width: var(--theme-normal-container-max-width, 1290px);
    margin: 2rem auto 0;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    min-width: 0;
}

@media (min-width: 1024px) {
    .cnt-vector-layout {
        grid-template-columns: 380px minmax(0, 1fr);
        align-items: start;
    }
}

/* ─── Barra Lateral de Controles ─── */
.cnt-sidebar-controls {
    display: flex;
    flex-direction: column;
    background: var(--cnt-bg-surface);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 1.5rem;
    padding: 1.25rem 1.15rem 1.15rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .cnt-sidebar-controls {
        position: sticky;
        top: clamp(6.5rem, 10vw, 8.5rem);
        height: calc(100vh - clamp(7.5rem, 11vw, 9.5rem));
        max-height: calc(100vh - clamp(7.5rem, 11vw, 9.5rem));
        min-height: 580px;
    }
    .cnt-main-workspace {
        height: calc(100vh - clamp(7.5rem, 11vw, 9.5rem));
        max-height: calc(100vh - clamp(7.5rem, 11vw, 9.5rem));
        min-height: 580px;
        display: flex;
        flex-direction: column;
    }
    .cnt-canvas-viewport {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        max-height: none;
    }
}

@media (max-width: 1023px) {
    .cnt-sidebar-controls {
        position: relative;
        top: 0;
        height: 580px;
        max-height: 580px;
    }
    .cnt-main-workspace {
        height: 580px;
        max-height: 580px;
        min-height: 500px;
    }
}

/* Contenedor con Scroll Interno para los Controles y Paleta */
.cnt-sidebar-scroll-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    padding-right: 0.45rem;
    margin-right: -0.2rem;
    min-height: 0;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 194, 255, 0.35) rgba(0, 0, 0, 0.25);
}

/* Scrollbar estilizado moderno con acentos esmeralda Colornitido */
.cnt-sidebar-scroll-body::-webkit-scrollbar {
    width: 6px;
}
.cnt-sidebar-scroll-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 999px;
}
.cnt-sidebar-scroll-body::-webkit-scrollbar-thumb {
    background: rgba(0, 194, 255, 0.35);
    border-radius: 999px;
    transition: background 0.2s;
}
.cnt-sidebar-scroll-body::-webkit-scrollbar-thumb:hover {
    background: var(--cnt-emerald-bright);
}

.cnt-control-card {
    background: var(--cnt-bg-card);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 1rem;
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    transition: border-color 0.2s ease;
}

.cnt-control-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.cnt-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--cnt-emerald-bright);
    font-size: 0.9rem;
    font-weight: 700;
}

.cnt-card-header h3 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--cnt-text-primary);
    font-weight: 700;
}

.cnt-card-step {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 194, 255, 0.15);
    border: 1px solid rgba(0, 194, 255, 0.35);
    color: var(--cnt-emerald-bright);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cnt-card-step i {
    font-size: 0.7rem;
}

.cnt-card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cnt-card-header-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.cnt-badge-counter {
    background: rgba(0, 194, 255, 0.15);
    border: 1px solid rgba(0, 194, 255, 0.3);
    color: var(--cnt-emerald-bright);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

/* ─── Dropzone ─── */
.cnt-dropzone {
    position: relative;
    border: 2px dashed rgba(0, 194, 255, 0.35);
    background: rgba(0, 194, 255, 0.03);
    border-radius: 1rem;
    padding: 1.75rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.cnt-dropzone:hover,
.cnt-dropzone.dragover {
    border-color: var(--cnt-emerald-bright);
    background: rgba(0, 194, 255, 0.08);
    box-shadow: 0 0 25px rgba(0, 194, 255, 0.15);
}

.cnt-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.cnt-dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    pointer-events: none;
    user-select: none;
}

.cnt-dropzone-icon {
    font-size: 2rem;
    color: var(--cnt-emerald-bright);
    margin-bottom: 0.25rem;
}

.cnt-dropzone-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cnt-text-primary);
}

.cnt-dropzone-subtitle {
    font-size: 0.74rem;
    color: var(--cnt-text-secondary);
}

.cnt-dropzone-tags {
    font-size: 0.68rem;
    color: var(--cnt-text-muted);
    margin-top: 0.2rem;
}

/* Spinner en Dropzone */
.cnt-dropzone-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
    user-select: none;
}

.cnt-dropzone-loading-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cnt-text-primary);
}

.cnt-dropzone-loading-sub {
    font-size: 0.74rem;
    color: var(--cnt-text-secondary);
}

.cnt-dropzone-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0, 194, 255, 0.2);
    border-top-color: var(--cnt-emerald-bright);
    border-radius: 50%;
    animation: cntVecSpin 0.8s linear infinite;
}

@keyframes cntVecSpin {
    to { transform: rotate(360deg); }
}

/* Tarjeta Archivo Cargado */
.cnt-file-info-card {
    background: rgba(10, 14, 22, 0.9);
    border: 1px solid rgba(0, 194, 255, 0.25);
    border-radius: 0.85rem;
    padding: 0.75rem 0.85rem;
}

.cnt-file-info-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cnt-file-thumb {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cnt-file-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cnt-file-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.cnt-file-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cnt-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cnt-item-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.cnt-pill-tag {
    font-size: 0.68rem;
    padding: 0.15rem 0.45rem;
    border-radius: 0.35rem;
    font-weight: 600;
}

.cnt-pill-size {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.cnt-pill-dpi-ok {
    background: rgba(0, 194, 255, 0.15);
    color: var(--cnt-emerald-bright);
    border: 1px solid rgba(0, 194, 255, 0.3);
}

.cnt-file-actions-btn-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.cnt-btn-icon-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--cnt-border-subtle);
    color: var(--cnt-text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.cnt-btn-icon-action:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.cnt-btn-icon-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
}

/* ─── Presets Grid ─── */
.cnt-presets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
}

.cnt-preset-btn {
    background: rgba(14, 20, 32, 0.85);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 0.75rem;
    padding: 0.65rem 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    text-align: center;
    color: var(--cnt-text-secondary);
}

.cnt-preset-btn[data-preset="auto"] {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(0, 194, 255, 0.12), rgba(99, 102, 241, 0.08));
    border-color: rgba(0, 194, 255, 0.35);
}

.cnt-preset-btn i {
    font-size: 1rem;
    color: var(--cnt-text-muted);
    transition: color 0.2s;
}

.cnt-preset-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--cnt-text-primary);
}

.cnt-preset-sub {
    font-size: 0.65rem;
    color: var(--cnt-text-muted);
}

.cnt-preset-btn:hover {
    color: #fff;
    border-color: rgba(0, 194, 255, 0.35);
    background: rgba(20, 28, 48, 0.9);
}

.cnt-preset-btn.active {
    background: rgba(0, 194, 255, 0.15);
    border-color: var(--cnt-emerald-bright);
    box-shadow: 0 0 16px rgba(0, 194, 255, 0.2);
}

.cnt-preset-btn.active i {
    color: var(--cnt-emerald-bright);
}

.cnt-preset-btn.active .cnt-preset-name {
    color: var(--cnt-emerald-bright);
}

/* ─── Badge de Detección Automática ─── */
.cnt-ai-detection-badge {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.85rem;
    margin-top: 0.75rem;
    background: rgba(0, 194, 255, 0.08);
    border: 1px solid rgba(0, 194, 255, 0.3);
    border-radius: 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cnt-emerald-bright);
    box-shadow: 0 0 16px rgba(0, 194, 255, 0.12);
    animation: cntFadeInBadge 0.3s ease-out;
}

@keyframes cntFadeInBadge {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.cnt-ai-detection-badge i {
    font-size: 0.95rem;
    color: #38bdf8;
    flex-shrink: 0;
}

/* ─── Selector Segmentado de Nivel de Detalle ─── */
.cnt-detail-pill-group {
    display: flex;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 0.75rem;
    padding: 0.22rem;
    gap: 0.25rem;
    width: 100%;
}

.cnt-detail-pill-btn {
    flex: 1;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.6rem;
    padding: 0.5rem 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cnt-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.cnt-detail-pill-btn:hover {
    color: var(--cnt-text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.cnt-detail-pill-btn.active {
    background: linear-gradient(135deg, rgba(0, 194, 255, 0.22) 0%, rgba(2, 132, 199, 0.35) 100%);
    color: #ffffff;
    border-color: rgba(0, 194, 255, 0.5);
    box-shadow: 0 2px 10px rgba(0, 194, 255, 0.2);
}

.cnt-detail-pill-btn.active i {
    color: var(--cnt-emerald-bright);
}

/* ─── Acordeón de Ajustes Avanzados ─── */
.cnt-details-advanced {
    margin-top: 0.85rem;
    border-top: 1px solid var(--cnt-border-subtle);
    padding-top: 0.75rem;
}

.cnt-summary-advanced {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cnt-text-muted);
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: color 0.2s;
}

.cnt-summary-advanced::-webkit-details-marker {
    display: none;
}

.cnt-summary-advanced:hover {
    color: var(--cnt-text-secondary);
}

.cnt-summary-advanced .cnt-chevron-icon {
    font-size: 0.7rem;
    transition: transform 0.25s ease;
}

.cnt-details-advanced[open] .cnt-chevron-icon {
    transform: rotate(180deg);
}

.cnt-advanced-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.85rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

/* ─── Switches & Toggles (IA Neuronal) ─── */
.cnt-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 0.75rem;
    padding: 0.65rem 0.85rem;
}

.cnt-switch-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.cnt-switch-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--cnt-text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cnt-switch-desc {
    font-size: 0.68rem;
    color: var(--cnt-text-secondary);
    line-height: 1.3;
}

.cnt-toggle {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    flex-shrink: 0;
}

.cnt-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cnt-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.12);
    transition: 0.25s;
    border-radius: 22px;
}

.cnt-toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.25s;
    border-radius: 50%;
}

.cnt-toggle input:checked + .cnt-toggle-slider {
    background-color: var(--cnt-emerald-bright);
}

.cnt-toggle input:checked + .cnt-toggle-slider:before {
    transform: translateX(16px);
}

/* ─── Sliders de Precisión ─── */
.cnt-slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cnt-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cnt-slider-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cnt-text-secondary);
}

.cnt-slider-val {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--cnt-emerald-bright);
}

.cnt-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    cursor: pointer;
}

.cnt-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--cnt-emerald-bright);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 194, 255, 0.5);
    border: 2px solid #ffffff;
    transition: transform 0.1s;
}

.cnt-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.cnt-slider-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--cnt-text-muted);
}

/* Modo de Capas (Stacked vs Cutout) */
.cnt-layer-mode-row {
    margin-top: 0.2rem;
}

.cnt-sub-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cnt-text-secondary);
    margin-bottom: 0.35rem;
}

.cnt-btn-toggle-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 0.65rem;
    padding: 0.2rem;
}

.cnt-toggle-pair-btn {
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cnt-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.cnt-toggle-pair-btn.active {
    background: rgba(0, 194, 255, 0.18);
    color: var(--cnt-emerald-bright);
    border: 1px solid rgba(0, 194, 255, 0.3);
}

/* Botón Principal */
.cnt-main-action-wrap {
    margin-top: 0.25rem;
}

.cnt-btn-action-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--cnt-emerald-bright) 0%, var(--cnt-emerald-dark) 100%);
    color: #ffffff;
    border: none;
    border-radius: 0.75rem;
    padding: 0.95rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 8px 25px rgba(0, 194, 255, 0.35);
    transition: all 0.25s ease;
}

.cnt-btn-action-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 194, 255, 0.5);
    background: linear-gradient(135deg, #38bdf8 0%, var(--cnt-emerald-bright) 100%);
}

.cnt-btn-action-primary:active {
    transform: translateY(0);
}

/* ─── Inspector de Paleta y Capas ─── */
.cnt-palette-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
}

.cnt-palette-hint {
    color: var(--cnt-text-muted);
}

.cnt-btn-text-action {
    background: none;
    border: none;
    color: var(--cnt-cyan-bright);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: 0.3rem;
}

.cnt-btn-text-action:hover {
    background: rgba(56, 189, 248, 0.12);
}

.cnt-palette-list {
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-right: 0.2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 194, 255, 0.35) rgba(0, 0, 0, 0.25);
}

.cnt-palette-list::-webkit-scrollbar {
    width: 6px;
}
.cnt-palette-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 999px;
}
.cnt-palette-list::-webkit-scrollbar-thumb {
    background: rgba(0, 194, 255, 0.35);
    border-radius: 999px;
}
.cnt-palette-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 194, 255, 0.65);
}

.cnt-palette-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 0.6rem;
    padding: 0.4rem 0.6rem;
    transition: all 0.15s ease;
}

.cnt-palette-row:hover,
.cnt-palette-row.highlighted {
    background: rgba(0, 194, 255, 0.1);
    border-color: var(--cnt-emerald-bright);
}

.cnt-color-swatch-box {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    overflow: hidden;
}

.cnt-color-swatch-box input[type="color"] {
    position: absolute;
    inset: -6px;
    width: 38px;
    height: 38px;
    opacity: 0;
    cursor: pointer;
}

.cnt-palette-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.cnt-palette-hex {
    font-size: 0.78rem;
    font-weight: 700;
    font-family: monospace;
    color: #e2e8f0;
}

.cnt-palette-meta {
    font-size: 0.7rem;
    color: var(--cnt-text-muted);
}

.cnt-palette-controls {
    display: flex;
    gap: 0.2rem;
}

.cnt-btn-layer-action {
    background: transparent;
    border: none;
    color: var(--cnt-text-muted);
    width: 22px;
    height: 22px;
    border-radius: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.78rem;
    transition: all 0.15s;
}

.cnt-btn-layer-action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.cnt-btn-layer-action.hidden-layer {
    color: #475569;
}

.cnt-btn-layer-action.cnt-btn-layer-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.cnt-layer-bg-tag {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(0, 194, 255, 0.15);
    border: 1px solid rgba(0, 194, 255, 0.45);
    color: var(--cnt-emerald-bright);
    border-radius: 9999px;
    margin-left: 0.45rem;
    vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════════
   COLUMNA DERECHA: WORKBENCH / VISOR IDÉNTICO A LA SUITE
   ═══════════════════════════════════════════════════════════════════ */

.cnt-main-workspace {
    display: flex;
    flex-direction: column;
    background: var(--cnt-bg-surface);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    min-height: 560px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Barra Superior del Visor (1 Sola Línea Estandarizada) */
.cnt-viewer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.5rem;
    background: rgba(10, 16, 28, 0.95);
    border-bottom: 1px solid var(--cnt-border-subtle);
    padding: 0.65rem 1.15rem;
    min-height: 48px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.cnt-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cnt-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

/* Selector de Modos de Vista */
.cnt-view-mode-group {
    display: inline-flex;
    background: rgba(5, 8, 15, 0.75);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 0.65rem;
    padding: 0.2rem;
    gap: 0.2rem;
}

.cnt-view-mode-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    padding: 0.35rem 0.68rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--cnt-text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.cnt-view-mode-btn:hover {
    color: var(--cnt-text-primary);
}

.cnt-view-mode-btn.active {
    background: linear-gradient(135deg, rgba(0, 194, 255, 0.25) 0%, rgba(2, 132, 199, 0.45) 100%);
    color: #ffffff;
    border: 1px solid rgba(0, 194, 255, 0.5);
    box-shadow: 0 2px 10px rgba(0, 194, 255, 0.2);
}

/* Selector de Fondo del Lienzo */
.cnt-bg-picker-group {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(5, 8, 15, 0.65);
    padding: 0.2rem 0.4rem;
    border-radius: 0.55rem;
    border: 1px solid var(--cnt-border-subtle);
}

.cnt-bg-opt {
    width: 22px;
    height: 22px;
    border-radius: 0.35rem;
    border: 1px solid var(--cnt-border-subtle);
    background: transparent;
    padding: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cnt-bg-opt.active {
    border-color: var(--cnt-emerald-bright);
    box-shadow: 0 0 6px rgba(0, 194, 255, 0.4);
}

.cnt-bg-swatch {
    width: 100%;
    height: 100%;
    border-radius: 0.25rem;
    display: block;
}

/* Ajedrezado de transparencia */
.cnt-bg-checker {
    background-color: #060907;
    background-image:
        linear-gradient(45deg, #0f1511 25%, transparent 25%),
        linear-gradient(-45deg, #0f1511 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #0f1511 75%),
        linear-gradient(-45deg, transparent 75%, #0f1511 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Zoom Controls */
.cnt-zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--cnt-border-subtle);
    padding: 0.2rem;
    border-radius: 0.6rem;
}

.cnt-zoom-btn {
    background: transparent;
    border: none;
    color: var(--cnt-text-secondary);
    width: 30px;
    height: 28px;
    border-radius: 0.45rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    transition: all 0.2s;
}

.cnt-zoom-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.cnt-zoom-btn-text {
    width: auto !important;
    padding: 0 0.65rem;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.cnt-zoom-divider {
    width: 1px;
    height: 16px;
    background: var(--cnt-border-subtle);
    margin: 0 0.15rem;
}

.cnt-zoom-level {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--cnt-text-primary);
    min-width: 48px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.cnt-toggle-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--cnt-border-subtle);
    color: var(--cnt-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cnt-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--cnt-text-primary);
}

/* ─── Viewport del Lienzo (Reglas 8 y 9 GEMINI.md) ─── */
.cnt-canvas-viewport {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    position: relative;
    background: #060907;
    background-image:
        linear-gradient(45deg, #0f1511 25%, transparent 25%),
        linear-gradient(-45deg, #0f1511 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #0f1511 75%),
        linear-gradient(-45deg, transparent 75%, #0f1511 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    min-width: 0;
    padding: 0;
    box-sizing: border-box;
}

.cnt-canvas-viewport.is-panning {
    cursor: grabbing !important;
}

.cnt-canvas-viewport.cnt-hand-mode,
.cnt-canvas-viewport.cnt-hand-mode * {
    cursor: grab !important;
}

.cnt-canvas-viewport.cnt-hand-grabbing,
.cnt-canvas-viewport.cnt-hand-grabbing * {
    cursor: grabbing !important;
}

/* Estado Inicial Vacío (Placeholder) */
.cnt-viewport-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 3rem 1.5rem;
    text-align: center;
}

.cnt-placeholder-content {
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}

.cnt-placeholder-icon {
    width: 76px;
    height: 76px;
    border-radius: 1.25rem;
    background: rgba(0, 194, 255, 0.12);
    border: 1px solid rgba(0, 194, 255, 0.3);
    color: var(--cnt-emerald-bright);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 0 35px rgba(0, 194, 255, 0.2);
    margin-bottom: 0.4rem;
}

.cnt-placeholder-content h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #fff;
    font-weight: 800;
}

.cnt-placeholder-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--cnt-text-secondary);
    line-height: 1.6;
}

.cnt-btn-placeholder-upload {
    margin-top: 0.5rem;
    background: rgba(0, 194, 255, 0.15);
    border: 1px solid rgba(0, 194, 255, 0.4);
    color: var(--cnt-emerald-bright);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.25s ease;
}

.cnt-btn-placeholder-upload:hover {
    background: var(--cnt-emerald-bright);
    color: #fff;
    box-shadow: 0 0 25px rgba(0, 194, 255, 0.4);
}

/* ─── Overlay de Procesamiento ─── */
.cnt-processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 9, 14, 0.9);
    backdrop-filter: blur(10px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cnt-processing-card {
    background: rgba(14, 20, 32, 0.95);
    border: 1px solid rgba(0, 194, 255, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(0, 194, 255, 0.25);
    border-radius: 1.25rem;
    padding: 2rem 1.75rem;
    max-width: 380px;
    width: 90%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}

.cnt-processing-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 194, 255, 0.15);
    border-top-color: var(--cnt-emerald-bright);
    border-right-color: var(--cnt-cyan-bright);
    border-radius: 50%;
    animation: cnt-spin 0.85s linear infinite;
}

@keyframes cnt-spin {
    to { transform: rotate(360deg); }
}

.cnt-processing-card h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
}

.cnt-processing-card p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--cnt-text-secondary);
}

.cnt-progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.4rem;
}

.cnt-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cnt-emerald-bright), var(--cnt-cyan-bright));
    transition: width 0.2s ease;
}

.cnt-progress-percent {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--cnt-emerald-bright);
}

/* ─── Escenario Dual Lado a Lado Sincronizado ─── */
.cnt-dual-stage {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    margin: 0;
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
    min-width: 0;
    z-index: 10;
}

.cnt-dual-pane {
    flex: 1 1 50%;
    width: 50%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cnt-dual-divider-bar {
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8), 0 0 8px rgba(0, 194, 255, 0.4);
    position: relative;
    z-index: 25;
    flex-shrink: 0;
}

.cnt-dual-zoom-container {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    overflow: hidden;
    transform-origin: center center;
    transition: transform 0.05s ease-out;
    flex-shrink: 0;
}

.cnt-dual-zoom-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
}

#cnt-vec-dual-svg-host {
    width: 100%;
    height: 100%;
    display: block;
}

#cnt-vec-dual-svg-host svg {
    display: block;
    width: 100%;
    height: 100%;
}

.cnt-dual-footer-tag {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(11, 15, 24, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 0.35rem 0.95rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    z-index: 20;
    pointer-events: none;
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cnt-dual-footer-tag-accent {
    background: rgba(2, 132, 199, 0.88);
    border-color: rgba(0, 194, 255, 0.45);
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(0, 194, 255, 0.35);
}

.cnt-dual-footer-tag-accent i {
    color: #ffffff;
}

/* ─── Badge Resumen de Especificaciones en Barra Inferior ─── */
.cnt-spec-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(0, 194, 255, 0.12);
    border: 1px solid rgba(0, 194, 255, 0.35);
    border-radius: 0.6rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--cnt-emerald-bright);
    box-shadow: 0 0 12px rgba(0, 194, 255, 0.15);
}

.cnt-spec-badge-pill i {
    color: #38bdf8;
    font-size: 0.85rem;
}

/* ─── Escenario Split-Stage ─── */
.cnt-split-stage {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
    min-width: 0;
}

.cnt-canvas-zoom-container {
    --cnt-inv-zoom: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    overflow: hidden;
    transform-origin: center center;
    transition: transform 0.05s ease-out;
    flex-shrink: 0;
}

.cnt-canvas-zoom-container.is-split-mode {
    overflow: visible;
    cursor: ew-resize !important;
}

/* Capa Vectorial (Base) */
.cnt-layer-enhanced {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 5;
    border-radius: 6px;
    overflow: hidden;
}

#cnt-vec-svg-host {
    width: 100%;
    height: 100%;
    display: block;
}

#cnt-vec-svg-host svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Capa Original (Capa superpuesta con clip-path) */
.cnt-layer-original {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    clip-path: inset(0 50% 0 0);
    border-radius: 6px;
    overflow: hidden;
}

.cnt-layer-original img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
}

/* Etiquetas Flotantes (Fijas al visor al 100% de escala) */
.cnt-floating-tag {
    position: absolute;
    top: 16px;
    padding: 0.4rem 0.95rem;
    border-radius: 9999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    pointer-events: none;
    z-index: 35;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}

.cnt-tag-original {
    left: 16px;
    background: rgba(15, 23, 42, 0.9);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.cnt-tag-enhanced {
    right: 16px;
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.95) 0%, rgba(2, 132, 199, 0.95) 50%, rgba(99, 102, 241, 0.95) 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.38);
}

/* Divisor Deslizante (Split Slider compensado contra el zoom del lienzo) */
body.is-dragging-split,
body.is-dragging-split * {
    cursor: ew-resize !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.cnt-slider-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    width: calc(56px * var(--cnt-inv-zoom, 1));
    margin-left: calc(-28px * var(--cnt-inv-zoom, 1));
    z-index: 30;
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.cnt-slider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: calc(3px * var(--cnt-inv-zoom, 1));
    background: linear-gradient(180deg, #00c2ff 0%, #ffffff 50%, #00c2ff 100%);
    box-shadow:
        0 0 calc(2px * var(--cnt-inv-zoom, 1)) calc(1px * var(--cnt-inv-zoom, 1)) rgba(7, 9, 14, 0.85),
        0 0 calc(14px * var(--cnt-inv-zoom, 1)) rgba(0, 194, 255, 0.85);
    pointer-events: none;
}

.cnt-slider-handle {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transform: scale(var(--cnt-inv-zoom, 1));
    transform-origin: center center;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.75), 0 0 18px rgba(0, 194, 255, 0.65);
    border: 2.5px solid #00c2ff;
    cursor: ew-resize;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    z-index: 31;
    pointer-events: none;
}

.cnt-slider-divider:hover .cnt-slider-handle,
.cnt-slider-divider.dragging .cnt-slider-handle,
body.is-dragging-split .cnt-slider-handle {
    transform: scale(calc(var(--cnt-inv-zoom, 1) * 1.15));
    background: linear-gradient(135deg, #00c2ff 0%, #0284c7 55%, #6366f1 100%);
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.8), 0 0 26px rgba(0, 194, 255, 0.95);
}

/* Resaltado de trazados al pasar el cursor o hacer clic */
.cnt-vector-path {
    cursor: pointer;
    transition: fill 0.1s ease, filter 0.15s ease;
}

.cnt-vector-path:hover {
    filter: brightness(1.25) drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

.cnt-vector-path.selected-path {
    stroke: var(--cnt-cyan-bright) !important;
    stroke-width: 2px !important;
    vector-effect: non-scaling-stroke;
}

/* Modo Wireframe / Contorno (Tipo Illustrator) */
.cnt-wireframe-active .cnt-vector-path {
    fill: rgba(56, 189, 248, 0.06) !important;
    stroke: var(--cnt-cyan-bright) !important;
    stroke-width: 1px !important;
    vector-effect: non-scaling-stroke;
}

/* ─── Barra Inferior de Métricas & Descarga ─── */
.cnt-bottom-bar {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0.75rem 1.15rem 0.85rem;
    gap: 0.65rem;
    box-sizing: border-box;
    flex-shrink: 0;
    background: rgba(10, 15, 28, 0.92);
    border-top: 1px solid var(--cnt-border-subtle);
    backdrop-filter: blur(16px);
}

.cnt-bottom-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.55rem;
    overflow: visible;
}

.cnt-info-pill {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 9999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.74rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    flex: 1 1 auto;
    justify-content: center;
    color: #cbd5e1;
}

.cnt-info-label {
    color: var(--cnt-text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
}

.cnt-info-pill-accent {
    background: rgba(0, 194, 255, 0.1);
    border-color: rgba(0, 194, 255, 0.35);
    color: var(--cnt-emerald-bright);
}

.cnt-info-sub {
    font-size: 0.72rem;
    color: #7dd3fc;
}

.cnt-bottom-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    width: 100%;
    flex-wrap: nowrap;
    box-sizing: border-box;
}

@media (max-width: 640px) {
    .cnt-bottom-actions {
        flex-direction: column;
        width: 100%;
    }
}

.cnt-btn-icon-text-action {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 0.6rem;
    color: #e2e8f0;
    padding: 0.55rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.cnt-btn-icon-text-action:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.cnt-format-dropdown-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.cnt-format-label {
    font-size: 0.74rem;
    color: var(--cnt-text-secondary);
    font-weight: 600;
}

.cnt-select-sm {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 0.5rem;
    color: #fff;
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
    font-family: inherit;
    cursor: pointer;
}

.cnt-select-sm:focus {
    outline: none;
    border-color: var(--cnt-emerald-bright);
}

.cnt-btn-download-primary {
    background: linear-gradient(135deg, #00b4d8 0%, #0284c7 45%, #6366f1 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.75rem;
    padding: 0.75rem 1.35rem;
    font-size: 0.88rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 4px 18px -2px rgba(2, 132, 199, 0.45);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.cnt-btn-download-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -4px rgba(124, 58, 237, 0.55), 0 0 20px rgba(0, 194, 255, 0.35);
    background: linear-gradient(135deg, #00c2ff 0%, #0ea5e9 45%, #7c3aed 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

.cnt-btn-download-primary:disabled,
.cnt-btn-icon-text-action:disabled,
.cnt-select-sm:disabled {
    opacity: 0.42;
    cursor: not-allowed !important;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

/* ─── MODO WIREFRAME & RESALTADO DE CAPAS ─── */
.cnt-wireframe-active #cnt-vec-svg-host path,
.cnt-wireframe-active #cnt-vec-svg-host rect,
.cnt-wireframe-active #cnt-vec-dual-svg-host path,
.cnt-wireframe-active #cnt-vec-dual-svg-host rect {
    fill: transparent !important;
    stroke: var(--cnt-emerald-bright, #00c2ff) !important;
    stroke-width: 0.8px !important;
    vector-effect: non-scaling-stroke;
    opacity: 0.9 !important;
}

.cnt-vector-path.selected-path {
    stroke: #ec4899 !important;
    stroke-width: 2.5px !important;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 6px rgba(236, 72, 153, 0.9)) !important;
}

/* ─── INTERACTIVIDAD DE TRAZADOS SVG (CROSSHAIR / HOVER) ─── */
#cnt-vec-svg-host .cnt-vector-path,
#cnt-vec-dual-svg-host .cnt-vector-path {
    cursor: pointer;
    transition: opacity 0.15s ease, filter 0.15s ease;
}

#cnt-vec-svg-host .cnt-vector-path:hover,
#cnt-vec-dual-svg-host .cnt-vector-path:hover {
    filter: brightness(1.22) drop-shadow(0 0 4px rgba(255, 255, 255, 0.75));
    opacity: 0.95;
}

/* ─── CINTA DE PALETA RÁPIDA (QUICK SWATCHES) ─── */
.cnt-quick-swatches-wrap {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    padding: 0.65rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.4rem;
}

.cnt-quick-swatches-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--cnt-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cnt-quick-swatches-label i {
    color: var(--cnt-cyan-bright);
}

.cnt-quick-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.cnt-quick-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
    position: relative;
}

.cnt-quick-swatch:hover {
    transform: scale(1.32);
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
    z-index: 2;
}

.cnt-quick-swatch.active {
    border-color: #ec4899;
    transform: scale(1.22);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.8);
}

/* ─── HELPER FLOTANTE / TOOLTIP DE LIENZO ─── */
.cnt-canvas-hint-pill {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 194, 255, 0.4);
    color: var(--cnt-text-primary);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 0 16px rgba(0, 194, 255, 0.25);
    z-index: 30;
    pointer-events: auto;
    animation: cntPillFloat 3s ease-in-out infinite alternate;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes cntPillFloat {
    0% { transform: translateX(-50%) translateY(0); }
    100% { transform: translateX(-50%) translateY(-4px); }
}

.cnt-canvas-hint-pill i {
    color: var(--cnt-emerald-bright);
    animation: cntPointerPulse 1.5s infinite;
}

@keyframes cntPointerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); color: #38bdf8; }
}

.cnt-hint-dismiss-btn {
    background: transparent;
    border: none;
    color: var(--cnt-text-muted);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 0.4rem;
    transition: color 0.15s ease;
}

.cnt-hint-dismiss-btn:hover {
    color: #fff;
}

/* ─── ESTADO COPIADO DE BOTÓN SVG ─── */
.cnt-btn-copied {
    background: #6366f1 !important;
    border-color: var(--cnt-emerald-bright) !important;
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(0, 194, 255, 0.6) !important;
}

/* ─── MODO PANTALLA COMPLETA DEL VISOR ─── */
#cnt-vec-viewport.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: none !important;
    z-index: 999999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* ─── RESPONSIVIDAD INTEGRAL MÓVIL Y TABLET ─── */
@media (max-width: 1023px) {
    .cnt-studio-layout {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        max-width: 100%;
    }
    .cnt-sidebar-controls,
    .cnt-main-workspace {
        min-width: 0;
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .cnt-viewer-toolbar {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.45rem;
        padding: 0.55rem 0.75rem;
        height: auto;
    }
    .cnt-toolbar-left,
    .cnt-toolbar-right,
    .cnt-view-mode-group,
    .cnt-toolbar-btn-group {
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .cnt-bottom-bar {
        padding: 0.75rem 0.85rem;
    }
    .cnt-bottom-info .cnt-info-pill {
        flex: 1 1 100%;
        white-space: normal;
        text-align: center;
        justify-content: center;
    }
    .cnt-bottom-actions {
        flex-direction: column;
        width: 100%;
    }
    .cnt-btn-download-primary,
    .cnt-btn-secondary {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
    .cnt-canvas-hint-pill {
        max-width: calc(100% - 24px);
        white-space: normal;
        text-align: center;
        font-size: 0.7rem;
        padding: 0.4rem 0.75rem;
    }
    .cnt-floating-tag {
        font-size: 0.65rem;
        padding: 0.28rem 0.65rem;
        top: 10px;
    }
}



