/* ═══════════════════════════════════════════════════════════════════
   COLORNITIDO TOOLS — QUITA EL FONDO DE LAS IMÁGENES
   Estilos Limpios, Modo Oscuro Neón & Diseño Ergonómico
   ═══════════════════════════════════════════════════════════════════ */

: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 ─── */
.cnt-tool-page .cnt-wrap#cnt-quita-el-fondo-de-las-imagenes,
.cnt-bgrem-wrap#cnt-quita-el-fondo-de-las-imagenes,
#cnt-quita-el-fondo-de-las-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-quita-el-fondo-de-las-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;
    overflow: visible;
}

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

/* ─── Layout Principal (2 Columnas Identico a la Suite) ─── */
.cnt-bgrem-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;
}

@media (min-width: 1024px) {
    .cnt-bgrem-layout {
        grid-template-columns: 380px 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;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    overflow: hidden;
    box-sizing: border-box;
}

@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 de Opciones con Scroll Interno */
.cnt-sidebar-content {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    overscroll-behavior: contain;
    padding-right: 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Scrollbar personalizado estilo Colornitido */
.cnt-sidebar-content::-webkit-scrollbar {
    width: 6px;
}
.cnt-sidebar-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 999px;
}
.cnt-sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(0, 194, 255, 0.35);
    border-radius: 999px;
    transition: background 0.2s ease;
}
.cnt-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--cnt-emerald-bright);
}
.cnt-sidebar-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 194, 255, 0.35) rgba(0, 0, 0, 0.25);
}

/* Pie fijo de la barra lateral */
.cnt-sidebar-footer {
    flex-shrink: 0;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--cnt-bg-surface);
    position: relative;
    z-index: 10;
}

.cnt-btn-sidebar-download {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.6rem !important;
    padding: 0.85rem 1.15rem !important;
    border-radius: 0.85rem !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    cursor: pointer;
    border: none;
    background: var(--cnt-emerald-bright);
    color: #06110a;
    box-shadow: 0 4px 15px rgba(0, 194, 255, 0.3);
    transition: all 0.2s ease;
}

.cnt-btn-sidebar-download:hover:not(:disabled) {
    background: #2fe06e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 194, 255, 0.45);
}

.cnt-btn-sidebar-download:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.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.85rem;
}

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

.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 h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    flex: 1;
}

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

.cnt-dropzone:hover,
.cnt-dropzone.dragover {
    border-color: var(--cnt-emerald-bright);
    background: rgba(0, 194, 255, 0.08);
    transform: translateY(-2px);
}

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

.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-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}

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

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

.cnt-dropzone-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
    padding: 0.5rem 0;
}

.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: cntSpin 0.85s linear infinite;
}

/* Tarjeta de Archivo Cargado */
.cnt-file-info-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 0.75rem;
    padding: 0.75rem 0.85rem;
}

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

.cnt-file-thumb {
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #0b0f0d;
    flex-shrink: 0;
    border: 1px solid var(--cnt-border-subtle);
}

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

.cnt-file-meta {
    flex: 1;
    min-width: 0;
}

.cnt-file-name {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cnt-item-tags-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

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

.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;
    gap: 0.35rem;
}

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

.cnt-btn-icon-action:hover {
    background: rgba(0, 194, 255, 0.2);
    color: #fff;
    border-color: var(--cnt-emerald-bright);
}

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

/* ─── Opciones de Fondo ─── */
.cnt-bgrem-preset-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 0.75rem;
    padding: 0.65rem 0.85rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.cnt-bgrem-preset-btn:hover {
    border-color: rgba(0, 194, 255, 0.4);
    background: rgba(0, 194, 255, 0.05);
}

.cnt-bgrem-preset-btn.active {
    border-color: var(--cnt-emerald-bright);
    background: rgba(0, 194, 255, 0.12);
}

.cnt-bgrem-checker-preview {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-image: linear-gradient(45deg, #27352a 25%, transparent 25%),
                      linear-gradient(-45deg, #27352a 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #27352a 75%),
                      linear-gradient(-45deg, transparent 75%, #27352a 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
    background-color: #121814;
}

.cnt-bgrem-preset-label {
    flex: 1;
    min-width: 0;
}

.cnt-bgrem-preset-label strong {
    display: block;
    font-size: 0.82rem;
    color: #ffffff;
}

.cnt-bgrem-preset-label span {
    display: block;
    font-size: 0.7rem;
    color: var(--cnt-text-muted);
}

.cnt-bgrem-check-icon {
    font-size: 1rem;
    color: var(--cnt-emerald-bright);
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* ─── Badge de Motor IA RMBG-1.4 ─── */
.cnt-bgrem-ai-badge {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    background: rgba(0, 194, 255, 0.08);
    border: 1px solid rgba(0, 194, 255, 0.25);
}

.cnt-bgrem-ai-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cnt-emerald-bright);
    box-shadow: 0 0 10px var(--cnt-emerald-bright);
    flex-shrink: 0;
    animation: cntPulseDot 1.5s infinite alternate;
}

@keyframes cntPulseDot {
    0% { opacity: 0.5; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1.15); box-shadow: 0 0 12px var(--cnt-emerald-bright); }
}

.cnt-bgrem-ai-info strong {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
}

.cnt-bgrem-ai-info span {
    display: block;
    font-size: 0.67rem;
    color: var(--cnt-text-secondary);
}

.cnt-bgrem-mode-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.cnt-bgrem-mode-card.active {
    background: rgba(0, 194, 255, 0.12);
    border-color: var(--cnt-emerald-bright);
    box-shadow: 0 4px 14px rgba(0, 194, 255, 0.2);
}

.cnt-bgrem-mode-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--cnt-text-secondary);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.cnt-bgrem-mode-card.active .cnt-bgrem-mode-icon {
    background: var(--cnt-emerald-bright);
    color: #06110a;
}

.cnt-bgrem-mode-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cnt-bgrem-mode-info strong {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cnt-bgrem-mode-info span {
    font-size: 0.67rem;
    color: var(--cnt-text-muted);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Control de Color de Fondo ─── */
.cnt-bgrem-color-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 0.75rem;
    padding: 0.55rem 0.75rem;
    position: relative;
}

.cnt-bgrem-color-preview-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.cnt-bgrem-color-chip {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.cnt-bgrem-color-chip:hover {
    transform: scale(1.1);
}

.cnt-bgrem-color-meta {
    display: flex;
    flex-direction: column;
}

.cnt-bgrem-color-title {
    font-size: 0.68rem;
    color: var(--cnt-text-muted);
}

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

.cnt-bgrem-btn-eyedropper {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.55rem;
    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;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cnt-bgrem-btn-eyedropper:hover {
    background: rgba(0, 194, 255, 0.28);
    transform: translateY(-1px);
}

.cnt-bgrem-btn-eyedropper.active {
    background: var(--cnt-emerald-bright);
    color: #06110a;
    box-shadow: 0 0 15px rgba(0, 194, 255, 0.6);
    border-color: var(--cnt-emerald-bright);
    animation: cntPulseDropper 1.2s infinite alternate;
}

@keyframes cntPulseDropper {
    0% { box-shadow: 0 0 8px rgba(0, 194, 255, 0.4); }
    100% { box-shadow: 0 0 18px rgba(0, 194, 255, 0.8); }
}

/* Presets rápidos de color */
.cnt-bgrem-color-presets {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.cnt-bgrem-preset-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--cnt-border-subtle);
    color: var(--cnt-text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.cnt-bgrem-preset-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.cnt-bgrem-preset-chip.active {
    border-color: var(--cnt-emerald-bright);
    color: #fff;
    background: rgba(0, 194, 255, 0.15);
}

.cnt-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

/* Switches para Interior y Sombras */
.cnt-bgrem-toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0;
}

.cnt-bgrem-toggle-text strong {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.cnt-bgrem-toggle-text span {
    display: block;
    font-size: 0.68rem;
    color: var(--cnt-text-muted);
    line-height: 1.25;
}

.cnt-bgrem-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

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

.cnt-bgrem-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .2s;
    border-radius: 20px;
}

.cnt-bgrem-switch-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: .2s;
    border-radius: 50%;
}

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

.cnt-bgrem-switch input:checked + .cnt-bgrem-switch-slider:before {
    transform: translateX(16px);
    background-color: #06110a;
}

/* Cursor de Muestreo con Gotero */
#cnt-bgrem-viewport.cnt-sampling-mode,
#cnt-bgrem-viewport.cnt-sampling-mode * {
    cursor: crosshair !important;
}

/* ─── Retoque Manual (Borrar / Restaurar / Varita) ─── */
.cnt-bgrem-brush-switch {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.cnt-bgrem-tool-toggle {
    padding: 8px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--cnt-text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cnt-bgrem-tool-toggle:hover {
    color: #ffffff;
}

.cnt-bgrem-tool-toggle.active {
    color: #ffffff;
    background: rgba(0, 194, 255, 0.15);
    border-color: var(--cnt-emerald-bright);
    box-shadow: 0 4px 12px rgba(0, 194, 255, 0.2);
}

.cnt-bgrem-slider-box {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cnt-bgrem-slider-lbl {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cnt-text-secondary);
}

.cnt-bgrem-slider-lbl strong {
    color: var(--cnt-emerald-bright);
}

.cnt-bgrem-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
}

.cnt-bgrem-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--cnt-emerald-bright);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 194, 255, 0.5);
}

.cnt-bgrem-size-presets {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.cnt-bgrem-size-btn {
    flex: 1;
    padding: 0.35rem 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--cnt-text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: inherit;
}

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

.cnt-bgrem-size-btn.active {
    color: #ffffff;
    background: rgba(0, 194, 255, 0.25);
    border-color: var(--cnt-emerald-bright);
    box-shadow: 0 0 8px rgba(0, 194, 255, 0.35);
}

.cnt-bgrem-brush-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.cnt-bgrem-btn-subaction {
    padding: 7px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--cnt-text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--cnt-border-subtle);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cnt-bgrem-btn-subaction:hover:not(:disabled) {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.cnt-bgrem-btn-subaction:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ══════════════════════════════════════════════════════════════ */
/* ÁREA PRINCIPAL: VISOR Y COMPARADOR                             */
/* ══════════════════════════════════════════════════════════════ */
.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;
}

.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-bgrem-view-pills {
    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-bgrem-pill-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--cnt-text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cnt-bgrem-pill-btn:hover {
    color: #ffffff;
}

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

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

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

.cnt-btn-peek-orig:hover,
.cnt-btn-peek-orig.active,
.cnt-btn-peek-orig.peeking {
    background: rgba(0, 194, 255, 0.15);
    border-color: rgba(0, 194, 255, 0.45);
    color: var(--cnt-emerald-bright);
    box-shadow: 0 0 10px rgba(0, 194, 255, 0.2);
}

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

.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;
}

/* ─── Viewport (Ajedrezado Unificado Reglas 8 y 9 GEMINI.md) ─── */
.cnt-canvas-viewport {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    position: relative;
    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;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
    cursor: default;
    user-select: none;
}

/* Modo Mano para Arrastrar con Barra Espaciadora */
.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;
}

/* Modo Varita Mágica con Cursor SVG Personalizado */
.cnt-canvas-viewport.cnt-wand-mode,
.cnt-canvas-viewport.cnt-wand-mode * {
    cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'32'%20height%3D'32'%20viewBox%3D'0%200%2032%2032'%3E%20%3Cdefs%3E%20%3Cfilter%20id%3D'glow'%20x%3D'-20%25'%20y%3D'-20%25'%20width%3D'140%25'%20height%3D'140%25'%3E%20%3CfeDropShadow%20dx%3D'0'%20dy%3D'0'%20stdDeviation%3D'1'%20flood-color%3D'%2300c2ff'%20flood-opacity%3D'0.8'%2F%3E%20%3C%2Ffilter%3E%20%3C%2Fdefs%3E%20%3Cpath%20d%3D'M4%2C1%20L5.2%2C3.2%20L7.5%2C4%20L5.2%2C4.8%20L4%2C7%20L3%2C4.8%20L0.5%2C4%20L3%2C3.2%20Z'%20fill%3D'%2300c2ff'%20stroke%3D'%23ffffff'%20stroke-width%3D'0.75'%20filter%3D'url(%23glow)'%2F%3E%20%3Ccircle%20cx%3D'4'%20cy%3D'4'%20r%3D'1.2'%20fill%3D'%23ffffff'%2F%3E%20%3Cpolygon%20points%3D'11%2C1%2011.8%2C2.8%2013.5%2C3.2%2011.8%2C3.8%2011%2C5.5%2010.3%2C3.8%208.5%2C3.2%2010.3%2C2.8'%20fill%3D'%2338bdf8'%2F%3E%20%3Cpolygon%20points%3D'2%2C11%202.8%2C12.8%204.5%2C13.2%202.8%2C13.8%202%2C15.5%201.3%2C13.8%200%2C13.2%201.3%2C12.8'%20fill%3D'%2338bdf8'%2F%3E%20%3Cline%20x1%3D'5'%20y1%3D'5'%20x2%3D'24'%20y2%3D'24'%20stroke%3D'%23000000'%20stroke-width%3D'4.5'%20stroke-linecap%3D'round'%2F%3E%20%3Cline%20x1%3D'5'%20y1%3D'5'%20x2%3D'24'%20y2%3D'24'%20stroke%3D'%23ffffff'%20stroke-width%3D'3'%20stroke-linecap%3D'round'%2F%3E%20%3Cline%20x1%3D'8'%20y1%3D'8'%20x2%3D'22'%20y2%3D'22'%20stroke%3D'%230f172a'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%2F%3E%20%3Cline%20x1%3D'5'%20y1%3D'5'%20x2%3D'9'%20y2%3D'9'%20stroke%3D'%2300c2ff'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%2F%3E%20%3Ccircle%20cx%3D'24'%20cy%3D'24'%20r%3D'1.8'%20fill%3D'%2300c2ff'%20stroke%3D'%23000000'%20stroke-width%3D'0.75'%2F%3E%20%3C%2Fsvg%3E") 4 4, crosshair !important;
}

.cnt-canvas-viewport.cnt-wand-mode .cnt-bgrem-brush-cursor {
    display: none !important;
}

.cnt-canvas-viewport.cnt-hand-mode .cnt-bgrem-brush-cursor,
.cnt-canvas-viewport.cnt-hand-grabbing .cnt-bgrem-brush-cursor {
    display: none !important;
}

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

/* Cursor circular */
.cnt-bgrem-brush-cursor {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.8), inset 0 0 4px rgba(0, 194, 255, 0.5);
    z-index: 100;
}

/* Placeholder Inicial */
.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);
}

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

.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;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
        linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    flex-shrink: 0;
}

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

.cnt-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 6px;
    overflow: hidden;
}

.cnt-layer-enhanced {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    display: block;
    border-radius: 6px;
    overflow: hidden;
}

.cnt-layer-enhanced canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.cnt-bgrem-layer-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: 6px;
    overflow: hidden;
}

.cnt-bgrem-layer-bg canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.cnt-layer-original {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    clip-path: inset(0 50% 0 0);
    border-radius: 6px;
    overflow: hidden;
}

.cnt-layer-original canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}

/* 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-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);
}

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

/* Divisor Deslizante Estandarizado (Split Slider compensado contra el zoom) */
.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 {
    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);
}

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

.cnt-bgrem-scan-beam {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--cnt-emerald-bright) 50%, transparent 100%);
    box-shadow: 0 0 16px 3px rgba(0, 194, 255, 0.8);
    animation: cntScanBeam 2s ease-in-out infinite alternate;
}

@keyframes cntScanBeam {
    0% { top: 10%; opacity: 0.2; }
    50% { opacity: 1; }
    100% { top: 90%; opacity: 0.2; }
}

.cnt-bgrem-scan-status {
    background: rgba(15, 23, 42, 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;
}

.cnt-bgrem-scan-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid rgba(0, 194, 255, 0.2);
    border-top-color: var(--cnt-emerald-bright);
    animation: cntSpin 0.85s linear infinite;
    margin: 0 auto 1rem;
}

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

.cnt-bgrem-scan-status h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.35rem 0;
}

.cnt-bgrem-scan-status p {
    font-size: 0.82rem;
    color: var(--cnt-text-secondary);
    margin: 0 0 1rem 0;
}

.cnt-bgrem-scan-progressbar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.cnt-bgrem-scan-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cnt-emerald-bright), var(--cnt-cyan-bright));
    border-radius: 999px;
    transition: width 0.25s ease;
}

/* ─── Barra Inferior de Métricas & Descarga (Reglas 6, 9 y 10 GEMINI.md) ─── */
.cnt-bottom-bar,
.cnt-bgrem-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;
    background: rgba(10, 15, 28, 0.92);
    border-top: 1px solid var(--cnt-border-subtle);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10;
    flex-shrink: 0;
    box-sizing: border-box;
}

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

.cnt-bgrem-bottom-bar .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;
    box-sizing: border-box;
    transition: all 0.2s ease;
    color: #cbd5e1;
}

.cnt-bgrem-bottom-bar .cnt-info-pill i {
    color: var(--cnt-emerald-bright, #00c2ff);
    font-size: 0.75rem;
}

.cnt-bgrem-bottom-bar .cnt-info-label {
    color: var(--cnt-text-muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.cnt-bgrem-bottom-bar .cnt-info-pill strong {
    color: #f8fafc;
    font-weight: 700;
}

.cnt-bgrem-bottom-bar .cnt-info-pill-accent {
    border-color: rgba(0, 194, 255, 0.45);
    background: rgba(0, 194, 255, 0.08);
}

.cnt-bgrem-bottom-bar .cnt-info-pill-accent strong,
.cnt-bgrem-bottom-bar .cnt-info-pill-accent span,
.cnt-bgrem-bottom-bar .cnt-info-pill-accent i {
    color: #00c2ff;
}

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

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

.cnt-btn-download-action: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%);
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.4);
}

.cnt-btn-download-action:disabled,
.cnt-bgrem-bottom-bar button:disabled {
    opacity: 0.42 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ─── Responsive ─── */
@media (max-width: 1023px) {
    .cnt-bgrem-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-bgrem-view-pills {
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .cnt-bgrem-bottom-bar {
        padding: 0.75rem 0.85rem;
    }
    .cnt-bgrem-bottom-bar .cnt-bottom-actions {
        flex-direction: column;
        width: 100%;
    }
    .cnt-btn-download-action {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
    .cnt-bgrem-bottom-bar .cnt-info-pill {
        flex: 1 1 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
    .cnt-floating-tag {
        font-size: 0.65rem;
        padding: 0.28rem 0.65rem;
        top: 10px;
    }
}
