
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* Tema claro (por defecto) */
        :root {
            --bg-primary: #ffffff;
            --bg-secondary: #f8f8f8;
            --bg-tertiary: #fafafa;
            --text-primary: #000000;
            --text-secondary: #666666;
            --text-content: #000000;
            --border-color: #e5e5e5;
            --border-hover: #cccccc;
            --accent-color: #000000;
            --icon-color: #666666;
            --overlay: rgba(0, 0, 0, 0.3);
            --input-bg: #f8f8f8;
            --card-bg: #ffffff;
            --card-border: #e5e5e5;
            --progress-bg: #f0f0f0;
            --progress-fill: #000000;
            --success-color: #22c55e;
        }

        /* Tema oscuro */
        [data-theme="dark"] {
            --bg-primary: #000000;
            --bg-secondary: #111111;
            --bg-tertiary: #1a1a1a;
            --text-primary: #ffffff;
            --text-secondary: #999999;
            --text-content: #ffffff;
            --border-color: #2a2a2a;
            --border-hover: #3a3a3a;
            --accent-color: #ffffff;
            --icon-color: #999999;
            --overlay: rgba(0, 0, 0, 0.7);
            --input-bg: #111111;
            --card-bg: #0a0a0a;
            --card-border: #2a2a2a;
            --progress-bg: #1a1a1a;
            --progress-fill: #ffffff;
            --success-color: #22c55e;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
            background: var(--bg-primary);
            height: 100vh;
            display: flex;
            color: var(--text-content);
            overflow: hidden;
            transition: all 0.3s ease;
            position: relative;
        }
        
        /* Fondo con patrón 3D solo para tema light */
        body::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image: url('https://romo.roco.es/romo/images/fondo-asistente.jpg');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: -1;
        }
        
        body:not([data-theme="dark"])::before {
            opacity: 1;
        }

        /* Layout principal */
        .app-layout {
            width: 100%;
            display: flex;
            height: 100vh;
        }

        /* Sidebar izquierdo */
        .sidebar-left {
            width: 260px;
            background: var(--bg-secondary);
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            transition: all 0.3s ease;
            margin-left: -260px; /* Oculto por defecto */
        }
        
        .sidebar-left.active {
            margin-left: 0; /* Visible cuando está activo */
        }

        .sidebar-header {
            padding: 20px;
            border-bottom: 1px solid var(--border-color);
        }

        .new-chat-btn {
            width: 100%;
            padding: 12px;
            background: var(--accent-color);
            border: none;
            color: var(--bg-primary);
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            font-weight: 500;
        }

        .new-chat-btn:hover {
            opacity: 0.9;
        }

        /* Main content */
        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: var(--bg-primary);
        }

        /* Header */
        .header {
            height: 60px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 24px;
            background: var(--bg-secondary);
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .menu-toggle {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            cursor: pointer;
            background: transparent;
            border: none;
            color: var(--icon-color);
        }

        .menu-toggle:hover {
            background: var(--bg-primary);
        }

        .model-info {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 16px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 14px;
            font-weight: 500;
        }

        .model-badge {
            background: var(--accent-color);
            color: var(--bg-primary);
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: 600;
            text-transform: uppercase;
        }

        .header-actions {
            display: flex;
            gap: 12px;
        }

        .header-btn {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            cursor: pointer;
            background: transparent;
            border: 1px solid transparent;
            color: var(--icon-color);
        }

        .header-btn:hover {
            background: var(--bg-primary);
            border-color: var(--border-color);
        }

        /* Chat area */
        .chat-area {
            flex: 1;
            overflow-y: auto;
            padding: 0px 20px 120px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        /* Fondo SOLO para tema light */
        :root:not([data-theme="dark"]) .chat-area {
            background: url('https://romo.roco.es/romo/images/fondo-asistente.jpg') top center no-repeat;
        }

        /* Asegurar que dark NO tenga fondo */
        [data-theme="dark"] .chat-area {
            background: transparent !important;
        }

        .chat-content {
            width: 100%;
            max-width: 680px;
        }

        /* Welcome screen */
        .welcome-screen {
            text-align: center;
            padding: 60px 20px;
            background: transparent;
        }
        
        /* Asegurar que dark NO tenga fondo */
        [data-theme="dark"] .welcome-screen {
            background: transparent !important;
            box-shadow: none !important;
            backdrop-filter: none !important;
        }

        .welcome-logo {
            margin-bottom: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .welcome-title {
            font-size: 32px;
            font-weight: 300;
            margin-bottom: 12px;
            color: var(--text-primary);
        }

        .welcome-subtitle {
            font-size: 16px;
            color: var(--text-secondary);
            margin-bottom: 48px;
            line-height: 1.5;
        }

        .suggestions-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            max-width: 700px;
            margin: 0 auto;
        }

        /* Estilo base para todas las cards */
        .suggestion-card {
            padding: 0;
            border-radius: 16px;
            cursor: pointer;
            overflow: hidden;
            position: relative;
            height: 180px;
            transition: all 0.3s ease;
        }
        
        /* TEMA DARK - Sin imágenes */
        [data-theme="dark"] .suggestion-card {
            background-color: #0a0a0a;
            background-image: none;
            border: 1px solid #2a2a2a;
        }
        
        [data-theme="dark"] .suggestion-card:hover {
            border-color: #ffffff;
            transform: translateY(-2px);
        }
        
        /* TEMA LIGHT - Con imágenes */
        :root:not([data-theme="dark"]) .suggestion-card {
            border: 3px solid white;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 
                        0 5px 15px rgba(0, 0, 0, 0.1);
        }
        
        :root:not([data-theme="dark"]) .suggestion-card:hover {
            transform: translateY(-6px);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2), 
                        0 8px 20px rgba(0, 0, 0, 0.12);
        }
        
        /* Imágenes SOLO para light */
        :root:not([data-theme="dark"]) .suggestion-card:nth-child(1) {
            background: url('https://romo.roco.es/romo/images/planificador.jpg') center/cover;
        }
        
        :root:not([data-theme="dark"]) .suggestion-card:nth-child(2) {
            background: url('https://romo.roco.es/romo/images/soporteatencion.jpg') center/cover;
        }
        
        :root:not([data-theme="dark"]) .suggestion-card:nth-child(3) {
            background: url('https://romo.roco.es/romo/images/agendar.jpg') center/cover;
        }
        
        :root:not([data-theme="dark"]) .suggestion-card:nth-child(4) {
            background: url('https://romo.roco.es/romo/images/conoceroco.jpg') center/cover;
        }
        
        /* Overlay SOLO para light */
        :root:not([data-theme="dark"]) .suggestion-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%);
            z-index: 0;
        }
        
        /* Contenido de la card */
        .suggestion-card-content {
            position: relative;
            z-index: 1;
            padding: 20px;
            height: 100%;
            display: flex;
            flex-direction: column;
        }
        
        /* Dark: contenido centrado */
        [data-theme="dark"] .suggestion-card-content {
            justify-content: center;
            align-items: center;
            text-align: center;
        }
        
        /* Light: contenido abajo */
        :root:not([data-theme="dark"]) .suggestion-card-content {
            justify-content: flex-end;
            color: white;
        }

        .suggestion-icon {
            width: 54px;
            height: 54px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            border-radius: 50%;
            margin-bottom: 12px;
        }
		
		.glyph-icon{
			font-size: 32px;
			text-align: center !important;
		}
        
        /* Icono tema dark */
        [data-theme="dark"] .suggestion-icon {
            background: #1a1a1a;
            color: #ffffff;
            border: 1px solid #2a2a2a;
            margin: 0 auto 12px;
        }
        
        /* Icono tema light */
        :root:not([data-theme="dark"]) .suggestion-icon {
            background: rgba(255, 255, 255, 0.95);
            color: black;
            border: 2px solid white;
            position: relative;
            left: 50%;
            transform: translateX(-50%);
        }

        .suggestion-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 4px;
        }
        
        [data-theme="dark"] .suggestion-title {
            color: #ffffff;
        }
        
        :root:not([data-theme="dark"]) .suggestion-title {
            color: white;
        }

        .suggestion-desc {
            font-size: 13px;
        }
        
        [data-theme="dark"] .suggestion-desc {
            color: #999999;
        }
        
        :root:not([data-theme="dark"]) .suggestion-desc {
            color: rgba(255, 255, 255, 0.9);
        }

        /* Messages */
        .message {
            display: flex;
            gap: 16px;
            padding: 20px 0;
        }

        .message-avatar {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .user .message-avatar {
            background: var(--accent-color);
            color: var(--bg-primary);
        }

        .assistant .message-avatar {
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            color: var(--text-content);
            overflow: hidden;
        }

        .message-avatar .avatar-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 8px;
        }

        .message-content {
            flex: 1;
            font-size: 15px;
            line-height: 1.6;
            color: var(--text-content);
            background: rgba(230, 225, 212, 0.5);
            padding: 15px;
            border-radius: 12px;
        }

        /* Globo usuario: gris claro para diferenciar del asistente (beige) */
        .user .message-content {
            background: rgba(200, 200, 200, 0.45);
        }

        /* FIX: Fondo de mensajes en dark mode */
        [data-theme="dark"] .message-content {
            background: var(--bg-tertiary);
            color: #ffffff;
        }

        [data-theme="dark"] .user .message-content {
            background: #252525;
        }
        
        /* FIX: Títulos en botones de selección en dark mode */
        [data-theme="dark"] .message-content button {
            color: #ffffff !important;
        }
        
        [data-theme="dark"] .message-content button strong {
            color: #ffffff !important;
        }
        
        [data-theme="dark"] .message-content button i {
            color: #ffffff !important;
        }

        /* M2 Refactor: Boton edicion en mensajes usuario */
        .msg-edit-btn {
            border-radius: 8px;
            border: none;
            background: #1a1a1a;
            color: #ffffff;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
            align-self: center;
            opacity: 0.7;
            transition: opacity 0.2s ease, background 0.2s ease, transform 0.15s ease;
            font-size: 12px;
            font-family: inherit;
            padding: 6px 12px;
            margin-left: 4px;
            white-space: nowrap;
        }

        .msg-edit-btn i {
            font-size: 13px;
        }

        .msg-edit-btn:hover {
            opacity: 1;
            background: #000000;
            transform: scale(1.03);
        }

        [data-theme="dark"] .msg-edit-btn {
            background: #333;
            color: #fff;
        }

        [data-theme="dark"] .msg-edit-btn:hover {
            background: #444;
        }

        /* Sidebar derecho - Progress */
        .sidebar-right {
            width: 320px;
            background: var(--bg-secondary);
            border-left: 1px solid var(--border-color);
            padding: 24px;
            overflow-y: auto;
            position: relative;
            transition: all 0.3s ease;
            margin-right: 0;
        }
        
.sidebar-right.collapsed {
    margin-right: -320px !important;
    pointer-events: none;
}
		/* DESKTOP: Panel visible por defecto */
@media (min-width: 769px) {
    .sidebar-right:not(.collapsed) {
        margin-right: 0 !important;
        pointer-events: all !important;
    }
    
    /* Asegurar que input-area esté correcto */
    .main-content .input-area {
        right: 320px !important;
    }
    
    .sidebar-right.collapsed ~ .main-content .input-area {
        right: 0 !important;
    }
}
        
        /* Botón toggle para el panel derecho */
        .toggle-right-panel {
            position: absolute;
            left: -40px;
            top: 50%;
            transform: translateY(-50%);
            width: 32px;
            height: 60px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-right: none;
            border-radius: 8px 0 0 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            z-index: 10;
            pointer-events: all;
        }
        
        .toggle-right-panel:hover {
            background: var(--bg-tertiary);
            width: 36px;
        }
        
        .toggle-right-panel i {
            color: var(--icon-color);
            transition: transform 0.3s ease;
            font-size: 14px;
        }
        
        .sidebar-right.collapsed .toggle-right-panel i {
            transform: rotate(180deg);
        }

        .progress-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 20px;
        }

        .progress-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .progress-bar-container {
            margin-bottom: 32px;
        }

        .progress-info {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
            font-size: 14px;
            color: var(--text-secondary);
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: var(--progress-bg);
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: var(--progress-fill);
            border-radius: 4px;
            width: 0%;
            transition: width 0.3s ease;
        }

        .section-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .empty-state {
            padding: 40px 20px;
            text-align: center;
            color: var(--text-secondary);
            font-size: 14px;
        }

        .empty-state i {
            font-size: 32px;
            margin-bottom: 12px;
            opacity: 0.5;
        }

        /* Input area */
        .input-area {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 320px;
            background: var(--bg-primary);
            padding: 24px;
            transition: all 0.3s ease;
        }
        
        .sidebar-left.active ~ .main-content .input-area {
            left: 260px;
        }
        
        .sidebar-right.collapsed ~ .main-content .input-area {
            right: 0;
        }

        .input-container {
            max-width: 680px;
            margin: 0 auto;
            background: var(--input-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .input-container:focus-within {
            border-color: var(--accent-color);
        }

        .attach-btn {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
            border: none;
            color: var(--icon-color);
            cursor: pointer;
            border-radius: 6px;
        }

        .attach-btn:hover {
            background: var(--bg-primary);
        }

        .input-field {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text-content);
            font-size: 15px;
            outline: none;
            resize: none;
            min-height: 24px;
            max-height: 200px;
            font-family: inherit;
        }

        .input-field::placeholder {
            color: var(--text-secondary);
        }

        .send-btn {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--accent-color);
            border: none;
            color: var(--bg-primary);
            cursor: pointer;
            border-radius: 6px;
        }

        .send-btn:hover {
            transform: scale(1.05);
        }

        .send-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        /* FIX: Pack Restaurante Completo sin fondo en dark */
        [data-theme="dark"] .pack-header {
            background: transparent !important;
            border: 1px solid var(--border-color);
        }
        
        /* FIX: Todos los títulos visibles en dark */
        [data-theme="dark"] h1,
        [data-theme="dark"] h2, 
        [data-theme="dark"] h3,
        [data-theme="dark"] h4 {
            color: #ffffff !important;
        }
		
/* Typing indicator */
.message.typing .message-content {
    display: flex;
    align-items: center;
    padding: 20px;
}

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

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

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

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

@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   PANEL DERECHO - SEPARACIÓN MÓVIL/DESKTOP
   ============================================ */

/* Fondo oscuro para móvil */
.panel-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.panel-overlay.show {
    display: block;
}

/* Botón cerrar móvil */
.mobile-close-btn {
    display: none;
}

@media (max-width: 768px) {
    /* MÓVIL: Panel oculto por defecto */
    .sidebar-right {
        position: fixed !important;
        top: 0;
        right: -320px !important; /* Oculto fuera de pantalla */
        bottom: 0;
        width: 280px !important;
        margin-right: 0 !important;
        z-index: 999;
        transition: right 0.3s ease;
    }
    
    /* MÓVIL: Panel visible cuando activo */
    .sidebar-right.mobile-show {
        right: 0 !important; /* Desliza a la vista */
    }
    
    /* Ocultar controles de desktop */
    .sidebar-right .toggle-right-panel {
        display: none !important;
    }
    
    /* Mostrar botón cerrar */
    .mobile-close-btn {
        display: flex !important;
    }
    
    /* Input siempre full width */
    .input-area {
        right: 0 !important;
        left: 0 !important;
    }
}

@media (min-width: 769px) {
    /* DESKTOP: Mantener comportamiento original */
    .sidebar-right.collapsed {
        margin-right: -320px;
    }
}
/* OCULTAR DESCRIPCIÓN EN CARDS MÓVIL */
@media (max-width: 768px) {
    /* Ocultar descripción */
    .suggestion-desc {
        display: none !important;
    }
    
    /* Ajustar cards para verse mejor sin descripción */
    .suggestion-card {
        height: 120px !important;
    }
    
    .suggestion-card-content {
        justify-content: center !important;
        padding: 15px !important;
    }
    
    /* Título más prominente */
    .suggestion-title {
        font-size: 14px !important;
        font-weight: 600 !important;
    }
	
	    .chat-area {
        margin-top: 0px !important;
		    padding: 0px 10px 20px;
    }
    
    .welcome-screen {
        margin-top: 0px !important;
		padding: 10px 10px;
		padding-top: 0px;
    }
	
	.input-area {
    bottom: 30px;
}
    
 
}
/* FORZAR VISIBILIDAD DEL INPUT EN MÓVIL */
@media (max-width: 768px) {
	
	.header {
    position: fixed;
	width:100%;
}
    /* Input area siempre visible */
    .input-area {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 10px !important;
        background: var(--bg-primary) !important;
        border-top: 1px solid var(--border-color) !important;
        z-index: 900 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Ajustar el padding del chat para dejar espacio al input */
    .chat-area {
        padding-bottom: 80px !important;
		padding-top: 90px;
    }
    
    /* Asegurar que el input container sea visible */
    .input-container {
        display: flex !important;
        background: var(--input-bg) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 12px !important;
        padding: 10px 12px !important;
    }
    
    /* Asegurar elementos internos visibles */
    .input-field {
        display: block !important;
        font-size: 16px !important;
    }
    
    .attach-btn,
    .send-btn {
        display: flex !important;
    }
}

		
		/* BADGE CONTADOR EN HAMBURGUESA */
.location-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
    border: 2px solid var(--bg-secondary);
}

.location-badge.active {
    display: flex;
}

/* Hacer el botón hamburguesa relativo para el badge */
.header-btn[onclick*="toggleRightPanel"] {
    position: relative !important;
}
		
		
/* BADGE CONTADOR EN HAMBURGUESA - POSICIÓN CORREGIDA */
.location-badge {
    position: absolute;
	top: -6px;
    right: -12px;
    background: #dc3545;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    z-index: 100;
    border: 1.5px solid var(--bg-secondary);
    pointer-events: none; /* Para que no interfiera con el click */
}

.location-badge.active {
    display: flex;
}

/* Asegurar posición relativa del botón */
.header-btn[onclick*="toggleRightPanel"] {
    position: relative !important;
    overflow: visible !important;
}

/* Ajuste específico para móvil */
@media (max-width: 768px) {
    .location-badge {
		top: -6px;
        right: -12px;
        width: 24px;
        height: 24px;
        font-size: 10px;
        border-width: 1px;
    }
    
    /* Si el botón es más pequeño en móvil */
    .header-btn {
        position: relative !important;
    }
}

/* Animación de pulso */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}