/**
 * ============================================================
 * KLINAFY - ESTILOS DEL MÓDULO DE CEFALOMETRÍA
 * ============================================================
 * Versión: 1.0.0
 * Fecha: Enero 2026
 * ============================================================
 */

/* ========================================================
   VARIABLES
   ======================================================== */
:root {
    --cefalo-primary: #2B6CB0;
    --cefalo-primary-dark: #2C5282;
    --cefalo-secondary: #4C51BF;
    --cefalo-success: #48bb78;
    --cefalo-warning: #ed8936;
    --cefalo-danger: #f56565;
    --cefalo-info: #4299e1;
    --cefalo-dark: #111827;
    --cefalo-dark-light: #1a2332;
    --cefalo-gray: #4a5568;
    --cefalo-gray-light: #a0aec0;
    --cefalo-white: #f7fafc;
    --cefalo-border-radius: 12px;
    --cefalo-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    --cefalo-transition: all 0.3s ease;
}

/* ========================================================
   MODAL BASE
   ======================================================== */
.cefalo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cefalo-modal.visible {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.cefalo-modal-content {
    background: var(--cefalo-dark);
    width: 98%;
    max-width: 1800px;
    height: 96vh;
    max-height: 96vh;
    border-radius: var(--cefalo-border-radius);
    box-shadow: var(--cefalo-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cefalo-slide-up 0.3s ease;
}

@keyframes cefalo-slide-up {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========================================================
   HEADER - COMPACTO
   ======================================================== */
.cefalo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, #1a365d 0%, #2B6CB0 50%, #2C5282 100%);
    color: var(--cefalo-white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cefalo-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cefalo-header-title h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.cefalo-icon {
    font-size: 1.4rem;
}

.cefalo-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.cefalo-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--cefalo-transition);
    color: var(--cefalo-white);
}

.cefalo-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ========================================================
   BODY - LAYOUT
   ======================================================== */
.cefalo-body {
    display: grid;
    grid-template-columns: 1fr 270px;
    flex: 1;
    overflow: hidden;
    min-height: 0; /* Importante para que flex funcione correctamente */
}

/* ========================================================
   PANEL IZQUIERDO - CANVAS
   ======================================================== */
.cefalo-panel-izquierdo {
    background: #0a0a14;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 0; /* Permite que el contenido se ajuste */
    overflow: hidden;
}

/* Zona de carga */
.cefalo-zona-carga {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 3px dashed var(--cefalo-gray);
    border-radius: var(--cefalo-border-radius);
    margin: 15px;
    cursor: pointer;
    transition: var(--cefalo-transition);
}

.cefalo-zona-carga:hover,
.cefalo-zona-carga.dragover {
    border-color: var(--cefalo-primary);
    background: rgba(102, 126, 234, 0.1);
}

.cefalo-upload-icon {
    color: var(--cefalo-gray-light);
    margin-bottom: 15px;
    transition: var(--cefalo-transition);
}

.cefalo-zona-carga:hover .cefalo-upload-icon {
    color: var(--cefalo-primary);
    transform: translateY(-5px);
}

.cefalo-upload-text {
    color: var(--cefalo-white);
    font-size: 1.1rem;
    margin: 0;
}

.cefalo-upload-subtext {
    color: var(--cefalo-gray-light);
    font-size: 0.9rem;
    margin-top: 6px;
}

.cefalo-upload-hint {
    color: var(--cefalo-primary);
    font-size: 0.85rem;
    margin-top: 15px;
    padding: 8px 15px;
    background: rgba(102, 126, 234, 0.15);
    border-radius: 20px;
}

/* Canvas container - OPTIMIZADO PARA MÁXIMO ESPACIO */
.cefalo-canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    position: relative;
    min-height: 0;
    overflow: hidden;
}

.cefalo-canvas-container canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* Loading overlay */
.cefalo-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 20, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.cefalo-loading-content {
    text-align: center;
    color: var(--cefalo-white);
}

.cefalo-loading-content p {
    margin: 15px 0 5px 0;
    font-size: 1.1rem;
}

.cefalo-loading-sub {
    color: var(--cefalo-gray-light);
    font-size: 0.9rem !important;
}

.cefalo-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: var(--cefalo-primary);
    border-radius: 50%;
    animation: cefalo-spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Controles del canvas - Compactos */
.cefalo-canvas-controles {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    border-radius: 20px;
}

.cefalo-btn-control {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--cefalo-transition);
    color: var(--cefalo-white);
}

.cefalo-btn-control svg {
    width: 14px;
    height: 14px;
}

.cefalo-btn-control:hover,
.cefalo-btn-control.active {
    background: var(--cefalo-primary);
}

/* Controles de Zoom - Compactos */
.cefalo-zoom-controles {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 8px;
    border-radius: 15px;
    z-index: 10;
}

.cefalo-btn-zoom {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.cefalo-btn-zoom svg {
    width: 14px;
    height: 14px;
}

.cefalo-btn-zoom:hover {
    background: var(--cefalo-primary);
    transform: scale(1.1);
}

.cefalo-zoom-nivel {
    color: white;
    font-size: 10px;
    font-weight: 600;
    min-width: 35px;
    text-align: center;
}

/* ========================================================
   PANEL DERECHO - COMPACTO
   ======================================================== */
.cefalo-panel-derecho {
    background: linear-gradient(180deg, #1a2332 0%, #111827 100%);
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.cefalo-seccion {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
}

.cefalo-seccion-titulo {
    color: var(--cefalo-white);
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cefalo-landmarks-count {
    margin-left: auto;
    background: var(--cefalo-primary);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
}

/* Instrucciones - Compactas */
.cefalo-instrucciones-lista {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cefalo-instruccion-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.cefalo-instruccion-num {
    width: 18px;
    height: 18px;
    background: var(--cefalo-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.cefalo-instruccion-item p {
    margin: 0;
    color: var(--cefalo-gray-light);
    font-size: 0.75rem;
    line-height: 1.3;
}

/* Lista de landmarks - Compacta */
.cefalo-landmarks-lista {
    max-height: 45vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cefalo-landmark-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--cefalo-transition);
}

.cefalo-landmark-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cefalo-landmark-item.seleccionado {
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid var(--cefalo-primary);
}

.cefalo-landmark-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cefalo-landmark-id {
    font-weight: 600;
    color: var(--cefalo-white);
    width: 30px;
    font-size: 0.72rem;
}

.cefalo-landmark-nombre {
    flex: 1;
    color: var(--cefalo-gray-light);
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cefalo-landmark-status {
    color: var(--cefalo-success);
    font-size: 0.75rem;
}

.cefalo-landmark-item:not(.detectado) .cefalo-landmark-status {
    color: var(--cefalo-gray);
}

/* Leyenda - Compacta */
.cefalo-leyenda-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.cefalo-leyenda-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--cefalo-gray-light);
}

.cefalo-leyenda-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Botón recalcular */
.cefalo-btn-recalcular {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--cefalo-primary), var(--cefalo-secondary));
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--cefalo-transition);
}

.cefalo-btn-recalcular:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ========================================================
   PANEL DE RESULTADOS
   ======================================================== */
.cefalo-resultados {
    background: var(--cefalo-dark-light);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 45vh;
    overflow-y: auto;
}

/* Tabs */
.cefalo-tabs {
    display: flex;
    gap: 5px;
    padding: 15px 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cefalo-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--cefalo-gray-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--cefalo-transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.cefalo-tab:hover {
    color: var(--cefalo-white);
}

.cefalo-tab.active {
    color: var(--cefalo-primary);
    border-bottom-color: var(--cefalo-primary);
}

/* Tab content */
.cefalo-tab-content {
    display: none;
    padding: 20px;
}

.cefalo-tab-content.active {
    display: block;
}

/* Resumen grid */
.cefalo-resumen-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.cefalo-resumen-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    transition: var(--cefalo-transition);
}

.cefalo-resumen-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cefalo-card-wide {
    grid-column: span 1;
}

.cefalo-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.cefalo-card-icon {
    font-size: 1.3rem;
}

.cefalo-card-header h4 {
    margin: 0;
    color: var(--cefalo-gray-light);
    font-size: 0.85rem;
    font-weight: 500;
}

.cefalo-card-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cefalo-white);
    margin-bottom: 5px;
}

.cefalo-card-desc {
    color: var(--cefalo-gray-light);
    font-size: 0.85rem;
    margin: 0;
}

/* Colorear cards según clasificación */
.cefalo-resumen-card.clase-i .cefalo-card-value { color: var(--cefalo-success); }
.cefalo-resumen-card.clase-ii .cefalo-card-value { color: var(--cefalo-warning); }
.cefalo-resumen-card.clase-iii .cefalo-card-value { color: var(--cefalo-info); }

.cefalo-resumen-card.meso .cefalo-card-value { color: var(--cefalo-success); }
.cefalo-resumen-card.braqui .cefalo-card-value { color: var(--cefalo-info); }
.cefalo-resumen-card.dolico .cefalo-card-value { color: var(--cefalo-warning); }

/* Valores clave */
.cefalo-valores-clave {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.cefalo-valor-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 15px;
    border-radius: 8px;
    min-width: 60px;
}

.cefalo-valor-label {
    font-size: 0.75rem;
    color: var(--cefalo-gray-light);
    margin-bottom: 4px;
}

.cefalo-valor-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cefalo-white);
}

/* Resumen narrativo */
.cefalo-resumen-narrativo {
    background: rgba(102, 126, 234, 0.1);
    border-left: 4px solid var(--cefalo-primary);
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    margin-top: 20px;
}

.cefalo-resumen-narrativo h4 {
    margin: 0 0 10px 0;
    color: var(--cefalo-white);
    font-size: 0.95rem;
}

.cefalo-resumen-narrativo p {
    margin: 0;
    color: var(--cefalo-gray-light);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Tabla de mediciones */
.cefalo-mediciones-tabla {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cefalo-medicion-fila {
    display: grid;
    grid-template-columns: 1fr 120px 180px;
    gap: 15px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    align-items: center;
    transition: var(--cefalo-transition);
}

.cefalo-medicion-fila:hover {
    background: rgba(255, 255, 255, 0.06);
}

.cefalo-med-nombre strong {
    display: block;
    color: var(--cefalo-white);
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.cefalo-med-nombre small {
    color: var(--cefalo-gray-light);
    font-size: 0.75rem;
}

.cefalo-med-valor {
    text-align: center;
}

.cefalo-med-numero {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
}

.cefalo-med-norma {
    display: block;
    font-size: 0.7rem;
    color: var(--cefalo-gray-light);
    margin-top: 2px;
}

.cefalo-med-interpretacion {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-align: center;
    font-weight: 500;
}

/* Acciones */
.cefalo-acciones {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: flex-end;
}

.cefalo-btn-secundario {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--cefalo-white);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--cefalo-transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cefalo-btn-secundario:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ========================================================
   RESPONSIVE
   ======================================================== */
@media (max-width: 1200px) {
    .cefalo-resumen-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .cefalo-card-wide {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {
    .cefalo-body {
        grid-template-columns: 1fr;
    }
    
    .cefalo-panel-izquierdo {
        min-height: 350px;
    }
    
    .cefalo-panel-derecho {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        max-height: 300px;
    }
    
    .cefalo-resumen-grid {
        grid-template-columns: 1fr;
    }
    
    .cefalo-card-wide {
        grid-column: span 1;
    }
    
    .cefalo-medicion-fila {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .cefalo-med-valor,
    .cefalo-med-interpretacion {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .cefalo-modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .cefalo-header {
        padding: 12px 15px;
    }
    
    .cefalo-header-title h2 {
        font-size: 1.1rem;
    }
    
    .cefalo-tabs {
        overflow-x: auto;
        padding: 10px 15px 0;
    }
    
    .cefalo-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .cefalo-tab-content {
        padding: 15px;
    }
    
    .cefalo-valores-clave {
        justify-content: center;
    }
    
    .cefalo-acciones {
        flex-direction: column;
    }
    
    .cefalo-btn-secundario {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================================
   SCROLLBAR
   ======================================================== */
.cefalo-panel-derecho::-webkit-scrollbar,
.cefalo-landmarks-lista::-webkit-scrollbar,
.cefalo-resultados::-webkit-scrollbar {
    width: 6px;
}

.cefalo-panel-derecho::-webkit-scrollbar-track,
.cefalo-landmarks-lista::-webkit-scrollbar-track,
.cefalo-resultados::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.cefalo-panel-derecho::-webkit-scrollbar-thumb,
.cefalo-landmarks-lista::-webkit-scrollbar-thumb,
.cefalo-resultados::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.cefalo-panel-derecho::-webkit-scrollbar-thumb:hover,
.cefalo-landmarks-lista::-webkit-scrollbar-thumb:hover,
.cefalo-resultados::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================================
   BOTÓN VOLVER - Compacto
   ======================================================== */
.cefalo-btn-volver {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: var(--cefalo-white);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--cefalo-transition);
    margin-right: 10px;
}

.cefalo-btn-volver:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-2px);
}

.cefalo-btn-volver svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* ========================================================
   MODO MARCADO MANUAL - Compacto
   ======================================================== */
.cefalo-modo-marcado-indicador {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: linear-gradient(135deg, rgba(249, 202, 36, 0.2), rgba(249, 202, 36, 0.1));
    border: 1px solid rgba(249, 202, 36, 0.5);
    border-radius: 6px;
    margin-bottom: 8px;
    color: var(--cefalo-white);
    font-size: 0.72rem;
    animation: cefalo-pulse-border 2s ease-in-out infinite;
}

@keyframes cefalo-pulse-border {
    0%, 100% { border-color: rgba(249, 202, 36, 0.5); }
    50% { border-color: rgba(249, 202, 36, 0.9); }
}

.cefalo-marcado-icon {
    font-size: 1rem;
    animation: cefalo-bounce 1s ease infinite;
}

@keyframes cefalo-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.cefalo-btn-cancelar-marcado {
    margin-left: auto;
    padding: 3px 8px;
    background: rgba(245, 101, 101, 0.2);
    border: 1px solid rgba(245, 101, 101, 0.5);
    border-radius: 4px;
    color: #f56565;
    font-size: 0.68rem;
    cursor: pointer;
    transition: var(--cefalo-transition);
}

.cefalo-btn-cancelar-marcado:hover {
    background: rgba(245, 101, 101, 0.4);
}

/* Ayuda para marcado - Compacto */
.cefalo-ayuda-marcado {
    background: rgba(102, 126, 234, 0.1);
    border-left: 2px solid var(--cefalo-primary);
    padding: 5px 8px;
    margin-bottom: 8px;
    border-radius: 0 4px 4px 0;
}

.cefalo-ayuda-marcado p {
    margin: 0;
    font-size: 0.7rem;
    color: var(--cefalo-gray-light);
    line-height: 1.3;
}

.cefalo-ayuda-marcado strong {
    color: var(--cefalo-white);
}

/* Landmark en modo marcado */
.cefalo-landmark-item.modo-marcado {
    background: rgba(249, 202, 36, 0.15);
    border: 1px solid rgba(249, 202, 36, 0.5);
    animation: cefalo-glow 1.5s ease-in-out infinite;
}

@keyframes cefalo-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(249, 202, 36, 0.3); }
    50% { box-shadow: 0 0 15px rgba(249, 202, 36, 0.5); }
}

.cefalo-landmark-item.modo-marcado .cefalo-landmark-status {
    color: #F9CA24;
    font-size: 0.85rem;
}

/* Landmark no detectado - indicador visual de que se puede marcar */
.cefalo-landmark-item:not(.detectado):hover {
    background: rgba(249, 202, 36, 0.1);
    border: 1px solid rgba(249, 202, 36, 0.3);
}

.cefalo-landmark-item:not(.detectado) .cefalo-landmark-status {
    opacity: 0.5;
    transition: var(--cefalo-transition);
}

.cefalo-landmark-item:not(.detectado):hover .cefalo-landmark-status {
    opacity: 1;
    color: #F9CA24;
}

/* ========================================================
   MODO MANUAL INFO - Compacto
   ======================================================== */
.cefalo-modo-manual-info {
    color: var(--cefalo-gray-light);
    font-size: 0.75rem;
    line-height: 1.4;
}

.cefalo-modo-manual-info p {
    margin: 0 0 8px 0;
}

.cefalo-modo-manual-info ol {
    margin: 0;
    padding-left: 20px;
}

.cefalo-modo-manual-info li {
    margin-bottom: 6px;
}

/* ========================================================
   CURSOR CROSSHAIR PARA CANVAS EN MODO MARCADO
   ======================================================== */
.cefalo-canvas-container canvas.modo-marcado {
    cursor: crosshair !important;
}

/* ========================================================
   RESPONSIVE AJUSTES PARA BOTÓN VOLVER
   ======================================================== */
@media (max-width: 600px) {
    .cefalo-btn-volver {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .cefalo-btn-volver span {
        display: none;
    }
    
    .cefalo-header-title h2 {
        font-size: 1rem;
    }
    
    .cefalo-modo-marcado-indicador {
        flex-wrap: wrap;
        font-size: 0.8rem;
    }
    
    .cefalo-btn-cancelar-marcado {
        width: 100%;
        margin-top: 8px;
        margin-left: 0;
        text-align: center;
    }
}

/* ========================================================
   PANEL DE RESULTADOS COLAPSABLE
   ======================================================== */
.cefalo-resultados-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.cefalo-resultados-header h3 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--cefalo-white);
    font-weight: 600;
}

.cefalo-btn-colapsar {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--cefalo-white);
}

.cefalo-btn-colapsar:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.cefalo-btn-colapsar svg {
    transition: transform 0.3s ease;
}

.cefalo-resultados-contenido {
    transition: all 0.3s ease;
}

.cefalo-resultados.colapsado {
    max-height: 60px !important;
}

.cefalo-resultados.colapsado .cefalo-resultados-contenido {
    display: none;
}

/* ========================================================
   BOTÓN SALIR DEL MÓDULO
   ======================================================== */
.cefalo-salir-container {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.cefalo-btn-salir {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f56565, #e53e3e);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.cefalo-btn-salir:hover {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.4);
}

.cefalo-btn-salir svg {
    flex-shrink: 0;
}

/* ========================================================
   RESPONSIVE PARA PANEL COLAPSABLE
   ======================================================== */
@media (max-width: 600px) {
    .cefalo-resultados-header {
        padding: 10px 15px;
    }
    
    .cefalo-resultados-header h3 {
        font-size: 0.85rem;
    }
    
    .cefalo-btn-colapsar {
        width: 28px;
        height: 28px;
    }
    
    .cefalo-salir-container {
        padding: 12px 15px;
    }
    
    .cefalo-btn-salir {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
}

/* ========================================================
   PUNTOS CALCULADOS AUTOMÁTICAMENTE
   ======================================================== */

/* Separador entre puntos manuales y calculados */
.cefalo-landmarks-separador {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0 4px 0;
    margin-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    color: var(--cefalo-gray-light);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cefalo-landmarks-separador span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Estilo para landmarks calculados en la lista */
.cefalo-landmark-item.cefalo-landmark-calculado {
    background: rgba(162, 155, 254, 0.1);
    border-left: 2px solid rgba(162, 155, 254, 0.4);
}

.cefalo-landmark-item.cefalo-landmark-calculado:hover {
    background: rgba(162, 155, 254, 0.15);
}

.cefalo-landmark-item.cefalo-landmark-calculado.detectado {
    background: rgba(162, 155, 254, 0.2);
    border-left: 2px solid rgba(162, 155, 254, 0.7);
}

/* Dot diferente para puntos calculados (rombo) */
.cefalo-dot-calculado {
    width: 8px !important;
    height: 8px !important;
    border-radius: 2px !important;
    transform: rotate(45deg);
}

/* Status icon para puntos calculados */
.cefalo-landmark-item.cefalo-landmark-calculado .cefalo-landmark-status {
    color: #A29BFE;
    font-size: 0.7rem;
}

/* Nombre en itálica para puntos calculados */
.cefalo-landmark-item.cefalo-landmark-calculado .cefalo-landmark-nombre {
    font-style: italic;
    font-size: 0.68rem;
}

/* Mini separador en leyenda para puntos calculados */
.cefalo-leyenda-separador-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    font-size: 0.65rem;
    color: var(--cefalo-gray-light);
}

.cefalo-leyenda-separador-mini .cefalo-dot-calculado {
    width: 6px !important;
    height: 6px !important;
}

/* Tooltip para indicar que es calculado */
.cefalo-landmark-item.cefalo-landmark-calculado {
    position: relative;
}

.cefalo-landmark-item.cefalo-landmark-calculado::after {
    content: '';
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    color: #A29BFE;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cefalo-landmark-item.cefalo-landmark-calculado:hover::after {
    content: 'auto';
    opacity: 0.7;
}

/* ========================================================
   AVISO DE PUNTOS MANUALES (Co, Pm)
   ======================================================== */
.cefalo-aviso-manual {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: linear-gradient(135deg, rgba(249, 202, 36, 0.15), rgba(255, 107, 107, 0.1));
    border: 1px solid rgba(249, 202, 36, 0.4);
    border-left: 3px solid #F9CA24;
    border-radius: 6px;
    padding: 10px 12px;
    margin: 8px 0;
    animation: cefalo-aviso-pulso 2s ease-in-out infinite;
}

@keyframes cefalo-aviso-pulso {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(249, 202, 36, 0.3);
    }
    50% { 
        box-shadow: 0 0 8px 2px rgba(249, 202, 36, 0.2);
    }
}

.cefalo-aviso-icono {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.cefalo-aviso-contenido {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.75rem;
    color: var(--cefalo-text);
    line-height: 1.4;
}

.cefalo-aviso-contenido strong {
    color: #F9CA24;
}

.cefalo-aviso-contenido small {
    color: var(--cefalo-gray-light);
    font-size: 0.68rem;
}

/* ========================================================
   OPCIÓN C: ESTILOS ADICIONALES
   ======================================================== */

/* ========================================================
   BOTÓN MODO GUIADO
   ======================================================== */
.cefalo-btn-modo-guiado {
    width: calc(100% - 30px);
    margin: 10px 15px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border: 2px dashed rgba(102, 126, 234, 0.5);
    border-radius: 10px;
    color: var(--cefalo-white);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cefalo-btn-modo-guiado:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    border-color: var(--cefalo-primary);
    transform: translateY(-2px);
}

.cefalo-btn-modo-guiado.active {
    background: linear-gradient(135deg, var(--cefalo-primary), var(--cefalo-secondary));
    border-style: solid;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ========================================================
   SELECTOR DE ANÁLISIS
   ======================================================== */
.cefalo-selector-analisis {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 12px;
    margin: 0 15px 10px 15px;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.cefalo-selector-analisis .cefalo-seccion-titulo {
    margin-bottom: 8px;
}

.cefalo-selector-hint {
    font-size: 0.7rem;
    color: var(--cefalo-gray-light);
    margin: 0 0 12px 0;
    font-style: italic;
}

.cefalo-bloques-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 5px;
}

.cefalo-bloques-lista::-webkit-scrollbar {
    width: 4px;
}

.cefalo-bloques-lista::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.cefalo-bloques-lista::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 2px;
}

/* ========================================================
   ITEM DE BLOQUE DE ANÁLISIS
   ======================================================== */
.cefalo-bloque-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.cefalo-bloque-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.cefalo-bloque-item.seleccionado {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--cefalo-primary);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
}

.cefalo-bloque-item.completo {
    border-color: var(--cefalo-success);
}

.cefalo-bloque-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.cefalo-bloque-icono {
    font-size: 1rem;
}

.cefalo-bloque-nombre {
    flex: 1;
    font-weight: 600;
    color: var(--cefalo-white);
    font-size: 0.82rem;
}

.cefalo-bloque-check {
    color: var(--cefalo-primary);
    font-weight: bold;
    font-size: 0.9rem;
}

.cefalo-bloque-descripcion {
    font-size: 0.68rem;
    color: var(--cefalo-gray-light);
    margin-bottom: 8px;
    line-height: 1.3;
}

.cefalo-bloque-progreso {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cefalo-progreso-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.cefalo-progreso-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.cefalo-progreso-texto {
    font-size: 0.68rem;
    color: var(--cefalo-gray-light);
    min-width: 32px;
    text-align: right;
}

.cefalo-bloque-faltantes {
    font-size: 0.62rem;
    color: var(--cefalo-warning);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

/* ========================================================
   INDICADOR DE PUNTO GUIADO
   ======================================================== */
.cefalo-indicador-guiado {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.2), rgba(56, 161, 105, 0.2));
    border: 1px solid rgba(72, 187, 120, 0.5);
    border-left: 4px solid var(--cefalo-success);
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    animation: cefalo-guiado-pulso 2s ease-in-out infinite;
}

@keyframes cefalo-guiado-pulso {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.3);
    }
    50% { 
        box-shadow: 0 0 15px 3px rgba(72, 187, 120, 0.2);
    }
}

.cefalo-guiado-icono {
    font-size: 1.4rem;
    animation: cefalo-bounce 1s ease-in-out infinite;
}

@keyframes cefalo-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.cefalo-guiado-contenido {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cefalo-guiado-contenido strong {
    font-size: 0.72rem;
    color: var(--cefalo-gray-light);
}

.cefalo-guiado-punto {
    font-size: 1.05rem;
    font-weight: 700;
}

.cefalo-guiado-contenido small {
    font-size: 0.68rem;
    color: var(--cefalo-gray-light);
}

.cefalo-guiado-bloque {
    color: rgba(255, 255, 255, 0.5) !important;
    font-style: italic;
}

.cefalo-btn-marcar-punto {
    padding: 8px 14px;
    background: var(--cefalo-success);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cefalo-btn-marcar-punto:hover {
    background: #38a169;
    transform: scale(1.05);
}

.cefalo-guiado-completo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--cefalo-success);
    font-weight: 600;
    font-size: 0.85rem;
}

.cefalo-guiado-completo span:first-child {
    font-size: 1.2rem;
}

/* ========================================================
   INDICADOR DE ANÁLISIS PARCIAL/COMPLETO
   ======================================================== */
.cefalo-analisis-status {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 600;
}

.cefalo-analisis-status.completo {
    background: rgba(72, 187, 120, 0.2);
    color: var(--cefalo-success);
}

.cefalo-analisis-status.parcial {
    background: rgba(237, 137, 54, 0.2);
    color: var(--cefalo-warning);
}

.status-completo,
.status-parcial {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========================================================
   FILTROS DE ANÁLISIS EN RESULTADOS
   ======================================================== */
.cefalo-filtros-analisis {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.cefalo-filtros-label {
    font-size: 0.72rem;
    color: var(--cefalo-gray-light);
    margin-right: 5px;
}

.cefalo-filtro-btn {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    color: var(--cefalo-gray-light);
    font-size: 0.68rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cefalo-filtro-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--cefalo-white);
}

.cefalo-filtro-btn.active {
    background: var(--cefalo-primary);
    border-color: var(--cefalo-primary);
    color: white;
}

/* ========================================================
   GRUPO DE MEDICIONES EN TABLA
   ======================================================== */
.cefalo-medicion-grupo-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.15);
    border-left: 3px solid var(--cefalo-primary);
    border-radius: 0 6px 6px 0;
    margin: 12px 0 8px 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cefalo-white);
}

.cefalo-medicion-grupo-header:first-child {
    margin-top: 0;
}

/* ========================================================
   MEDICIÓN FALTANTE
   ======================================================== */
.cefalo-medicion-fila.faltante {
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid rgba(237, 137, 54, 0.5);
}

.cefalo-medicion-fila.faltante:hover {
    opacity: 0.8;
}

.cefalo-med-numero.faltante {
    color: var(--cefalo-gray-light) !important;
}

.cefalo-med-faltante {
    display: flex;
    align-items: center;
}

.cefalo-puntos-faltantes {
    font-size: 0.68rem;
    color: var(--cefalo-warning);
    padding: 4px 10px;
    background: rgba(237, 137, 54, 0.15);
    border-radius: 12px;
}

/* ========================================================
   TABLA VACÍA
   ======================================================== */
.cefalo-tabla-vacia {
    text-align: center;
    padding: 30px 20px;
    color: var(--cefalo-gray-light);
}

.cefalo-tabla-vacia p {
    margin: 5px 0;
    font-size: 0.82rem;
}

.cefalo-tabla-vacia p:first-child {
    color: var(--cefalo-white);
    font-weight: 500;
}

/* ========================================================
   CARDS CON ESTADO DESHABILITADO
   ======================================================== */
.cefalo-resumen-card[style*="opacity: 0.5"] {
    filter: grayscale(30%);
}

.cefalo-resumen-card[style*="opacity: 0.5"] .cefalo-card-value {
    color: var(--cefalo-gray-light) !important;
}

/* ========================================================
   HIGHLIGHT DE PUNTOS REQUERIDOS EN LISTA
   ======================================================== */
.cefalo-landmark-item.punto-requerido {
    position: relative;
    background: rgba(72, 187, 120, 0.1) !important;
    border: 1px solid rgba(72, 187, 120, 0.3) !important;
}

.cefalo-landmark-item.punto-requerido::before {
    content: '★';
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cefalo-success);
    font-size: 0.55rem;
}

.cefalo-landmark-item.punto-requerido:hover {
    background: rgba(72, 187, 120, 0.15) !important;
    border-color: rgba(72, 187, 120, 0.5) !important;
}

.cefalo-landmark-item.punto-requerido .cefalo-landmark-status {
    color: var(--cefalo-success) !important;
}

/* ========================================================
   RESPONSIVE PARA NUEVOS COMPONENTES
   ======================================================== */

/* ========================================================
   CONTROLES DE VISUALIZACIÓN - PANEL COMPLETO
   ======================================================== */
.cefalo-viz-controls {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cefalo-viz-controls .cefalo-seccion-titulo {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Selector de análisis (dropdown) */
.cefalo-viz-analisis-selector {
    margin-bottom: 12px;
}

.cefalo-viz-analisis-selector select {
    width: 100%;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--cefalo-white);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.cefalo-viz-analisis-selector select:hover {
    border-color: var(--cefalo-primary);
    background-color: rgba(0, 0, 0, 0.5);
}

.cefalo-viz-analisis-selector select:focus {
    outline: none;
    border-color: var(--cefalo-primary);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.cefalo-viz-analisis-selector select option {
    background: #1a1a2e;
    color: var(--cefalo-white);
    padding: 8px;
}

/* Filas de control */
.cefalo-viz-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
    transition: background 0.2s ease;
    border-radius: 6px;
}

.cefalo-viz-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.cefalo-viz-label {
    font-size: 0.78rem;
    color: var(--cefalo-white);
    font-weight: 500;
}

.cefalo-viz-row-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Separador */
.cefalo-viz-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 0;
}

/* ========================================================
   TOGGLE SWITCH (estilo iOS)
   ======================================================== */
.cefalo-toggle-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

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

.cefalo-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    border-radius: 24px;
}

.cefalo-toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cefalo-toggle-switch input:checked + .cefalo-toggle-slider {
    background: var(--cefalo-primary);
}

.cefalo-toggle-switch input:checked + .cefalo-toggle-slider::before {
    transform: translateX(18px);
}

.cefalo-toggle-switch input:focus + .cefalo-toggle-slider {
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

/* ========================================================
   COLOR PICKER
   ======================================================== */
.cefalo-color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cefalo-color-picker-wrapper:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.cefalo-color-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
}

.cefalo-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.cefalo-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.cefalo-color-input::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

.cefalo-color-label {
    font-size: 0.68rem;
    color: var(--cefalo-gray-light);
    font-weight: 500;
}

/* ========================================================
   OPACITY SLIDER
   ======================================================== */
.cefalo-viz-opacity-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 4px 8px 4px;
}

.cefalo-opacity-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    cursor: pointer;
}

.cefalo-opacity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--cefalo-white);
    border: 2px solid var(--cefalo-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.cefalo-opacity-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.cefalo-opacity-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--cefalo-white);
    border: 2px solid var(--cefalo-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.cefalo-opacity-val {
    font-size: 0.7rem;
    color: var(--cefalo-gray-light);
    min-width: 32px;
    text-align: right;
    font-weight: 500;
}

/* ========================================================
   BOTÓN RESTABLECER
   ======================================================== */
.cefalo-btn-restablecer {
    width: 100%;
    padding: 8px 12px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: var(--cefalo-gray-light);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.cefalo-btn-restablecer:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--cefalo-white);
    border-color: rgba(255, 255, 255, 0.2);
}

.cefalo-btn-restablecer svg {
    transition: transform 0.3s ease;
}

.cefalo-btn-restablecer:hover svg {
    transform: rotate(-180deg);
}
@media (max-width: 600px) {
    .cefalo-filtros-analisis {
        padding: 8px 10px;
    }
    
    .cefalo-filtro-btn {
        padding: 3px 8px;
        font-size: 0.62rem;
    }
    
    .cefalo-indicador-guiado {
        flex-wrap: wrap;
        padding: 10px;
        margin: 8px 0;
    }
    
    .cefalo-btn-marcar-punto {
        width: 100%;
        margin-top: 8px;
    }
    
    .cefalo-bloque-item {
        padding: 8px 10px;
    }
    
    .cefalo-bloque-nombre {
        font-size: 0.78rem;
    }
    
    .cefalo-bloques-lista {
        max-height: 180px;
    }
    
    .cefalo-btn-modo-guiado {
        padding: 10px 12px;
        font-size: 0.82rem;
        margin: 8px 10px;
        width: calc(100% - 20px);
    }
    
    .cefalo-selector-analisis {
        margin: 0 10px 8px 10px;
        padding: 10px;
    }
}

/* ========================================================
   CALIBRACIÓN
   ======================================================== */

.cefalo-calibracion-seccion {
    margin: 0 15px 10px 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 100, 0.2);
}

.cefalo-calibracion-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.cefalo-calibracion-status.no-calibrado {
    background: rgba(237, 137, 54, 0.15);
    border: 1px solid rgba(237, 137, 54, 0.3);
    color: var(--cefalo-warning);
}

.cefalo-calibracion-status.calibrado {
    background: rgba(72, 187, 120, 0.15);
    border: 1px solid rgba(72, 187, 120, 0.3);
    color: var(--cefalo-success);
}

.cefalo-calib-icon {
    font-size: 1rem;
}

.cefalo-calib-texto {
    flex: 1;
    font-weight: 500;
}

.cefalo-btn-recalibrar {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cefalo-btn-recalibrar:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cefalo-btn-calibrar {
    width: 100%;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(0, 200, 100, 0.2), rgba(0, 150, 80, 0.2));
    border: 1px solid rgba(0, 200, 100, 0.4);
    border-radius: 8px;
    color: var(--cefalo-white);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cefalo-btn-calibrar:hover {
    background: linear-gradient(135deg, rgba(0, 200, 100, 0.3), rgba(0, 150, 80, 0.3));
    transform: translateY(-1px);
}

.cefalo-btn-calibrar.calibrado {
    background: rgba(72, 187, 120, 0.2);
    border-color: var(--cefalo-success);
}

/* Panel de calibración */
.cefalo-calibracion-panel {
    margin-top: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px dashed rgba(0, 255, 100, 0.3);
}

.cefalo-calib-instrucciones {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.cefalo-calib-paso {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    font-size: 0.78rem;
    color: var(--cefalo-gray-light);
    transition: all 0.3s ease;
}

.cefalo-calib-paso.activo {
    background: rgba(0, 200, 100, 0.15);
    color: var(--cefalo-white);
    border-left: 3px solid #00c864;
}

.cefalo-calib-paso.completado {
    color: var(--cefalo-success);
}

.cefalo-calib-paso.completado .cefalo-paso-num {
    background: var(--cefalo-success);
    color: white;
}

.cefalo-paso-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.7rem;
}

.cefalo-calib-distancia {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 12px;
}

.cefalo-calib-distancia label {
    font-size: 0.78rem;
    color: var(--cefalo-gray-light);
}

.cefalo-calib-distancia input,
.cefalo-input-calibracion {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: var(--cefalo-white);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: text;
    box-sizing: border-box;
}

.cefalo-calib-distancia input:hover,
.cefalo-input-calibracion:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2);
}

.cefalo-calib-distancia input:focus,
.cefalo-input-calibracion:focus {
    outline: none;
    border-color: #00c864;
    background: rgba(0, 200, 100, 0.15);
    box-shadow: 0 0 0 3px rgba(0, 200, 100, 0.2);
}

.cefalo-calib-info {
    padding: 8px 12px;
    background: rgba(0, 200, 100, 0.1);
    border-radius: 6px;
    font-size: 0.75rem;
    color: #00c864;
    margin-bottom: 12px;
    text-align: center;
}

.cefalo-calib-acciones {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.cefalo-btn-calib-secundario {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: var(--cefalo-gray-light);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cefalo-btn-calib-secundario:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--cefalo-white);
}

.cefalo-btn-calib-primario {
    padding: 8px 18px;
    background: linear-gradient(135deg, #00c864, #00a050);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cefalo-btn-calib-primario:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 200, 100, 0.3);
}

.cefalo-btn-calib-primario:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Canvas en modo calibrar */
.cefalo-canvas.modo-calibrar {
    cursor: crosshair !important;
}

/* Notificación de éxito */
.cefalo-notificacion {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    z-index: 10001;
    animation: cefalo-notif-entrada 0.3s ease;
}

.cefalo-notif-exito {
    background: linear-gradient(135deg, #00c864, #00a050);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 200, 100, 0.4);
}

.cefalo-notif-icon {
    font-size: 1.2rem;
}

.cefalo-notificacion.fade-out {
    animation: cefalo-notif-salida 0.3s ease forwards;
}

@keyframes cefalo-notif-entrada {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cefalo-notif-salida {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Responsive calibración */
@media (max-width: 600px) {
    .cefalo-calibracion-seccion {
        margin: 0 10px 8px 10px;
        padding: 10px;
    }
    
    .cefalo-calib-acciones {
        flex-wrap: wrap;
    }
    
    .cefalo-btn-calib-primario,
    .cefalo-btn-calib-secundario {
        flex: 1;
        min-width: 80px;
    }
}

/* ========================================================
   RESPONSIVE PARA CONTROLES DE VISUALIZACIÓN
   ======================================================== */
@media (max-width: 900px) {
    .cefalo-viz-controls {
        padding: 10px;
    }
    
    .cefalo-viz-row {
        padding: 6px 2px;
    }
    
    .cefalo-viz-label {
        font-size: 0.72rem;
    }
    
    .cefalo-toggle-switch {
        width: 36px;
        height: 20px;
    }
    
    .cefalo-toggle-slider::before {
        height: 14px;
        width: 14px;
    }
    
    .cefalo-toggle-switch input:checked + .cefalo-toggle-slider::before {
        transform: translateX(16px);
    }
    
    .cefalo-color-picker-wrapper {
        padding: 2px 6px;
    }
    
    .cefalo-color-input {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 600px) {
    .cefalo-viz-row {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .cefalo-viz-row-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .cefalo-viz-controls {
        margin: 0 5px;
    }
}

/* ========================================================
   MEJORAS VISUALES GENERALES
   ======================================================== */
   
/* Efecto glassmorphism sutil para secciones */
.cefalo-seccion {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
}

/* Landmarks lista con mejor scroll */
.cefalo-landmarks-lista {
    scrollbar-width: thin;
    scrollbar-color: rgba(43, 108, 176, 0.4) transparent;
}

/* Mejor hover para items de medición */
.cefalo-medicion-fila {
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.cefalo-medicion-fila:hover {
    border-color: rgba(43, 108, 176, 0.3);
    background: rgba(43, 108, 176, 0.08);
}

/* Badge animado para IA */
.cefalo-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: cefalo-badge-glow 3s ease-in-out infinite;
}

@keyframes cefalo-badge-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(43, 108, 176, 0); }
    50% { box-shadow: 0 0 8px 2px rgba(43, 108, 176, 0.3); }
}

/* Botón recalcular con nuevo estilo */
.cefalo-btn-recalcular {
    background: linear-gradient(135deg, #2B6CB0, #2C5282);
}

.cefalo-btn-recalcular:hover {
    box-shadow: 0 4px 15px rgba(43, 108, 176, 0.4);
}

/* Resultados header mejorado */
.cefalo-resultados-header {
    background: linear-gradient(135deg, rgba(43, 108, 176, 0.2), rgba(44, 82, 130, 0.2));
}

/* Modal content con borde sutil */
.cefalo-modal-content {
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Canvas background mejorado */
.cefalo-panel-izquierdo {
    background: #080810;
}

/* ========================================================
   ACORDEÓN - Secciones colapsables
   ======================================================== */
.cefalo-seccion-titulo.cefalo-acordeon-toggle {
    cursor: pointer;
    user-select: none;
    margin: 0;
    padding: 6px 0;
    justify-content: flex-start;
}

.cefalo-seccion-titulo.cefalo-acordeon-toggle:hover {
    opacity: 0.85;
}

.cefalo-acordeon-chevron {
    margin-left: auto;
    transition: transform 0.25s ease;
    opacity: 0.5;
    flex-shrink: 0;
}

.cefalo-seccion.cefalo-colapsado .cefalo-acordeon-chevron {
    transform: rotate(-90deg);
}

.cefalo-acordeon-body {
    overflow: hidden;
    max-height: 800px;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
    opacity: 1;
}

.cefalo-seccion.cefalo-colapsado .cefalo-acordeon-body {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.cefalo-seccion.cefalo-colapsado {
    padding-bottom: 4px;
}

/* ========================================================
   CAMBIO 2: PANEL FLOTANTE DE VISUALIZACIÓN (IZQUIERDO)
   ======================================================== */
.cefalo-viz-float-panel {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.cefalo-viz-float-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--cefalo-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.cefalo-viz-float-toggle:hover,
.cefalo-viz-float-toggle.active {
    background: rgba(43, 108, 176, 0.8);
    border-color: var(--cefalo-primary);
    transform: scale(1.05);
}

.cefalo-viz-float-body {
    display: block;
    width: 240px;
    margin-top: 6px;
    background: rgba(15, 18, 30, 0.94);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: cefalo-viz-float-in 0.2s ease;
    max-height: 70vh;
    overflow-y: auto;
}

.cefalo-viz-float-body.open {
    display: block;
}

@keyframes cefalo-viz-float-in {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cefalo-viz-float-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cefalo-white);
}

.cefalo-viz-float-close {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--cefalo-gray-light);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cefalo-viz-float-close:hover {
    background: rgba(245, 101, 101, 0.3);
    color: #fca5a5;
}

/* Scrollbar for float panel */
.cefalo-viz-float-body::-webkit-scrollbar {
    width: 4px;
}

.cefalo-viz-float-body::-webkit-scrollbar-track {
    background: transparent;
}

.cefalo-viz-float-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

/* ========================================================
   CAMBIO 3: DESCRIPCIÓN DE LANDMARK EN INDICADOR
   ======================================================== */
.cefalo-marcado-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.cefalo-marcado-top-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cefalo-marcado-descripcion {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.65);
    font-style: italic;
    line-height: 1.35;
    padding-left: 28px;
    margin-top: 2px;
}

/* Descripción en modo guiado */
.cefalo-guiado-descripcion {
    font-size: 0.66rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    line-height: 1.35;
    margin-top: 2px;
}

/* ========================================================
   CAMBIO 4: BOTÓN "VER RESULTADOS"
   ======================================================== */
.cefalo-btn-ver-resultados-container {
    padding: 8px 0;
}

.cefalo-btn-ver-resultados {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--cefalo-primary), var(--cefalo-secondary));
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    animation: cefalo-btn-resultados-glow 2s ease-in-out infinite;
}

@keyframes cefalo-btn-resultados-glow {
    0%, 100% { box-shadow: 0 2px 8px rgba(43, 108, 176, 0.3); }
    50% { box-shadow: 0 4px 20px rgba(43, 108, 176, 0.5); }
}

.cefalo-btn-ver-resultados:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.cefalo-btn-resultados-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ========================================================
   CAMBIO 4: MODAL DE RESULTADOS - PANTALLA COMPLETA
   ======================================================== */
.cefalo-resultados-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cefalo-resultados-modal.visible {
    opacity: 1;
}

.cefalo-resultados-modal-content {
    background: var(--cefalo-dark);
    width: 96%;
    max-width: 1200px;
    height: 92vh;
    max-height: 92vh;
    border-radius: var(--cefalo-border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(30px) scale(0.97);
    transition: transform 0.3s ease;
}

.cefalo-resultados-modal.visible .cefalo-resultados-modal-content {
    transform: translateY(0) scale(1);
}

.cefalo-resultados-modal-header {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(43, 108, 176, 0.25), rgba(76, 81, 191, 0.25));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 12px;
}

.cefalo-resultados-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--cefalo-white);
    font-weight: 600;
}

.cefalo-resultados-modal-badge {
    background: rgba(237, 137, 54, 0.25);
    color: var(--cefalo-warning);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(237, 137, 54, 0.4);
}

.cefalo-resultados-modal-badge.completo {
    background: rgba(72, 187, 120, 0.25);
    color: var(--cefalo-success);
    border-color: rgba(72, 187, 120, 0.4);
}

.cefalo-resultados-modal-close {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--cefalo-white);
}

.cefalo-resultados-modal-close:hover {
    background: rgba(245, 101, 101, 0.3);
    transform: rotate(90deg);
}

.cefalo-resultados-modal-body {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(43, 108, 176, 0.4) transparent;
}

.cefalo-resultados-modal-body::-webkit-scrollbar {
    width: 6px;
}

.cefalo-resultados-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.cefalo-resultados-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Move salir container inside the modal to bottom */
.cefalo-resultados-modal .cefalo-salir-container {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

/* ========================================================
   RESPONSIVE PARA NUEVOS COMPONENTES
   ======================================================== */
@media (max-width: 900px) {
    .cefalo-viz-float-body {
        width: 200px;
    }
    
    .cefalo-resultados-modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .cefalo-resultados-modal-header {
        padding: 12px 16px;
    }
}

@media (max-width: 600px) {
    .cefalo-viz-float-panel {
        top: 4px;
        left: 4px;
    }
    
    .cefalo-viz-float-toggle {
        width: 32px;
        height: 32px;
    }
    
    .cefalo-viz-float-body {
        width: 180px;
        padding: 10px;
    }
    
    .cefalo-resultados-modal-header h3 {
        font-size: 0.9rem;
    }
    
    .cefalo-marcado-descripcion {
        padding-left: 0;
        font-size: 0.65rem;
    }
}