/* ==========================================================================
   ESTILOS VISUALES: CYBER-NATURALEZA CON MODO OSCURO ALTERNABLE
   Modo Claro: Menta/Agua (#E8F8F0 / #D0F5E3) + Verde Cyber (#2EFF3B)
   Modo Oscuro (.dark-mode): Noche Forestal (#0B1410 / #060907) + Glow Cyber (#2EFF3B)
   ========================================================================== */

:root {
    /* Paleta Principal: Cyber-Naturaleza de Alta Intensidad */
    --cyber-green: #2EFF3B;        /* Verde Cyber/Eléctrico muy vibrante (#2EFF3B) */
    --cyber-hover: #1EEA2B;        /* Verde Cyber para interacciones y hover */
    --cyber-soft: rgba(46, 255, 59, 0.16); /* Tinte cyber para selecciones activas */
    --cyber-deep: #065F46;         /* Verde bosque profundo para texto destacado sobre fondo claro */
    
    /* Fondos Modo Claro (Default): Pastel Menta / Agua */
    --bg-mint: #E8F8F0;            /* Color pastel muy claro y suave con tinte verde-menta/agua */
    --bg-glow-mint: #D0F5E3;       /* Tono menta difuminado para degradados y auras ambientales */
    --surface-white: #FFFFFF;      /* Blanco puro para tarjetas y paneles */
    --surface-panel: rgba(255, 255, 255, 0.88);
    --surface-subtle: rgba(240, 252, 244, 0.9);
    
    /* Tipografía y Máxima Legibilidad */
    --text-primary: #0F172A;       /* Texto principal en tono oscuro para máxima nitidez */
    --text-secondary: #475569;     /* Texto secundario y metadatos */
    --text-muted: #64748B;         /* Placeholders y textos secundarios suaves */
    
    /* Bordes y Sombras Cyber-Luminosas */
    --border-subtle: rgba(46, 255, 59, 0.22); /* Borde suave con tinte cyber */
    --border-card: rgba(226, 232, 240, 0.9);   /* Borde para tarjetas */
    --shadow-card: 0 4px 24px -2px rgba(15, 23, 42, 0.05), 0 0 18px rgba(46, 255, 59, 0.08);
    --shadow-soft: 0 2px 10px rgba(15, 23, 42, 0.04);
    --shadow-cyber: 0 0 20px rgba(46, 255, 59, 0.5);
}

/* ==========================================================================
   VARIABLES DE MODO OSCURO (.dark-mode): CYBER-NATURAL NIGHT MODE
   ========================================================================== */

body.dark-mode {
    --bg-mint: #0B1410;            /* Noche forestal súper oscura */
    --bg-glow-mint: #060907;       /* Negro bosque profundo */
    --surface-white: #0F1A15;      /* Tarjeta verde noche oscura */
    --surface-panel: rgba(11, 20, 16, 0.90);
    --surface-subtle: rgba(18, 32, 26, 0.85);
    
    /* Tipografía para fondo oscuro */
    --text-primary: #F1F5F9;       /* Texto claro y nítido */
    --text-secondary: #94A3B8;     /* Metadatos */
    --text-muted: #64748B;
    
    /* Bordes y Sombras con Glow Neón Verde */
    --border-subtle: rgba(46, 255, 59, 0.28);
    --border-card: rgba(46, 255, 59, 0.20);
    --shadow-card: 0 4px 28px rgba(0, 0, 0, 0.6), 0 0 20px rgba(46, 255, 59, 0.15);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-cyber: 0 0 25px rgba(46, 255, 59, 0.7);
    
    /* En modo oscuro, los destacados brillan en Verde Cyber */
    --cyber-deep: #2EFF3B;
}

/* Transiciones Suaves entre Temas */
body, 
.app-layout, 
.sidebar, 
.sidebar-footer,
.chat-area, 
.chat-header, 
.chat-footer, 
.input-panel, 
.bubble, 
.contact-item, 
.welcome-msg,
.theme-toggle,
select, 
input, 
textarea {
    transition: background 0.35s ease, background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* ==========================================================================
   BASE & LAYOUT CON DEGRADADO Y GLOW AMBIENTAL PROYECTADO
   ========================================================================== */

body {
    font-family: 'Outfit', sans-serif;
    background: 
        radial-gradient(circle at 10% 12%, rgba(46, 255, 59, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 90% 15%, rgba(208, 245, 227, 0.85) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(46, 255, 59, 0.09) 0%, transparent 55%),
        radial-gradient(circle at 88% 88%, rgba(46, 255, 59, 0.16) 0%, transparent 50%),
        radial-gradient(circle at 12% 85%, rgba(208, 245, 227, 0.8) 0%, transparent 45%),
        linear-gradient(135deg, var(--bg-mint) 0%, var(--bg-glow-mint) 50%, var(--bg-mint) 100%);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    margin: 0;
}

body.dark-mode {
    background: 
        radial-gradient(circle at 10% 12%, rgba(46, 255, 59, 0.22) 0%, transparent 40%),
        radial-gradient(circle at 90% 15%, rgba(11, 35, 24, 0.9) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(46, 255, 59, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 88% 88%, rgba(46, 255, 59, 0.20) 0%, transparent 45%),
        radial-gradient(circle at 12% 85%, rgba(11, 35, 24, 0.85) 0%, transparent 40%),
        linear-gradient(135deg, #0B1410 0%, #060907 50%, #0B1410 100%);
}

.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    background: 
        radial-gradient(circle at 10% 12%, rgba(46, 255, 59, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 90% 15%, rgba(208, 245, 227, 0.85) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(46, 255, 59, 0.09) 0%, transparent 55%),
        radial-gradient(circle at 88% 88%, rgba(46, 255, 59, 0.16) 0%, transparent 50%),
        radial-gradient(circle at 12% 85%, rgba(208, 245, 227, 0.8) 0%, transparent 45%),
        linear-gradient(135deg, var(--bg-mint) 0%, var(--bg-glow-mint) 50%, var(--bg-mint) 100%);
}

body.dark-mode .app-layout {
    background: 
        radial-gradient(circle at 10% 12%, rgba(46, 255, 59, 0.22) 0%, transparent 40%),
        radial-gradient(circle at 90% 15%, rgba(11, 35, 24, 0.9) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(46, 255, 59, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 88% 88%, rgba(46, 255, 59, 0.20) 0%, transparent 45%),
        radial-gradient(circle at 12% 85%, rgba(11, 35, 24, 0.85) 0%, transparent 40%),
        linear-gradient(135deg, #0B1410 0%, #060907 50%, #0B1410 100%);
}

/* Paneles de vidrio translúcido */
.glass-panel {
    background: var(--surface-panel);
    backdrop-filter: blur(25px);
}

/* ==========================================================================
   MENÚ LATERAL (SIDEBAR): Estilo Limpio, Fondo Translúcido y Bordes Suaves
   ========================================================================== */

.sidebar {
    width: 320px;
    height: 100vh;
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 4px 0 30px rgba(15, 23, 42, 0.04);
    background: var(--surface-panel);
    backdrop-filter: blur(30px);
    flex-shrink: 0;
}

body.dark-mode .sidebar {
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.6);
}

.sidebar-header {
    padding: 2.2rem 1.8rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

/* Logo GABRIVO con Proyección de Luz Verde Cyber */
.logo-container {
    display: flex;
    align-items: center;
    gap: 2px;
    cursor: default;
    animation: breathingGlow 3s ease-in-out infinite;
}

.logo-text {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--text-primary);
    text-shadow: 0 0 16px rgba(46, 255, 59, 0.45);
}

.logo-globe {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyber-green);
    filter: drop-shadow(0 0 10px rgba(46, 255, 59, 0.85));
    margin: 0 4px;
}

.globe-nodes .node {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--text-primary);
    border-radius: 50%;
    box-shadow: 0 0 7px var(--cyber-green);
}

.node.n1 {
    top: 5px;
    left: 12px;
}

.node.n2 {
    bottom: 8px;
    right: 4px;
}

.node.n3 {
    top: 12px;
    left: 4px;
}

@keyframes breathingGlow {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 6px rgba(46, 255, 59, 0.35));
    }
    50% {
        filter: brightness(1.22) drop-shadow(0 0 20px rgba(46, 255, 59, 0.75));
    }
}

/* Barra de Búsqueda */
.search-container {
    margin: 1.2rem 0 0;
    padding: 0;
}

.search-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.25s ease;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    background: var(--surface-white);
    border-color: var(--cyber-green);
    box-shadow: 0 0 0 3px rgba(46, 255, 59, 0.25), 0 0 15px rgba(46, 255, 59, 0.2);
}

/* Lista de Contactos */
.contact-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    cursor: pointer;
    margin-bottom: 0.5rem;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.contact-item:hover {
    background: var(--surface-subtle);
    border-color: var(--border-subtle);
}

/* Selección Activa en Verde Cyber (#2EFF3B) */
.contact-item.active {
    background: var(--cyber-soft);
    border: 1px solid var(--cyber-green);
    box-shadow: 0 2px 15px rgba(46, 255, 59, 0.22);
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2EFF3B 0%, #00C9A7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #0F172A;
    box-shadow: 0 2px 12px rgba(46, 255, 59, 0.4);
    flex-shrink: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.contact-status {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.contact-item.active .contact-status {
    color: var(--cyber-deep);
    font-weight: 600;
}

/* Navegación Inferior */
.bottom-nav {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    padding: 1rem 0.5rem;
    border-top: 1px solid var(--border-subtle);
    background: var(--surface-panel);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.25s ease;
    flex: 1;
    font-weight: 500;
}

.nav-item:hover {
    color: var(--text-primary);
}

.nav-item.active {
    color: var(--cyber-deep);
    font-weight: 700;
}

.nav-item.active .nav-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 2px 8px rgba(46, 255, 59, 0.7));
}

.nav-icon {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

/* Pie de Barra Lateral */
.sidebar-footer {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    background: var(--surface-subtle);
}

.config-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.config-summary label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

.user-name {
    color: var(--text-primary) !important;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ==========================================================================
   ÁREA PRINCIPAL DE CHAT: Glow Ambiental Cyber-Naturaleza con Profundidad
   ========================================================================== */

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: 
        radial-gradient(circle at 18% 18%, rgba(46, 255, 59, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 82% 20%, rgba(208, 245, 227, 0.85) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(46, 255, 59, 0.08) 0%, transparent 55%),
        radial-gradient(circle at 85% 85%, rgba(46, 255, 59, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 15% 85%, rgba(208, 245, 227, 0.75) 0%, transparent 45%),
        linear-gradient(135deg, var(--bg-mint) 0%, var(--bg-glow-mint) 50%, var(--bg-mint) 100%);
    position: relative;
    overflow: hidden;
}

/* Marca de Agua Central del Chat: Logo del Globo (recortado) + identidad GABRIVO */
.chat-area::before {
    content: '';
    position: absolute;
    top: 46%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(620px, 85vw);
    /* Solo la franja del globo: oculta el texto antiguo incrustado en la imagen */
    height: calc(min(620px, 85vw) * 0.56);
    background: url('../assets/voki-logo.png') no-repeat center 36% / 100% auto;
    mix-blend-mode: multiply;
    filter: invert(1) hue-rotate(95deg) saturate(3) contrast(1.7) brightness(0.82);
    opacity: 0.35;
    pointer-events: none;
    z-index: 1;
    transition: filter 0.35s ease, opacity 0.35s ease;
}

body.dark-mode .chat-area::before {
    mix-blend-mode: screen;
    filter: hue-rotate(65deg) saturate(3) brightness(1.25) drop-shadow(0 0 16px rgba(46, 255, 59, 0.5));
    opacity: 0.28;
}

.chat-header {
    padding: 1.1rem 2rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--surface-panel);
    backdrop-filter: blur(25px);
    display: flex;
    align-items: center;
    z-index: 50;
    box-shadow: 0 1px 12px rgba(15, 23, 42, 0.03);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.active-contact {
    display: flex;
    flex-direction: column;
}

.active-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.active-desc {
    font-size: 0.8rem;
    color: var(--cyber-deep);
    font-weight: 600;
    margin-top: 2px;
}

.header-actions {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.camera-wrapper {
    position: relative;
    padding: 4px;
}

.pro-camera-svg {
    stroke: var(--text-primary) !important;
    filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.1));
}

.activity-dot {
    width: 10px;
    height: 10px;
    background: var(--cyber-green);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    right: 2px;
    box-shadow: 0 0 12px var(--cyber-green);
    animation: pulseCyber 1.5s infinite;
}

@keyframes pulseCyber {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.video-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--cyber-deep);
}

/* BOTÓN INTERRUPTOR DE MODO OSCURO (☀️ / 🌙) */
.theme-toggle {
    background: var(--surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    transition: all 0.25s ease;
    color: var(--text-primary);
    box-shadow: var(--shadow-soft);
    padding: 0;
    outline: none;
}

.theme-toggle:hover {
    border-color: var(--cyber-green);
    box-shadow: 0 0 15px rgba(46, 255, 59, 0.45);
    transform: scale(1.1);
}

.header-icon-btn {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    padding: 4px 8px;
    transition: all 0.2s ease;
}

.header-icon-btn:hover {
    background: var(--surface-subtle);
    color: var(--text-primary);
}

/* Ventana de Chat */
.chat-window {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
    position: relative;
    z-index: 2;
    background: transparent !important;
}

.chat-history {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 2rem;
}

.welcome-msg {
    text-align: center;
    padding: 1.2rem 1.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    background: var(--surface-panel);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    margin-bottom: 1rem;
}

/* ==========================================================================
   BURBUJAS DE MENSAJES Y RESPUESTAS
   Verde Cyber Vibrante (#2EFF3B) + Tarjetas con Aura Suave
   ========================================================================== */

.message-sent,
.message-received {
    max-width: 82%;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 0.5rem;
}

.message-sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-received {
    align-self: flex-start;
}

.message-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Avatar de mis mensajes en Verde Cyber */
.message-sent .message-avatar {
    background: var(--cyber-green);
    color: #0F172A;
    border: 1px solid rgba(30, 234, 43, 0.6);
    box-shadow: 0 2px 12px rgba(46, 255, 59, 0.45);
}

/* Avatar de respuestas recibidas */
.message-received .message-avatar {
    background: var(--surface-white);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.bubble {
    padding: 1rem 1.4rem;
    border-radius: 20px;
    font-size: 1rem;
    line-height: 1.5;
    position: relative;
}

/* BURBUJAS DE MIS MENSAJES: Verde Cyber Muy Vibrante (#2EFF3B) con texto oscuro (#0F172A) */
.message-sent .bubble {
    background: var(--cyber-green);
    color: #0F172A;
    font-weight: 500;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 20px rgba(46, 255, 59, 0.4), 0 0 15px rgba(46, 255, 59, 0.25);
    border: 1px solid rgba(30, 234, 43, 0.5);
}

body.dark-mode .message-sent .bubble {
    box-shadow: 0 4px 24px rgba(46, 255, 59, 0.5), 0 0 18px rgba(46, 255, 59, 0.35);
}

/* RESPUESTAS TRADUCIDAS: Tarjetas con bordes sutiles y suave aura luminosa */
.message-received .bubble {
    background: var(--surface-white);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-card);
}

/* Metadatos y Confirmación de Lectura */
.msg-meta {
    font-size: 0.7rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
}

.message-sent .msg-meta {
    color: rgba(15, 23, 42, 0.75);
}

body.dark-mode .message-sent .msg-meta {
    color: rgba(15, 23, 42, 0.85);
}

.message-received .msg-meta {
    color: var(--text-secondary);
}

.read-check {
    color: #065F46;
    font-weight: 700;
}

body.dark-mode .read-check {
    color: #047857;
}

.message-received .read-check {
    color: var(--cyber-deep);
}

/* ==========================================================================
   KARAOKE Y VISUALIZADOR DE AUDIO
   ========================================================================== */

.karaoke-container {
    margin-bottom: 0.8rem;
    line-height: 1.55;
    color: var(--text-primary);
}

/* Karaoke Sweep: Destello Verde Cyber sobre texto oscuro */
.karaoke-sweep {
    background: linear-gradient(to right, #1EC92B 50%, var(--text-primary) 50%);
    background-size: 200% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline;
}

body.dark-mode .karaoke-sweep {
    background: linear-gradient(to right, #2EFF3B 50%, var(--text-primary) 50%);
    background-size: 200% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
}

.sweep-active {
    animation: sweep-progressive var(--sweep-duration) linear forwards;
}

@keyframes sweep-progressive {
    from { background-position: 100% 0; }
    to { background-position: 0 0; }
}

.karaoke-word {
    transition: all 0.3s ease;
    display: inline-block;
}

.karaoke-active {
    color: #1EC92B;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(46, 255, 59, 0.55);
    transform: translateY(-2px);
}

/* Visualizador de Ondas */
.visualizer {
    display: flex;
    gap: 2.5px;
    height: 25px;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    margin: 10px 0;
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--surface-subtle);
    border: 1px solid var(--border-subtle);
}

.visualizer.active {
    opacity: 1;
}

.vis-bar {
    width: 3px;
    background: var(--cyber-green);
    height: 4px;
    border-radius: 2px;
}

.visualizer.active .vis-bar {
    animation: wavePulse 1s infinite;
}

@keyframes wavePulse {
    0%, 100% {
        height: 4px;
    }
    50% {
        height: 20px;
    }
}

/* Icono de Altavoz Vibrante */
.speaker-container {
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
}

.speaker-container.vibrating {
    animation: speakerVibe 0.4s ease infinite alternate;
}

@keyframes speakerVibe {
    0% { transform: scale(1); }
    100% { transform: scale(1.25); filter: drop-shadow(0 0 7px var(--cyber-green)); }
}

/* Botón de Traducción y Contenedor de Texto Traducido */
.bubble-actions {
    margin-top: 8px;
    display: flex;
}

.btn-toggle-translation {
    font-size: 0.72rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    color: var(--cyber-deep);
    cursor: pointer;
    background: var(--surface-subtle);
    border: 1px solid var(--border-subtle);
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-toggle-translation:hover {
    background: rgba(46, 255, 59, 0.2);
    border-color: var(--cyber-green);
    color: #FFFFFF;
}

.translation-text {
    font-size: 0.92rem;
    font-style: normal;
    color: var(--text-primary);
    background: var(--surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    margin-top: 0.7rem;
    display: none;
    line-height: 1.5;
}

.translation-text.visible {
    display: block;
}

/* Indicador de Carga Animado */
.loading-bubble .bubble span {
    background: var(--cyber-green) !important;
    box-shadow: 0 0 10px rgba(46, 255, 59, 0.7) !important;
}

/* ==========================================================================
   SELECTORES DE IDIOMAS: Estilo Limpio, Fondo Translúcido y Bordes Suaves
   ========================================================================== */

.language-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 0.9rem;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--cyber-deep);
    letter-spacing: 1px;
}

.lang-selector select {
    background: var(--surface-white);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.45rem 0.8rem;
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    box-shadow: var(--shadow-soft);
    transition: all 0.25s ease;
}

.lang-selector select:hover {
    border-color: var(--cyber-green);
    box-shadow: 0 0 0 3px rgba(46, 255, 59, 0.18);
}

.lang-selector select:focus {
    border-color: var(--cyber-green);
    box-shadow: 0 0 0 3px rgba(46, 255, 59, 0.28);
}

.lang-arrow {
    color: var(--cyber-green);
    font-size: 1.1rem;
    filter: drop-shadow(0 0 5px rgba(46, 255, 59, 0.7));
}

/* ==========================================================================
   PIE DE PÁGINA Y PANEL DE ENTRADA (INPUT): Tarjeta con Glow y Botón Cyber
   ========================================================================== */

.chat-footer {
    padding: 1.2rem 2rem 1.6rem;
    background: var(--surface-panel);
    border-top: 1px solid var(--border-subtle);
    backdrop-filter: blur(25px);
    position: relative;
    z-index: 50;
}

.input-panel {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 28px;
    background: var(--surface-white);
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 25px -2px rgba(15, 23, 42, 0.06), 0 0 20px rgba(46, 255, 59, 0.15);
    display: flex;
    flex-direction: column;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.input-panel:focus-within {
    border-color: var(--cyber-green);
    box-shadow: 0 0 0 3px rgba(46, 255, 59, 0.25), 0 0 24px rgba(46, 255, 59, 0.25);
}

.input-container {
    width: 100%;
    display: flex;
    align-items: center;
}

.input-container textarea {
    border: none;
    background: transparent;
    color: var(--text-primary) !important;
    width: 100%;
    outline: none;
    font-size: 1.05rem;
    padding: 0.75rem 1rem;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    resize: none;
    text-shadow: none !important;
}

.input-container textarea::placeholder {
    color: var(--text-muted) !important;
    font-weight: 400;
    text-shadow: none !important;
}

/* Botón de Enviar en Verde Cyber Muy Vibrante (#2EFF3B) */
.btn-send {
    background: var(--cyber-green) !important;
    color: #0F172A !important;
    border: none !important;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 18px rgba(46, 255, 59, 0.55), 0 2px 8px rgba(46, 255, 59, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    padding: 0;
    margin-left: 8px;
    flex-shrink: 0;
}

.btn-send:hover {
    background: var(--cyber-hover) !important;
    transform: scale(1.08);
    box-shadow: 0 0 26px rgba(46, 255, 59, 0.8);
}

.btn-send:active {
    transform: scale(0.96);
}

.btn-icon {
    font-size: 1.3rem;
    color: #0F172A;
    font-weight: bold;
}

/* Texto de Estado */
.status-text {
    font-size: 0.8rem;
    color: var(--cyber-deep);
    font-weight: 600;
    margin: 4px 0 2px;
    text-align: center;
    min-height: 1rem;
}

/* ==========================================================================
   ESTADOS AUXILIARES Y VISTAS VACÍAS
   ========================================================================== */

.hidden-view {
    display: none !important;
}

.hidden {
    display: none !important;
}

.section-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}

.progress-bar-subtle {
    height: 3px;
    background: var(--cyber-green);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

/* Personalización de Barras de Desplazamiento */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(46, 255, 59, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(46, 255, 59, 0.6);
}


/* ============================================================
   CONTACTS VIEW — Cyber-Naturaleza Theme
   ============================================================ */

/* --- Contacts View container --- */
.contacts-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    position: relative;
    z-index: 2;
}

/* --- Toolbar: count + new button --- */
.contacts-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(46, 255, 59, 0.15);
    flex-shrink: 0;
}

.contacts-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-new-contact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1.5px solid var(--cyber-green);
    background: rgba(46, 255, 59, 0.08);
    color: var(--cyber-green);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.btn-new-contact:hover {
    background: rgba(46, 255, 59, 0.18);
    box-shadow: 0 0 14px rgba(46, 255, 59, 0.35);
    transform: translateY(-1px);
}

.btn-new-contact:active {
    transform: translateY(0);
}

/* --- Scrollable cards grid --- */
.contacts-grid {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- Empty state --- */
.contacts-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.6;
    margin-top: 40px;
}

.contacts-empty-icon {
    font-size: 2.8rem;
    opacity: 0.4;
}

/* --- Contact card --- */
.contact-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(46, 255, 59, 0.12);
    background: rgba(46, 255, 59, 0.04);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(46, 255, 59, 0.05) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s;
}

.contact-card:hover {
    border-color: rgba(46, 255, 59, 0.4);
    background: rgba(46, 255, 59, 0.08);
    box-shadow: 0 4px 20px rgba(46, 255, 59, 0.12);
    transform: translateY(-2px);
}

.contact-card:hover::before {
    opacity: 1;
}

.contact-card:active {
    transform: translateY(0);
}

/* --- Card avatar --- */
.card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(46, 255, 59, 0.25), rgba(0, 180, 216, 0.25));
    border: 1.5px solid rgba(46, 255, 59, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cyber-green);
    letter-spacing: 0.5px;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(46, 255, 59, 0.2);
    text-transform: uppercase;
}

/* --- Card info --- */
.card-info {
    flex: 1;
    min-width: 0;
}

.card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.card-lang {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* --- Online / offline badge --- */
.card-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    flex-shrink: 0;
}

.card-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--cyber-green);
    box-shadow: 0 0 6px var(--cyber-green);
    animation: statusPulse 2.5s infinite;
}

.card-status-dot.offline {
    background: var(--text-muted);
    box-shadow: none;
    animation: none;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

.card-status-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* --- card status label when online --- */
.card-status-dot:not(.offline) + .card-status-label {
    color: var(--cyber-green);
}

/* ============================================================
   MODAL — New Contact (Modo Claro: Blanco #ffffff + Texto #0f172a + Borde Verde Menta Suave | Modo Oscuro bajo body.dark-mode)
   ============================================================ */

.contact-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9400;
    animation: fadeInOverlay 0.2s ease;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.contact-modal,
#newContactModal .contact-modal {
    width: min(380px, 92%);
    border-radius: 22px;
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    border: 1.5px solid #a7f3d0;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16), 0 0 24px rgba(16, 185, 129, 0.12);
    animation: slideUpModal 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUpModal {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-title,
#newContactModal .modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    letter-spacing: 0.6px;
    margin: 0;
}

/* Avatar preview */
.modal-avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(46, 255, 59, 0.24), rgba(0, 201, 167, 0.22));
    border: 2px solid #6ee7b7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #065f46;
    letter-spacing: 1px;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
    transition: content 0.2s;
    text-transform: uppercase;
}

/* Form fields */
.modal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-field label {
    font-size: 0.76rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.modal-field input,
.modal-field select {
    padding: 11px 14px;
    border-radius: 12px;
    border: 1.5px solid #a7f3d0;
    background: #ffffff;
    color: #0f172a;
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.modal-field input::placeholder {
    color: #64748b;
}

.modal-field input:focus,
.modal-field select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.modal-field select option {
    background: #ffffff;
    color: #0f172a;
}

/* Modal action buttons */
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 6px;
}

.btn-modal-cancel {
    padding: 9px 18px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-modal-cancel:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.btn-modal-save {
    padding: 9px 20px;
    border-radius: 20px;
    border: 1.5px solid #10b981;
    background: linear-gradient(135deg, #2EFF3B 0%, #34D399 100%);
    color: #0f172a;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.btn-modal-save:hover {
    box-shadow: 0 6px 18px rgba(46, 255, 59, 0.4);
    transform: translateY(-1px);
}

/* Dark mode adjustments for contacts & New Contact Modal (exclusivamente bajo body.dark-mode) */
body.dark-mode .contact-card {
    background: rgba(46, 255, 59, 0.03);
    border-color: rgba(46, 255, 59, 0.1);
}

body.dark-mode .contact-card:hover {
    background: rgba(46, 255, 59, 0.07);
    border-color: rgba(46, 255, 59, 0.35);
}

body.dark-mode .contact-modal-overlay {
    background: rgba(0, 0, 0, 0.62);
}

body.dark-mode .contact-modal,
body.dark-mode #newContactModal .contact-modal {
    background: rgba(11, 20, 16, 0.97);
    color: #f1f5f9;
    border-color: rgba(46, 255, 59, 0.35);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(46, 255, 59, 0.12);
}

body.dark-mode .modal-title,
body.dark-mode #newContactModal .modal-title {
    color: var(--cyber-green);
}

body.dark-mode .modal-avatar-preview {
    color: var(--cyber-green);
    border-color: rgba(46, 255, 59, 0.5);
}

body.dark-mode .modal-field label {
    color: #a7f3d0;
}

body.dark-mode .modal-field input,
body.dark-mode .modal-field select {
    background: rgba(46, 255, 59, 0.05);
    border-color: rgba(46, 255, 59, 0.24);
    color: #f1f5f9;
}

body.dark-mode .modal-field input::placeholder {
    color: #64748b;
}

body.dark-mode .modal-field select option {
    background: #0b1410;
    color: #f1f5f9;
}

body.dark-mode .btn-modal-cancel {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.16);
    color: #94a3b8;
}

body.dark-mode .btn-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
}

body.dark-mode .btn-modal-save {
    background: rgba(46, 255, 59, 0.14);
    border-color: var(--cyber-green);
    color: var(--cyber-green);
}

body.dark-mode .btn-modal-save:hover {
    background: rgba(46, 255, 59, 0.25);
    box-shadow: 0 0 14px rgba(46, 255, 59, 0.35);
}


/* ============================================================
   ACCESS SCREEN — Login de Seguridad (Cyber-Naturaleza)
   ============================================================ */

/* Full-screen blocking overlay */
.access-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 30% 30%, rgba(46, 255, 59, 0.06) 0%, transparent 55%),
                radial-gradient(ellipse at 75% 70%, rgba(0, 180, 216, 0.05) 0%, transparent 55%),
                var(--bg-base);
    animation: fadeInAccess 0.5s ease;
}

@keyframes fadeInAccess {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeOutAccess {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(1.03); }
}

/* Card panel */
.access-card {
    width: min(380px, 92vw);
    border-radius: 24px;
    padding: 40px 32px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(46, 255, 59, 0.22);
    background: var(--bg-panel);
    box-shadow: 0 12px 60px rgba(0, 0, 0, 0.45),
                0 0 40px rgba(46, 255, 59, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
    animation: slideUpCard 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.access-card::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(46, 255, 59, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

@keyframes slideUpCard {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Logo inside access card */
.access-logo {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--cyber-green);
    filter: drop-shadow(0 0 10px rgba(46, 255, 59, 0.45));
}

.access-globe {
    width: 36px;
    height: 36px;
    color: var(--cyber-green);
}

/* Subtitle */
.access-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: -10px 0 0;
    opacity: 0.8;
}

/* Form field */
.access-field {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.access-field label {
    font-size: 0.73rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.access-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.access-input-wrapper input[type="password"],
.access-input-wrapper input[type="text"] {
    width: 100%;
    padding: 12px 44px 12px 16px;
    border-radius: 12px;
    border: 1.5px solid rgba(46, 255, 59, 0.2);
    background: rgba(46, 255, 59, 0.05);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    letter-spacing: 2px;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-sizing: border-box;
}

.access-input-wrapper input:focus {
    border-color: rgba(46, 255, 59, 0.6);
    box-shadow: 0 0 16px rgba(46, 255, 59, 0.18);
}

/* Toggle show/hide password */
.access-eye-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.5;
    padding: 4px;
    transition: opacity 0.2s;
    line-height: 1;
}

.access-eye-btn:hover {
    opacity: 1;
}

/* Error banner */
.access-error {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 50, 50, 0.1);
    border: 1px solid rgba(255, 50, 50, 0.35);
    color: #ff6b6b;
    font-size: 0.82rem;
    text-align: center;
    letter-spacing: 0.5px;
    animation: shakeError 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
    box-shadow: 0 0 14px rgba(255, 50, 50, 0.2);
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    15%       { transform: translateX(-8px); }
    45%       { transform: translateX(8px); }
    75%       { transform: translateX(-5px); }
}

/* Enter button */
.btn-access-enter {
    width: 100%;
    padding: 13px;
    border-radius: 14px;
    border: 1.5px solid var(--cyber-green);
    background: rgba(46, 255, 59, 0.1);
    color: var(--cyber-green);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s, box-shadow 0.25s, transform 0.15s;
    margin-top: 4px;
}

.btn-access-enter:hover {
    background: rgba(46, 255, 59, 0.22);
    box-shadow: 0 0 24px rgba(46, 255, 59, 0.35), 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.btn-access-enter:active {
    transform: translateY(0);
}

/* Dark mode — access screen inherits well, minor boost */
.dark-mode .access-card {
    background: rgba(6, 9, 7, 0.97);
    border-color: rgba(46, 255, 59, 0.28);
}

.dark-mode .access-input-wrapper input {
    background: rgba(46, 255, 59, 0.04);
}


/* ============================================================
   PROFILE PHOTOS + HEADER TRIGGER + CONTACT DETAIL PANEL
   ============================================================ */

/* Photo inside any avatar */
.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.has-photo {
    padding: 0 !important;
    overflow: hidden;
}

/* Header clickable contact block */
.header-contact-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-radius: 14px;
    padding: 4px 10px 4px 4px;
    margin-left: -4px;
    transition: background 0.2s;
    outline: none;
}

.header-contact-trigger:hover,
.header-contact-trigger:focus-visible {
    background: var(--cyber-soft);
}

.header-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2EFF3B 0%, #00C9A7 100%);
    color: #06210F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(46, 255, 59, 0.35);
    text-transform: uppercase;
}

/* Upload / remove photo buttons */
.photo-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: -6px;
}

.btn-photo {
    padding: 6px 14px;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    background: var(--cyber-soft);
    color: var(--cyber-deep);
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.2s, background 0.2s;
}

.btn-photo:hover {
    box-shadow: 0 0 12px rgba(46, 255, 59, 0.3);
}

.btn-photo-remove {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border-card);
}

.modal-avatar-preview {
    cursor: pointer;
}

/* Backdrop */
.contact-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 490;
}

.contact-panel-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* Slide-in panel */
.contact-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(380px, 100vw);
    z-index: 500;
    display: flex;
    flex-direction: column;
    background: var(--surface-white);
    border-left: 1px solid var(--border-subtle);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.18), -2px 0 20px rgba(46, 255, 59, 0.08);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    color: var(--text-primary);
}

.contact-panel.open {
    transform: translateX(0);
}

.cp-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.cp-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.cp-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.cp-close:hover {
    background: var(--cyber-soft);
    color: var(--cyber-deep);
}

.cp-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cp-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.cp-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2EFF3B 0%, #00C9A7 100%);
    color: #06210F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(46, 255, 59, 0.35);
    text-transform: uppercase;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cp-avatar:hover {
    transform: scale(1.03);
    box-shadow: 0 0 40px rgba(46, 255, 59, 0.55);
}

.cp-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cp-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cp-section label {
    font-size: 0.72rem;
    color: var(--cyber-deep);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

.cp-section input {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--cyber-soft);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.cp-section input:focus {
    border-color: var(--cyber-green);
    box-shadow: 0 0 12px rgba(46, 255, 59, 0.2);
}

.cp-phone-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cp-call-inline {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1.5px solid var(--cyber-green);
    background: rgba(46, 255, 59, 0.12);
    transition: box-shadow 0.2s, transform 0.15s;
}

.cp-call-inline:hover {
    box-shadow: 0 0 16px rgba(46, 255, 59, 0.45);
    transform: translateY(-1px);
}

.cp-quick {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.cp-qa {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    background: var(--cyber-soft);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
}

.cp-qa span {
    font-size: 1.2rem;
}

.cp-qa:hover,
.cp-qa.active {
    border-color: var(--cyber-green);
    box-shadow: 0 0 14px rgba(46, 255, 59, 0.3);
    transform: translateY(-2px);
}

.cp-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cp-files-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.cp-files-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}

.cp-files-empty {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    padding: 16px 0;
}

.cp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
}

.cp-feedback {
    font-size: 0.78rem;
    color: var(--cyber-deep);
}

.cp-feedback.error {
    color: #ff5a5a;
}

/* Chat search highlight */
.bubble.chat-search-hit {
    outline: 2px solid var(--cyber-green);
    box-shadow: 0 0 16px rgba(46, 255, 59, 0.45);
}


/* ============================================================
   IDENTIDAD GABRIVO — marca de agua de texto bajo el globo
   ============================================================ */
.chat-area::after {
    content: 'GABRIVO';
    position: absolute;
    left: 50%;
    top: calc(46% + min(620px, 85vw) * 0.28 + 6px);
    transform: translateX(-50%);
    font-family: 'Outfit', sans-serif;
    font-size: calc(min(620px, 85vw) * 0.115);
    font-weight: 600;
    letter-spacing: 0.18em;
    line-height: 1;
    white-space: nowrap;
    color: var(--cyber-deep);
    opacity: 0.32;
    pointer-events: none;
    user-select: none;
    z-index: 1;
    transition: color 0.35s ease, opacity 0.35s ease, text-shadow 0.35s ease;
}

body.dark-mode .chat-area::after {
    color: var(--cyber-green);
    opacity: 0.26;
    text-shadow: 0 0 18px rgba(46, 255, 59, 0.55);
}

/* ============================================================
   BOTÓN "+ NUEVO CONTACTO" — contraste legible en modo claro
   ============================================================ */
.btn-new-contact {
    color: var(--cyber-deep);                 /* #065F46 en claro → contraste alto */
    background: rgba(46, 255, 59, 0.22);
    border: 1.5px solid rgba(6, 95, 70, 0.35);
    box-shadow: 0 1px 6px rgba(6, 95, 70, 0.08);
}

.btn-new-contact:hover {
    color: #04402F;
    background: rgba(46, 255, 59, 0.36);
    border-color: rgba(6, 95, 70, 0.55);
    box-shadow: 0 0 14px rgba(46, 255, 59, 0.45);
}

/* Modo oscuro: se mantiene el estilo neón original */
body.dark-mode .btn-new-contact {
    color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.08);
    border-color: var(--cyber-green);
    box-shadow: none;
}

body.dark-mode .btn-new-contact:hover {
    color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.18);
    box-shadow: 0 0 14px rgba(46, 255, 59, 0.35);
}


/* ============================================================
   STICKER PICKER & FLOATING STICKER MESSAGES (Cyber-Naturaleza)
   ============================================================ */

.input-panel {
    position: relative;
}

/* Botón de Sticker (cara sonriente) en la barra de entrada */
.btn-sticker {
    background: var(--cyber-soft);
    color: var(--cyber-deep);
    border: 1px solid var(--border-subtle);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 4px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    padding: 0;
}

.btn-sticker:hover,
.btn-sticker.active {
    border-color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.24);
    box-shadow: 0 0 14px rgba(46, 255, 59, 0.45);
    transform: scale(1.06);
}

body.dark-mode .btn-sticker {
    color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.10);
}

/* Panel emergente de Stickers */
.sticker-picker {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 0;
    width: min(360px, 92vw);
    border-radius: 20px;
    padding: 14px 16px 16px;
    background: var(--surface-white);
    border: 1.5px solid var(--border-subtle);
    box-shadow: var(--shadow-card), 0 12px 36px rgba(15, 23, 42, 0.14);
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: stickerPopIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes stickerPopIn {
    from { opacity: 0; transform: translateY(10px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.sticker-picker-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 10px;
}

.sticker-picker-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cyber-deep);
}

.sticker-tabs {
    display: flex;
    gap: 6px;
}

.sticker-tab {
    flex: 1;
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}

.sticker-tab:hover {
    border-color: var(--cyber-green);
    color: var(--text-primary);
}

.sticker-tab.active {
    background: rgba(46, 255, 59, 0.22);
    border-color: var(--cyber-green);
    color: var(--cyber-deep);
    box-shadow: 0 0 10px rgba(46, 255, 59, 0.25);
}

body.dark-mode .sticker-tab.active {
    color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.15);
}

.sticker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-height: 245px;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 4px 4px 6px 2px;
}

.sticker-item {
    background: var(--surface-subtle);
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.sticker-item:hover {
    transform: translateY(-3px) scale(1.06);
    border-color: var(--cyber-green);
    background: var(--cyber-soft);
    box-shadow: 0 4px 14px rgba(46, 255, 59, 0.25);
}

.sticker-item svg {
    width: 56px;
    height: 56px;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.12));
}

.sticker-item-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.1;
}

/* ============================================================
   STICKER EN EL HILO DE CONVERSACIÓN: Flotante y transparente
   ============================================================ */
.bubble.sticker-bubble {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 4px 2px !important;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.message-received .bubble.sticker-bubble {
    align-items: flex-start;
}

.sticker-art {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 3px 9px rgba(15, 23, 42, 0.15)) drop-shadow(0 0 6px rgba(46, 255, 59, 0.18));
    animation: stickerFloatIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: transform 0.2s ease;
}

.sticker-art:hover {
    transform: scale(1.06) rotate(-2deg);
}

.sticker-art svg {
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes stickerFloatIn {
    from { opacity: 0; transform: scale(0.6) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.bubble.sticker-bubble .msg-meta {
    background: var(--surface-panel);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    box-shadow: var(--shadow-soft);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.bubble.sticker-bubble .read-check {
    color: var(--cyber-deep);
    font-weight: 700;
}

body.dark-mode .bubble.sticker-bubble .read-check {
    color: var(--cyber-green);
}


/* ============================================================
   STICKER SEARCH, CUSTOM UPLOAD, ATTACHED PREVIEW & COMBINED MSG
   ============================================================ */

.sticker-picker {
    width: min(410px, 94vw);
}

.sticker-picker-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.btn-add-custom-sticker {
    padding: 4px 11px;
    border-radius: 14px;
    border: 1.5px solid rgba(6, 95, 70, 0.38);
    background: rgba(46, 255, 59, 0.22);
    color: var(--cyber-deep);
    font-family: 'Outfit', sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-add-custom-sticker:hover {
    background: rgba(46, 255, 59, 0.36);
    box-shadow: 0 0 12px rgba(46, 255, 59, 0.45);
    transform: translateY(-1px);
}

body.dark-mode .btn-add-custom-sticker {
    color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.12);
    border-color: var(--cyber-green);
}

.sticker-search-row {
    width: 100%;
}

.sticker-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 12px;
    border-radius: 11px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-subtle);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sticker-search-input:focus {
    border-color: var(--cyber-green);
    box-shadow: 0 0 10px rgba(46, 255, 59, 0.25);
}

.sticker-tab {
    padding: 5px 6px;
    font-size: 0.72rem;
}

.sticker-item img.custom-sticker-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

.sticker-empty-msg {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 18px 8px;
}

/* Vista previa del sticker adjunto encima de la barra de escritura */
.attached-sticker-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 8px 4px;
    padding: 6px 12px;
    border-radius: 16px;
    background: var(--surface-subtle);
    border: 1.5px solid var(--border-subtle);
    box-shadow: 0 2px 10px rgba(46, 255, 59, 0.12);
    animation: stickerPopIn 0.18s ease;
}

.attached-sticker-thumb {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attached-sticker-thumb svg,
.attached-sticker-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.attached-sticker-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.attached-sticker-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--cyber-deep);
}

body.dark-mode .attached-sticker-badge {
    color: var(--cyber-green);
}

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

.btn-remove-attached-sticker {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--surface-white);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.btn-remove-attached-sticker:hover {
    border-color: #ff5a5a;
    color: #ff5a5a;
    transform: scale(1.08);
}

/* Sticker integrado en la parte superior de una burbuja combinada (Sticker + Texto/Traducción) */
.bubble-combined-sticker {
    width: 50px;
    height: 50px;
    margin: 2px auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 7px rgba(15, 23, 42, 0.14)) drop-shadow(0 0 6px rgba(46, 255, 59, 0.18));
    animation: stickerFloatIn 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bubble-combined-sticker svg,
.bubble-combined-sticker img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}

.sticker-art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 12px;
}


/* ============================================================
   USER PROFILE VIEW & SIDEBAR SEARCH EMPTY STATE (Cyber-Naturaleza)
   ============================================================ */

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sidebar-footer:hover {
    background: var(--cyber-soft);
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2EFF3B 0%, #00C9A7 100%);
    color: #06210F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(46, 255, 59, 0.35);
    text-transform: uppercase;
}

.sidebar-search-empty {
    padding: 20px 14px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.4px;
}

/* Contenedor principal de la vista Perfil */
.profile-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.profile-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px 36px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.profile-card {
    width: min(620px, 100%);
    border-radius: 22px;
    padding: 28px 28px 24px;
    background: var(--surface-panel);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 22px;
    backdrop-filter: blur(22px);
}

.profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-subtle);
}

.profile-avatar-large {
    width: 116px;
    height: 116px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2EFF3B 0%, #00C9A7 100%);
    color: #06210F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.3rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 28px rgba(46, 255, 59, 0.38);
    border: 2px solid rgba(46, 255, 59, 0.55);
    text-transform: uppercase;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-avatar-large:hover {
    transform: scale(1.04);
    box-shadow: 0 0 36px rgba(46, 255, 59, 0.58);
}

.profile-identity-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2px;
}

.profile-display-name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-role-badge {
    padding: 4px 12px;
    border-radius: 14px;
    background: rgba(46, 255, 59, 0.22);
    border: 1px solid rgba(6, 95, 70, 0.35);
    color: var(--cyber-deep);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

body.dark-mode .profile-role-badge {
    color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.14);
    border-color: var(--cyber-green);
}

.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-field-full {
    grid-column: 1 / -1;
}

.profile-field label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--cyber-deep);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.profile-field input {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-white);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-field input:focus {
    border-color: var(--cyber-green);
    box-shadow: 0 0 12px rgba(46, 255, 59, 0.25);
}

/* Preferencias de la cuenta con interruptores Cyber */
.profile-preferences-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 6px;
    border-top: 1px solid var(--border-subtle);
}

.profile-section-subtitle {
    margin: 6px 0 2px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cyber-deep);
}

.profile-pref-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-pref-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 14px;
    border-radius: 14px;
    background: var(--surface-subtle);
    border: 1px solid var(--border-subtle);
    transition: border-color 0.2s ease;
}

.profile-pref-item:hover {
    border-color: var(--cyber-green);
}

.profile-pref-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-pref-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-pref-desc {
    font-size: 0.74rem;
    color: var(--text-muted);
}

/* Switch Cyber-Naturaleza */
.cyber-switch {
    width: 46px;
    height: 26px;
    border-radius: 20px;
    border: 1.5px solid var(--border-subtle);
    background: rgba(100, 116, 139, 0.25);
    padding: 2px;
    cursor: pointer;
    position: relative;
    transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.cyber-switch-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.22s ease;
}

.cyber-switch.active {
    background: rgba(46, 255, 59, 0.32);
    border-color: var(--cyber-green);
    box-shadow: 0 0 12px rgba(46, 255, 59, 0.35);
}

.cyber-switch.active .cyber-switch-thumb {
    transform: translateX(20px);
    background: var(--cyber-green);
}

.profile-actions-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
}

.profile-feedback {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cyber-deep);
}

body.dark-mode .profile-feedback {
    color: var(--cyber-green);
}

.btn-profile-save {
    color: var(--cyber-deep);
    background: rgba(46, 255, 59, 0.24);
    border: 1.5px solid rgba(6, 95, 70, 0.4);
}

body.dark-mode .btn-profile-save {
    color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.14);
    border-color: var(--cyber-green);
}

@media (max-width: 600px) {
    .profile-form-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   BORRADO MANUAL DE MENSAJES Y MENÚ DE OPCIONES DE CHAT
   ============================================================ */

.bubble {
    position: relative;
}

/* Botón de papelera en cada burbuja (aparece suavemente al pasar el cursor) */
.btn-delete-bubble {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--surface-white);
    color: var(--text-muted);
    font-size: 0.72rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.85);
    transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: var(--shadow-soft);
    z-index: 15;
    padding: 0;
}

.message-sent:hover .btn-delete-bubble,
.message-received:hover .btn-delete-bubble,
.btn-delete-bubble:focus-visible {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.btn-delete-bubble:hover {
    border-color: #ff5a5a;
    color: #ff5a5a;
    box-shadow: 0 0 10px rgba(255, 90, 90, 0.35);
    transform: scale(1.1);
}

/* Menú desplegable de opciones en la cabecera del chat (⋮) */
.header-actions {
    position: relative;
}

.header-options-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 225px;
    padding: 8px;
    border-radius: 16px;
    background: var(--surface-white);
    border: 1.5px solid var(--border-subtle);
    box-shadow: var(--shadow-card), 0 10px 28px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 200;
    animation: stickerPopIn 0.18s ease;
}

.header-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.84rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.header-menu-item:hover {
    background: var(--cyber-soft);
    color: var(--cyber-deep);
}

body.dark-mode .header-menu-item:hover {
    color: var(--cyber-green);
}

.header-menu-item.danger {
    color: #ff5a5a;
}

.header-menu-item.danger:hover {
    background: rgba(255, 90, 90, 0.14);
    color: #ff4040;
}


/* ============================================================
   BOTÓN DE MICRÓFONO HOLOGRÁFICO (NEÓN ESMERALDA) E INDICADOR
   ============================================================ */

.btn-voice-mic {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(46, 255, 59, 0.42);
    background: radial-gradient(circle at 30% 28%, rgba(46, 255, 59, 0.28) 0%, rgba(0, 201, 167, 0.14) 65%, rgba(6, 95, 70, 0.08) 100%);
    color: var(--cyber-deep);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 6px;
    padding: 0;
    box-shadow: 0 0 12px rgba(46, 255, 59, 0.22), inset 0 1px 2px rgba(255, 255, 255, 0.45);
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease;
    overflow: visible;
}

body.dark-mode .btn-voice-mic {
    color: var(--cyber-green);
    border-color: rgba(46, 255, 59, 0.5);
    background: radial-gradient(circle at 30% 28%, rgba(46, 255, 59, 0.22) 0%, rgba(0, 201, 167, 0.10) 68%, rgba(4, 18, 12, 0.65) 100%);
    box-shadow: 0 0 14px rgba(46, 255, 59, 0.28), inset 0 0 8px rgba(46, 255, 59, 0.15);
}

.btn-voice-mic:hover {
    transform: scale(1.07);
    border-color: var(--cyber-green);
    background: radial-gradient(circle at 30% 28%, rgba(46, 255, 59, 0.42) 0%, rgba(0, 201, 167, 0.22) 70%, rgba(6, 95, 70, 0.14) 100%);
    box-shadow: 0 0 18px rgba(46, 255, 59, 0.48), 0 0 6px rgba(0, 201, 167, 0.35);
}

.btn-voice-mic .mic-svg-icon {
    position: relative;
    z-index: 2;
    transition: transform 0.2s ease, filter 0.2s ease;
}

/* Anillo holográfico orgánico de ondas alrededor del botón */
.btn-voice-mic .mic-holo-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid rgba(46, 255, 59, 0.65);
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
}

/* Estado activo: "Grabación de audio lista" con pulso de ondas neón esmeralda */
.btn-voice-mic.recording-ready {
    background: linear-gradient(135deg, #2EFF3B 0%, #00C9A7 100%);
    color: #06210F !important;
    border-color: #2EFF3B;
    box-shadow: 0 0 22px rgba(46, 255, 59, 0.72), 0 0 36px rgba(0, 201, 167, 0.38);
    transform: scale(1.06);
}

.btn-voice-mic.recording-ready .mic-svg-icon {
    animation: micIconBeat 1.1s ease-in-out infinite alternate;
}

.btn-voice-mic.recording-ready .mic-holo-ring {
    opacity: 1;
    animation: micHoloWave 1.6s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes micHoloWave {
    0% {
        transform: scale(0.95);
        opacity: 0.85;
        box-shadow: 0 0 0 0 rgba(46, 255, 59, 0.55);
    }
    75% {
        transform: scale(1.42);
        opacity: 0;
        box-shadow: 0 0 12px 4px rgba(0, 201, 167, 0.25);
    }
    100% {
        transform: scale(1.48);
        opacity: 0;
    }
}

@keyframes micIconBeat {
    from { transform: scale(0.96); }
    to   { transform: scale(1.1); }
}

/* Indicador visual sutil superior ("Grabación de audio lista" + pulso de ondas) */
.voice-ready-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    margin: 4px 6px 2px;
    border-radius: 16px;
    background: linear-gradient(90deg, rgba(46, 255, 59, 0.14) 0%, rgba(0, 201, 167, 0.10) 100%);
    border: 1px solid rgba(46, 255, 59, 0.42);
    box-shadow: 0 2px 14px rgba(46, 255, 59, 0.14);
    animation: stickerPopIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.voice-ready-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyber-green);
    box-shadow: 0 0 8px var(--cyber-green);
    flex-shrink: 0;
    animation: statusPulse 1.3s ease-in-out infinite;
}

.voice-ready-waves {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 16px;
}

.voice-ready-waves span {
    width: 2.5px;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(180deg, #2EFF3B 0%, #00C9A7 100%);
    box-shadow: 0 0 6px rgba(46, 255, 59, 0.45);
    animation: voiceReadyBarPulse 0.85s ease-in-out infinite alternate;
}

.voice-ready-waves span:nth-child(1) { animation-delay: 0.0s; }
.voice-ready-waves span:nth-child(2) { animation-delay: 0.15s; }
.voice-ready-waves span:nth-child(3) { animation-delay: 0.30s; }
.voice-ready-waves span:nth-child(4) { animation-delay: 0.15s; }
.voice-ready-waves span:nth-child(5) { animation-delay: 0.05s; }

@keyframes voiceReadyBarPulse {
    0%   { height: 4px; opacity: 0.65; }
    100% { height: 15px; opacity: 1; }
}

.voice-ready-label {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cyber-deep);
    letter-spacing: 0.2px;
}

body.dark-mode .voice-ready-label {
    color: var(--cyber-green);
}

.btn-cancel-voice-ready {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.18s ease;
}

.btn-cancel-voice-ready:hover {
    border-color: var(--cyber-green);
    color: var(--text-primary);
    background: rgba(46, 255, 59, 0.18);
}


/* ============================================================
   OPTIMIZACIÓN DE LA BARRA DE CHAT, MENÚ FLOTANTE DE ADJUNTOS,
   CÁMARA RÁPIDA Y MULTIMEDIA AVANZADA (GIFS / STICKERS GRANDES)
   ============================================================ */

.input-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px;
}

.input-actions-left,
.input-actions-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.input-actions-left .btn-sticker {
    margin-left: 0;
}

.input-actions-right .btn-voice-mic {
    margin-left: 0;
}

.input-container textarea {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.6rem;
}

/* Botón de Adjuntos (Clip) y Botón de Cámara Rápida */
.btn-attach-clip,
.btn-quick-camera {
    background: var(--cyber-soft);
    color: var(--cyber-deep);
    border: 1px solid var(--border-subtle);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-attach-clip:hover,
.btn-attach-clip.active,
.btn-quick-camera:hover,
.btn-quick-camera.active {
    border-color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.24);
    box-shadow: 0 0 14px rgba(46, 255, 59, 0.45);
    transform: scale(1.06);
}

body.dark-mode .btn-attach-clip,
body.dark-mode .btn-quick-camera {
    color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.10);
}

/* Menú Flotante de Adjuntos (Estética Neón / Cyber) */
.attach-floating-menu {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 44px;
    width: min(340px, 90vw);
    border-radius: 20px;
    padding: 14px 16px 16px;
    background: var(--surface-white);
    border: 1.5px solid var(--border-subtle);
    box-shadow: var(--shadow-card), 0 14px 36px rgba(15, 23, 42, 0.16), 0 0 22px rgba(46, 255, 59, 0.14);
    z-index: 125;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: stickerPopIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.attach-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.attach-menu-title {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--cyber-deep);
}

body.dark-mode .attach-menu-title {
    color: var(--cyber-green);
}

.attach-menu-badge {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(46, 255, 59, 0.22);
    color: var(--cyber-deep);
    border: 1px solid rgba(46, 255, 59, 0.45);
}

body.dark-mode .attach-menu-badge {
    color: var(--cyber-green);
}

.attach-menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.attach-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-subtle);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.attach-menu-item:hover {
    transform: translateX(3px);
    border-color: var(--cyber-green);
    background: var(--cyber-soft);
    box-shadow: 0 4px 14px rgba(46, 255, 59, 0.2);
}

.attach-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(46, 255, 59, 0.4);
    box-shadow: 0 0 12px rgba(46, 255, 59, 0.2);
}

.attach-icon-media {
    background: linear-gradient(135deg, rgba(46, 255, 59, 0.28) 0%, rgba(0, 201, 167, 0.22) 100%);
    color: var(--cyber-deep);
}

.attach-icon-docs {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.24) 0%, rgba(46, 255, 59, 0.20) 100%);
    color: var(--cyber-deep);
}

.attach-icon-camera {
    background: linear-gradient(135deg, rgba(46, 255, 59, 0.34) 0%, rgba(16, 185, 129, 0.22) 100%);
    color: var(--cyber-deep);
}

.attach-icon-gifs {
    background: linear-gradient(135deg, rgba(46, 255, 59, 0.36) 0%, rgba(0, 229, 255, 0.26) 100%);
    color: var(--cyber-deep);
}

body.dark-mode .attach-item-icon {
    color: var(--cyber-green);
}

.attach-item-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.attach-item-label {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-primary);
}

.attach-item-sub {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* Pestaña destacada de GIFs / Stickers Especiales Grandes */
.sticker-tab-special {
    border-color: rgba(46, 255, 59, 0.45);
    font-weight: 700;
}

/* Stickers/GIFs especiales de gran formato en el hilo de chat */
.sticker-art.large-media-art {
    width: 128px;
    height: 128px;
    filter: drop-shadow(0 6px 16px rgba(15, 23, 42, 0.22)) drop-shadow(0 0 12px rgba(46, 255, 59, 0.32));
}

.bubble-combined-sticker.large-media-top {
    width: 112px;
    height: 112px;
}

.sticker-art.media-card-art,
.bubble-combined-sticker.media-card-top {
    width: auto;
    height: auto;
    max-width: 260px;
}

/* Tarjetas de Multimedia Adjunta (Fotos, Vídeos, Capturas de Cámara y Documentos) */
.chat-media-attachment {
    margin-bottom: 8px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(46, 255, 59, 0.38);
    background: rgba(6, 33, 15, 0.08);
    max-width: 260px;
}

.chat-media-attachment img,
.chat-media-attachment video {
    display: block;
    width: 100%;
    max-height: 210px;
    object-fit: cover;
    border-radius: 13px;
}

.chat-doc-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--surface-subtle);
    border: 1px solid var(--border-subtle);
    margin-bottom: 6px;
    max-width: 260px;
}

.chat-doc-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(46, 255, 59, 0.22);
    color: var(--cyber-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.72rem;
    flex-shrink: 0;
    border: 1px solid rgba(46, 255, 59, 0.45);
}

body.dark-mode .chat-doc-icon {
    color: var(--cyber-green);
}

.chat-doc-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-doc-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-doc-size {
    font-size: 0.68rem;
    color: var(--text-secondary);
}

/* Modal de Cámara Rápida GABRIVO */
.quick-camera-modal {
    width: min(440px, 94vw);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.quick-camera-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-camera-title-wrap .modal-title {
    margin: 0;
    font-size: 1.05rem;
}

.quick-camera-viewport {
    position: relative;
    width: 100%;
    height: 240px;
    border-radius: 16px;
    overflow: hidden;
    background: #06150D;
    border: 1.5px solid rgba(46, 255, 59, 0.5);
    box-shadow: 0 0 22px rgba(46, 255, 59, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-camera-video,
.quick-camera-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.quick-camera-hud {
    position: absolute;
    inset: 12px;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.hud-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: #2EFF3B;
    border-style: solid;
    opacity: 0.85;
}

.hud-tl { top: 0; left: 0; border-width: 2px 0 0 2px; border-top-left-radius: 6px; }
.hud-tr { top: 0; right: 0; border-width: 2px 2px 0 0; border-top-right-radius: 6px; }
.hud-bl { bottom: 0; left: 0; border-width: 0 0 2px 2px; border-bottom-left-radius: 6px; }
.hud-br { bottom: 0; right: 0; border-width: 0 2px 2px 0; border-bottom-right-radius: 6px; }

.hud-status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(6, 33, 15, 0.78);
    border: 1px solid rgba(46, 255, 59, 0.55);
    color: #2EFF3B;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.9px;
}

.quick-camera-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.btn-camera-shutter {
    flex: 1;
}


/* ============================================================
   BOTÓN DERECHO DINÁMICO 2 EN 1 (MICRÓFONO HOLOGRÁFICO ⇄ ENVIAR)
   ============================================================ */

.btn-send.btn-dynamic-action {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: visible;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease,
                background 0.25s ease,
                border-color 0.25s ease,
                color 0.22s ease;
}

.btn-send.btn-dynamic-action .action-icon-mic,
.btn-send.btn-dynamic-action .action-icon-send {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

/* MODO MICRÓFONO (Por defecto cuando el input está vacío y sin adjunto) */
.btn-send.btn-dynamic-action.mode-mic {
    background: radial-gradient(circle at 30% 28%, rgba(46, 255, 59, 0.34) 0%, rgba(0, 201, 167, 0.18) 65%, rgba(6, 95, 70, 0.10) 100%) !important;
    color: var(--cyber-deep) !important;
    border: 1.5px solid rgba(46, 255, 59, 0.55) !important;
    box-shadow: 0 0 14px rgba(46, 255, 59, 0.28), inset 0 1px 2px rgba(255, 255, 255, 0.45) !important;
}

body.dark-mode .btn-send.btn-dynamic-action.mode-mic {
    color: var(--cyber-green) !important;
    border-color: rgba(46, 255, 59, 0.6) !important;
    background: radial-gradient(circle at 30% 28%, rgba(46, 255, 59, 0.26) 0%, rgba(0, 201, 167, 0.12) 68%, rgba(4, 18, 12, 0.72) 100%) !important;
    box-shadow: 0 0 16px rgba(46, 255, 59, 0.34), inset 0 0 8px rgba(46, 255, 59, 0.18) !important;
}

.btn-send.btn-dynamic-action.mode-mic:hover {
    transform: scale(1.07);
    border-color: var(--cyber-green) !important;
    box-shadow: 0 0 20px rgba(46, 255, 59, 0.52), 0 0 8px rgba(0, 201, 167, 0.38) !important;
}

.btn-send.btn-dynamic-action.mode-mic .action-icon-mic {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.btn-send.btn-dynamic-action.mode-mic .action-icon-send {
    opacity: 0;
    transform: scale(0.4) rotate(-35deg);
}

/* Estado Grabación Lista en el botón 2 en 1 */
.btn-send.btn-dynamic-action.mode-mic.recording-ready {
    background: linear-gradient(135deg, #2EFF3B 0%, #00C9A7 100%) !important;
    color: #06210F !important;
    border-color: #2EFF3B !important;
    box-shadow: 0 0 22px rgba(46, 255, 59, 0.75), 0 0 36px rgba(0, 201, 167, 0.4) !important;
    transform: scale(1.06);
}

.btn-send.btn-dynamic-action .mic-holo-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid rgba(46, 255, 59, 0.65);
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
}

.btn-send.btn-dynamic-action.mode-mic.recording-ready .mic-holo-ring {
    opacity: 1;
    animation: micHoloWave 1.6s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.btn-send.btn-dynamic-action.mode-mic.recording-ready .action-icon-mic {
    animation: micIconBeat 1.1s ease-in-out infinite alternate;
}

/* MODO ENVIAR (Al escribir texto o adjuntar un sticker/archivo) */
.btn-send.btn-dynamic-action.mode-send {
    background: var(--cyber-green) !important;
    color: #0F172A !important;
    border: none !important;
    box-shadow: 0 0 18px rgba(46, 255, 59, 0.55), 0 2px 8px rgba(46, 255, 59, 0.35) !important;
}

.btn-send.btn-dynamic-action.mode-send .action-icon-mic {
    opacity: 0;
    transform: scale(0.4) rotate(35deg);
}

.btn-send.btn-dynamic-action.mode-send .action-icon-send {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Reproductor de Nota de Voz (MediaRecorder) dentro de la burbuja de chat */
.voice-note-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
    max-width: 270px;
}

.voice-note-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.76rem;
    font-weight: 700;
}

.voice-note-player {
    width: 100%;
    height: 36px;
    border-radius: 18px;
    outline: none;
}


/* ============================================================
   VISOR DE IMÁGENES EN PANTALLA COMPLETA (MODAL CYBER/ORGANIC)
   ============================================================ */

.bubble img,
.chat-media-attachment img {
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-media-attachment img:hover {
    transform: scale(1.02);
    box-shadow: 0 0 14px rgba(46, 255, 59, 0.35);
}

.image-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 950;
    background: radial-gradient(circle at center, rgba(6, 33, 15, 0.88) 0%, rgba(2, 10, 6, 0.94) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    animation: lightboxFadeIn 0.22s ease;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.image-lightbox-frame {
    position: relative;
    max-width: min(92vw, 1080px);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(11, 24, 17, 0.72);
    border: 1.5px solid rgba(46, 255, 59, 0.48);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 32px rgba(46, 255, 59, 0.22);
    animation: stickerPopIn 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.image-lightbox-img {
    max-width: 86vw;
    max-height: 76vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 14px;
    display: block;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.image-lightbox-caption {
    font-size: 0.86rem;
    font-weight: 600;
    color: #E2F8EC;
    letter-spacing: 0.3px;
    text-align: center;
    max-width: 80vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-lightbox-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid rgba(46, 255, 59, 0.65);
    background: #06210F;
    color: #2EFF3B;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 14px rgba(46, 255, 59, 0.4);
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    z-index: 5;
}

.image-lightbox-close:hover {
    transform: scale(1.1) rotate(90deg);
    background: #2EFF3B;
    color: #06210F;
    box-shadow: 0 0 22px rgba(46, 255, 59, 0.75);
}


/* ============================================================
   INTERFAZ ESENCIAL (PUENTE TRANSLINGÜE) Y PANEL PRO INVISIBLE
   ============================================================ */

/* Protagonismo del Motor Translingüe (Selectores de Origen y Destino) */
.language-controls.translingual-bridge-bar {
    max-width: 680px;
    margin: 0 auto 0.95rem;
    padding: 8px 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(46, 255, 59, 0.12) 0%, rgba(0, 201, 167, 0.08) 50%, rgba(46, 255, 59, 0.12) 100%);
    border: 1.5px solid rgba(46, 255, 59, 0.42);
    box-shadow: 0 4px 18px rgba(46, 255, 59, 0.14), inset 0 1px 2px rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

body.dark-mode .language-controls.translingual-bridge-bar {
    background: linear-gradient(90deg, rgba(46, 255, 59, 0.10) 0%, rgba(6, 33, 15, 0.65) 50%, rgba(46, 255, 59, 0.10) 100%);
    border-color: rgba(46, 255, 59, 0.48);
    box-shadow: 0 4px 22px rgba(46, 255, 59, 0.2);
}

.bridge-engine-badge {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(46, 255, 59, 0.24);
    color: var(--cyber-deep);
    border: 1px solid rgba(46, 255, 59, 0.5);
    box-shadow: 0 0 10px rgba(46, 255, 59, 0.25);
    white-space: nowrap;
}

body.dark-mode .bridge-engine-badge {
    color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.14);
}

/* Barra de Entrada Esencial Minimalista */
.essential-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 4px;
}

/* Botón Sutil y Discreto de Acceso al Panel Pro Invisible */
.btn-pro-modular-trigger {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px dashed rgba(46, 255, 59, 0.42);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    opacity: 0.72;
    transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-pro-modular-trigger:hover,
.btn-pro-modular-trigger.active {
    opacity: 1;
    border-style: solid;
    border-color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.18);
    color: var(--cyber-deep);
    box-shadow: 0 0 14px rgba(46, 255, 59, 0.38);
    transform: rotate(90deg) scale(1.06);
}

body.dark-mode .btn-pro-modular-trigger:hover,
body.dark-mode .btn-pro-modular-trigger.active {
    color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.14);
}

/* Panel Pro Modular Flotante */
.attach-floating-menu.pro-modular-panel {
    left: 0;
    width: min(410px, 92vw);
}

.pro-modular-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.attach-item-span-full {
    grid-column: 1 / -1;
}

.attach-icon-stickers {
    background: linear-gradient(135deg, rgba(46, 255, 59, 0.34) 0%, rgba(0, 201, 167, 0.22) 100%);
    color: var(--cyber-deep);
}

@media (max-width: 560px) {
    .pro-modular-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   CAMPANITA PEDAGÓGICA (TUTOR GABRIVO) Y MODAL DE JERGA CULTURAL
   ============================================================ */

.bubble-actions {
    margin-top: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-tutor-gabrivo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.71rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--cyber-deep);
    background: linear-gradient(135deg, rgba(46, 255, 59, 0.16) 0%, rgba(0, 201, 167, 0.12) 100%);
    border: 1px solid rgba(46, 255, 59, 0.48);
    padding: 0.28rem 0.68rem;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(46, 255, 59, 0.14);
    transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

body.dark-mode .btn-tutor-gabrivo {
    color: var(--cyber-green);
    background: linear-gradient(135deg, rgba(46, 255, 59, 0.14) 0%, rgba(0, 201, 167, 0.08) 100%);
    border-color: rgba(46, 255, 59, 0.52);
}

.btn-tutor-gabrivo:hover {
    transform: translateY(-1px) scale(1.03);
    background: linear-gradient(135deg, rgba(46, 255, 59, 0.32) 0%, rgba(0, 201, 167, 0.22) 100%);
    border-color: var(--cyber-green);
    box-shadow: 0 0 16px rgba(46, 255, 59, 0.42);
}

.btn-tutor-gabrivo .tutor-bell-svg {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.btn-tutor-gabrivo:hover .tutor-bell-svg {
    animation: tutorBellRing 0.55s ease-in-out;
}

@keyframes tutorBellRing {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(16deg); }
    50%      { transform: rotate(-14deg); }
    75%      { transform: rotate(8deg); }
}

/* Mini Modal Flotante de Explicación Cultural (Tutor GABRIVO) */
.tutor-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 920;
    background: rgba(4, 16, 10, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: lightboxFadeIn 0.2s ease;
}

.tutor-cultural-card {
    width: min(460px, 94vw);
    border-radius: 22px;
    padding: 20px 22px;
    background: var(--surface-white);
    border: 1.5px solid rgba(46, 255, 59, 0.52);
    box-shadow: var(--shadow-card), 0 20px 50px rgba(6, 33, 15, 0.28), 0 0 28px rgba(46, 255, 59, 0.22);
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: stickerPopIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.tutor-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
}

.tutor-header-badge-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tutor-bell-badge {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2EFF3B 0%, #00C9A7 100%);
    color: #06210F;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 14px rgba(46, 255, 59, 0.45);
}

.tutor-modal-title {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--text-primary);
}

.tutor-lang-pair {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--cyber-deep);
}

body.dark-mode .tutor-lang-pair {
    color: var(--cyber-green);
}

.tutor-phrase-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 500px) {
    .tutor-phrase-comparison {
        grid-template-columns: 1fr;
    }
}

.tutor-phrase-box {
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--surface-subtle);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tutor-target-box {
    background: linear-gradient(135deg, rgba(46, 255, 59, 0.12) 0%, rgba(0, 201, 167, 0.08) 100%);
    border-color: rgba(46, 255, 59, 0.45);
}

.tutor-box-label {
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.7px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.tutor-target-box .tutor-box-label {
    color: var(--cyber-deep);
}

body.dark-mode .tutor-target-box .tutor-box-label {
    color: var(--cyber-green);
}

.tutor-box-text {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.tutor-cultural-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tutor-insight-section {
    padding: 11px 14px;
    border-radius: 14px;
    background: var(--surface-subtle);
    border-left: 3px solid var(--cyber-green);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tutor-nuance-section {
    border-left-color: #00C9A7;
}

.tutor-insight-tag {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--cyber-deep);
}

body.dark-mode .tutor-insight-tag {
    color: var(--cyber-green);
}

.tutor-insight-text {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-primary);
}


/* ============================================================
   COMUNIDAD · GABRIVO (INTERCAMBIO CULTURAL Y PUENTE TRANSLINGÜE)
   ============================================================ */

.attach-icon-community {
    background: linear-gradient(135deg, rgba(46, 255, 59, 0.36) 0%, rgba(0, 201, 167, 0.28) 100%);
    color: var(--cyber-deep);
}

.community-modal-card {
    width: min(760px, 95vw);
    max-height: 86vh;
    border-radius: 24px;
    padding: 22px 24px;
    background: var(--surface-white);
    border: 1.5px solid rgba(46, 255, 59, 0.5);
    box-shadow: var(--shadow-card), 0 24px 60px rgba(6, 33, 15, 0.32), 0 0 32px rgba(46, 255, 59, 0.2);
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: stickerPopIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.community-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.community-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.community-header-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.community-subtitle {
    margin: 3px 0 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.community-filters-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1.25fr;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--surface-subtle);
    border: 1px solid var(--border-subtle);
}

@media (max-width: 660px) {
    .community-filters-bar {
        grid-template-columns: 1fr;
    }
}

.community-filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.community-filter-item label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--cyber-deep);
}

body.dark-mode .community-filter-item label {
    color: var(--cyber-green);
}

.community-filter-item select,
.community-filter-item input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-white);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.community-filter-item select:focus,
.community-filter-item input:focus {
    border-color: var(--cyber-green);
    box-shadow: 0 0 10px rgba(46, 255, 59, 0.22);
}

.community-profiles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    overflow-y: auto;
    padding: 2px 4px 6px 2px;
    max-height: 52vh;
}

@media (max-width: 640px) {
    .community-profiles-grid {
        grid-template-columns: 1fr;
    }
}

.community-profile-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--surface-subtle);
    border: 1px solid var(--border-subtle);
    transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.community-profile-card:hover {
    transform: translateY(-2px);
    border-color: var(--cyber-green);
    box-shadow: 0 6px 20px rgba(46, 255, 59, 0.16);
}

.comm-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comm-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2EFF3B 0%, #00C9A7 100%);
    color: #06210F;
    font-weight: 800;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(46, 255, 59, 0.35);
}

.comm-user-meta {
    flex: 1;
    min-width: 0;
}

.comm-user-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.comm-user-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.comm-country-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.comm-lang-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.comm-pill {
    font-size: 0.67rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(46, 255, 59, 0.18);
    color: var(--cyber-deep);
    border: 1px solid rgba(46, 255, 59, 0.42);
}

body.dark-mode .comm-pill {
    color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.12);
}

.comm-pill-learn {
    background: rgba(0, 201, 167, 0.16);
    border-color: rgba(0, 201, 167, 0.45);
}

.comm-bio {
    margin: 0;
    font-size: 0.79rem;
    line-height: 1.42;
    color: var(--text-secondary);
}

.btn-connect-bridge {
    width: 100%;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1.5px solid rgba(46, 255, 59, 0.55);
    background: linear-gradient(135deg, rgba(46, 255, 59, 0.24) 0%, rgba(0, 201, 167, 0.16) 100%);
    color: var(--cyber-deep);
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.dark-mode .btn-connect-bridge {
    color: var(--cyber-green);
    background: linear-gradient(135deg, rgba(46, 255, 59, 0.16) 0%, rgba(0, 201, 167, 0.10) 100%);
}

.btn-connect-bridge:hover {
    background: var(--cyber-green);
    color: #06210F !important;
    box-shadow: 0 0 16px rgba(46, 255, 59, 0.5);
    transform: translateY(-1px);
}


/* ============================================================
   PUENTE TRANSLINGÜE RETRÁCTIL INTELIGENTE (FOCO / ENVÍO)
   ============================================================ */

.chat-footer {
    position: relative;
    overflow: visible !important;
    z-index: 80;
}

.language-controls.translingual-bridge-bar {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    right: 0;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    width: calc(100% - 2.4rem);
    max-width: 780px;
    box-sizing: border-box;
    transform: translateY(0) scale(1);
    z-index: 185;
    height: auto !important;
    min-height: 56px;
    max-height: none !important;
    padding: 12px 18px !important;
    border-radius: 22px;
    /* MODO CLARO: Fondo blanco/claro translúcido con bordes verdes y texto oscuro legible */
    background-color: rgba(255, 255, 255, 0.96);
    background-image: linear-gradient(90deg, rgba(46, 255, 59, 0.10) 0%, rgba(208, 245, 227, 0.38) 50%, rgba(46, 255, 59, 0.10) 100%);
    border: 1.5px solid rgba(46, 255, 59, 0.55);
    box-shadow: var(--shadow-card), 0 12px 32px rgba(15, 23, 42, 0.10), 0 0 20px rgba(46, 255, 59, 0.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 14px;
    opacity: 1;
    visibility: visible;
    overflow: visible !important;
    pointer-events: auto;
    transition: opacity 0.24s ease,
                visibility 0.24s ease,
                transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.25s ease,
                border-color 0.25s ease,
                box-shadow 0.24s ease;
}

.language-controls.translingual-bridge-bar .bridge-engine-badge {
    color: var(--cyber-deep);
    background: rgba(46, 255, 59, 0.22);
    border: 1px solid rgba(6, 95, 70, 0.38);
}

.language-controls.translingual-bridge-bar .lang-label {
    color: var(--cyber-deep);
    font-weight: 800;
}

.language-controls.translingual-bridge-bar .lang-selector select {
    background: #FFFFFF;
    color: var(--text-primary);
    border: 1px solid rgba(6, 95, 70, 0.28);
    padding: 0.4rem 0.7rem;
    border-radius: 10px;
    font-weight: 600;
}

.language-controls.translingual-bridge-bar .btn-collapse-bridge {
    color: var(--cyber-deep);
    border-color: rgba(6, 95, 70, 0.28);
    background: rgba(46, 255, 59, 0.10);
}

/* MODO OSCURO: Fondo oscuro translúcido con neón verde original */
body.dark-mode .language-controls.translingual-bridge-bar {
    background-color: rgba(8, 19, 13, 0.95);
    background-image: linear-gradient(90deg, rgba(46, 255, 59, 0.14) 0%, rgba(6, 33, 15, 0.76) 50%, rgba(46, 255, 59, 0.14) 100%);
    border-color: rgba(46, 255, 59, 0.65);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 28px rgba(46, 255, 59, 0.32);
}

body.dark-mode .language-controls.translingual-bridge-bar .bridge-engine-badge {
    color: #2EFF3B;
    background: rgba(46, 255, 59, 0.16);
    border-color: rgba(46, 255, 59, 0.55);
}

body.dark-mode .language-controls.translingual-bridge-bar .lang-label {
    color: #A7F3D0;
}

body.dark-mode .language-controls.translingual-bridge-bar .lang-selector select {
    background: rgba(6, 22, 14, 0.92);
    color: #F0FDF4;
    border-color: rgba(46, 255, 59, 0.48);
}

body.dark-mode .language-controls.translingual-bridge-bar .btn-collapse-bridge {
    color: #A7F3D0;
    border-color: rgba(46, 255, 59, 0.42);
    background: rgba(46, 255, 59, 0.08);
}

.language-controls.translingual-bridge-bar.bridge-retracted {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(16px) scale(0.97) !important;
    pointer-events: none !important;
    box-shadow: none !important;
}

.btn-collapse-bridge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.72rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.btn-collapse-bridge:hover {
    border-color: var(--cyber-green);
    color: var(--text-primary);
    background: rgba(46, 255, 59, 0.18);
    transform: scale(1.08);
}

/* Micro-píldora sutil en la barra de entrada para alternar manualmente el Puente Translingüe */
.btn-toggle-bridge-mini {
    height: 30px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid rgba(46, 255, 59, 0.38);
    background: rgba(46, 255, 59, 0.10);
    color: var(--cyber-deep);
    font-family: 'Outfit', sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

body.dark-mode .btn-toggle-bridge-mini {
    color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.08);
}

.btn-toggle-bridge-mini:hover,
.btn-toggle-bridge-mini.active {
    border-color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.24);
    box-shadow: 0 0 12px rgba(46, 255, 59, 0.32);
    transform: translateY(-1px);
}

/* ============================================================
   SEPARADORES DE FECHA INTELIGENTES (Hoy / Ayer / Fecha legible)
   Estética Cyber/Organic sincronizada con Modo Claro y Modo Oscuro
   ============================================================ */
.chat-date-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 12px 0 6px;
    position: relative;
    z-index: 2;
    user-select: none;
    pointer-events: none;
}

.chat-date-separator::before,
.chat-date-separator::after {
    content: "";
    flex: 1;
    max-width: 90px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.26), transparent);
}

.chat-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 13px;
    margin: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(16, 185, 129, 0.34);
    box-shadow: 0 4px 14px rgba(6, 95, 70, 0.07);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--cyber-deep);
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.chat-date-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.55);
    flex-shrink: 0;
}

/* MODO OSCURO: Tono translúcido oscuro con bordes y destello verde neón sutil */
body.dark-mode .chat-date-separator::before,
body.dark-mode .chat-date-separator::after {
    background: linear-gradient(90deg, transparent, rgba(46, 255, 59, 0.25), transparent);
}

body.dark-mode .chat-date-pill {
    background: rgba(8, 20, 14, 0.86);
    border-color: rgba(46, 255, 59, 0.32);
    color: #A7F3D0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), inset 0 0 10px rgba(46, 255, 59, 0.06);
}

body.dark-mode .chat-date-dot {
    background: var(--cyber-green);
    box-shadow: 0 0 7px rgba(46, 255, 59, 0.78);
}

/* ============================================================
   INTERACCIÓN POR VOZ (SPEECH-TO-TEXT) · PUSH-TO-TALK Y PULSO NEÓN
   ============================================================ */
.btn-send.btn-dynamic-action {
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.btn-send.btn-dynamic-action.dictating-active,
.btn-send.btn-dynamic-action.ptt-holding {
    background: linear-gradient(135deg, #2EFF3B 0%, #00E5FF 100%) !important;
    color: #06210F !important;
    border: 2px solid #2EFF3B !important;
    animation: micNeonDictatePulse 1.15s ease-in-out infinite !important;
}

.btn-send.btn-dynamic-action.ptt-holding {
    transform: scale(1.12) !important;
    box-shadow: 0 0 26px rgba(46, 255, 59, 0.95), 0 0 46px rgba(0, 229, 255, 0.58) !important;
}

.btn-send.btn-dynamic-action.dictating-active .action-icon-mic {
    opacity: 1 !important;
    transform: scale(1.06) rotate(0deg) !important;
    animation: micIconBeat 0.9s ease-in-out infinite alternate !important;
}

.btn-send.btn-dynamic-action.dictating-active .action-icon-send {
    opacity: 0 !important;
    transform: scale(0.4) rotate(-35deg) !important;
}

.btn-send.btn-dynamic-action.dictating-active .mic-holo-ring {
    opacity: 1 !important;
    border-color: #2EFF3B !important;
    animation: micHoloWave 1.35s cubic-bezier(0.16, 1, 0.3, 1) infinite !important;
}

@keyframes micNeonDictatePulse {
    0%, 100% {
        box-shadow: 0 0 16px rgba(46, 255, 59, 0.75), 0 0 28px rgba(0, 229, 255, 0.38);
        transform: scale(1.03);
    }
    50% {
        box-shadow: 0 0 28px rgba(46, 255, 59, 0.98), 0 0 44px rgba(0, 229, 255, 0.62);
        transform: scale(1.09);
    }
}

.essential-input-container.dictating-input-glow #messageInput {
    border-color: rgba(46, 255, 59, 0.65);
    box-shadow: 0 0 14px rgba(46, 255, 59, 0.22);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* ============================================================
   CONTROL DE VELOCIDAD DE AUDIO TRADUCIDO (1.0x / 0.75x / 0.5x)
   Estética minimalista Cyber/Organic (Modo Claro y Modo Oscuro)
   ============================================================ */
.translation-main-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.translation-text-content {
    flex: 1;
    line-height: 1.45;
}

.audio-speed-control {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px dashed rgba(16, 185, 129, 0.28);
    width: 100%;
}

.audio-speed-control.voice-note-speed {
    margin-top: 6px;
    padding-top: 5px;
    justify-content: flex-end;
}

.audio-speed-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
    margin-right: 2px;
}

.speed-opt-btn {
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(16, 185, 129, 0.35);
    background: rgba(255, 255, 255, 0.85);
    color: var(--cyber-deep);
    font-family: 'Outfit', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    line-height: 1.3;
}

.speed-opt-btn:hover {
    border-color: var(--cyber-green);
    background: rgba(46, 255, 59, 0.16);
    transform: translateY(-1px);
}

.speed-opt-btn.active {
    background: var(--cyber-green);
    color: #06210F;
    border-color: #1EC92B;
    box-shadow: 0 0 10px rgba(46, 255, 59, 0.42);
}

body.dark-mode .audio-speed-control {
    border-top-color: rgba(46, 255, 59, 0.22);
}

body.dark-mode .audio-speed-label {
    color: #A7F3D0;
}

body.dark-mode .speed-opt-btn {
    background: rgba(8, 22, 15, 0.88);
    color: #A7F3D0;
    border-color: rgba(46, 255, 59, 0.34);
}

body.dark-mode .speed-opt-btn:hover {
    border-color: var(--cyber-green);
    color: #FFFFFF;
    background: rgba(46, 255, 59, 0.18);
}

body.dark-mode .speed-opt-btn.active {
    background: var(--cyber-green);
    color: #06210F;
    border-color: var(--cyber-green);
    box-shadow: 0 0 12px rgba(46, 255, 59, 0.55);
}

/* ==========================================================================
   MODAL DE REGISTRO / ONBOARDING INICIAL (#onboarding-modal) Y AÑADIR CONTACTO RÁPIDO
   ========================================================================== */
.sidebar-search-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.sidebar-search-row .search-input {
    flex: 1;
    min-width: 0;
}

.btn-sidebar-add-contact {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 12px;
    border: 1px solid rgba(46, 255, 59, 0.55);
    background: linear-gradient(135deg, rgba(46, 255, 59, 0.22) 0%, rgba(0, 201, 167, 0.18) 100%);
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(46, 255, 59, 0.2);
    transition: all 0.22s ease;
    flex-shrink: 0;
}

.btn-sidebar-add-contact:hover {
    background: var(--cyber-green);
    color: #06210F;
    box-shadow: 0 0 16px rgba(46, 255, 59, 0.55);
    transform: translateY(-1px);
}

body.dark-mode .btn-sidebar-add-contact {
    background: rgba(6, 33, 15, 0.85);
    color: #2EFF3B;
    border-color: rgba(46, 255, 59, 0.6);
}

body.dark-mode .btn-sidebar-add-contact:hover {
    background: var(--cyber-green);
    color: #06210F;
}

.user-phone-sub {
    font-size: 0.74rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.onboarding-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    background: rgba(5, 22, 12, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-sizing: border-box;
    animation: fadeInOnboarding 0.3s ease;
}

@keyframes fadeInOnboarding {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

.onboarding-modal-card {
    width: 100%;
    max-width: 430px;
    max-height: 92dvh;
    overflow-y: auto;
    padding: 1.9rem 1.8rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    border: 1.5px solid rgba(46, 255, 59, 0.55);
    box-shadow: 0 24px 60px rgba(5, 28, 13, 0.45), 0 0 28px rgba(46, 255, 59, 0.25);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-sizing: border-box;
    color: #0F172A;
}

body.dark-mode .onboarding-modal-card {
    background: rgba(8, 24, 15, 0.96);
    color: #F8FAFC;
    border-color: rgba(46, 255, 59, 0.65);
    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.75), 0 0 32px rgba(46, 255, 59, 0.28);
}

.onboarding-brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
}

.onboarding-logo {
    margin-bottom: 0.2rem;
}

.onboarding-badge {
    display: inline-block;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    background: rgba(46, 255, 59, 0.16);
    color: #065F46;
    border: 1px solid rgba(46, 255, 59, 0.45);
}

body.dark-mode .onboarding-badge {
    background: rgba(46, 255, 59, 0.15);
    color: #2EFF3B;
}

.onboarding-title {
    margin: 0.15rem 0 0;
    font-size: 1.32rem;
    font-weight: 700;
    color: inherit;
}

.onboarding-subtitle {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.onboarding-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.onboarding-avatar-preview {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2EFF3B 0%, #00C9A7 100%);
    color: #06210F;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 22px rgba(46, 255, 59, 0.42);
    border: 2px solid #FFFFFF;
}

.onboarding-avatar-presets {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
}

.onboarding-avatar-chip {
    padding: 0.32rem 0.68rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-subtle);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.onboarding-avatar-chip:hover,
.onboarding-avatar-chip.active {
    background: var(--cyber-green);
    color: #06210F;
    border-color: var(--cyber-green);
    box-shadow: 0 0 12px rgba(46, 255, 59, 0.4);
}

.onboarding-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

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

.onboarding-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 0.95rem;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-subtle);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.onboarding-field input:focus {
    border-color: var(--cyber-green);
    box-shadow: 0 0 0 3px rgba(46, 255, 59, 0.22);
}

.onboarding-error {
    font-size: 0.8rem;
    font-weight: 600;
    color: #EF4444;
    text-align: center;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-onboarding-enter {
    width: 100%;
    padding: 0.88rem 1.2rem;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #2EFF3B 0%, #00C9A7 100%);
    color: #06210F;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(46, 255, 59, 0.38);
    transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.btn-onboarding-enter:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 26px rgba(46, 255, 59, 0.52);
}

.btn-onboarding-enter:active {
    transform: scale(0.98);
}

/* ==========================================================================
   COMPORTAMIENTO ESTILO WHATSAPP WEB EN ESCRITORIO (PANTALLA COMPLETA Y MEDIA PANTALLA)
   ========================================================================== */
#mobile-back-btn,
.mobile-only-back {
    display: none !important;
}

@media only screen and (min-width: 501px), only screen and (hover: hover) and (pointer: fine) {
    .app-layout {
        display: flex !important;
        flex-direction: row !important;
    }

    .app-layout .sidebar,
    .app-layout.mobile-chat-open .sidebar,
    .app-layout:not(.mobile-chat-open) .sidebar {
        display: flex !important;
    }

    .app-layout .chat-area,
    .app-layout.mobile-chat-open .chat-area,
    .app-layout:not(.mobile-chat-open) .chat-area {
        display: flex !important;
        flex: 1 !important;
        min-width: 0 !important;
    }

    #mobile-back-btn,
    .mobile-only-back {
        display: none !important;
    }
}

/* Adaptación elástica de dos columnas en ventana de ordenador a media pantalla (501px - 1024px) */
@media only screen and (min-width: 501px) and (max-width: 1024px), only screen and (hover: hover) and (pointer: fine) and (max-width: 1024px) {
    .app-layout {
        display: flex !important;
        flex-direction: row !important;
        width: 100vw;
        height: 100vh;
        overflow: hidden;
    }

    .sidebar {
        width: 38% !important;
        min-width: 240px !important;
        max-width: 360px !important;
        flex-shrink: 0 !important;
    }

    .sidebar-header {
        padding: 1.4rem 1.1rem 1rem;
    }

    .contact-info,
    .config-summary {
        min-width: 0;
        flex: 1;
        overflow: hidden;
    }

    .contact-name,
    .contact-status,
    .user-name {
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
    }

    .chat-area {
        flex: 1 !important;
        min-width: 0 !important;
    }

    .chat-header {
        padding: 0.9rem 1.2rem;
    }

    .header-contact-trigger,
    .active-contact {
        min-width: 0;
    }

    .active-name,
    .active-desc {
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
    }

    .chat-window {
        padding: 1.2rem 1.1rem;
    }

    .chat-footer {
        padding: 0.9rem 1.1rem 1.2rem;
    }
}

/* ==========================================================================
   AISLAMIENTO EXCLUSIVO PARA SMARTPHONES TÁCTILES REALES (<= 500px)
   ========================================================================== */
@media only screen and (max-width: 500px) and (hover: none) and (pointer: coarse) {
    html, body {
        width: 100vw !important;
        height: 100dvh !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .app-layout {
        width: 100vw !important;
        height: 100dvh !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        overflow: hidden !important;
    }

    /* Vista por defecto en smartphone: Lista de Chats a pantalla completa */
    .app-layout:not(.mobile-chat-open) .sidebar {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100dvh !important;
        flex: 1 1 100% !important;
        border-right: none !important;
        box-sizing: border-box !important;
    }

    .app-layout:not(.mobile-chat-open) .chat-area {
        display: none !important;
    }

    /* Vista activa de Conversación en smartphone: Chat a pantalla completa */
    .app-layout.mobile-chat-open .sidebar {
        display: none !important;
    }

    .app-layout.mobile-chat-open .chat-area {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100dvh !important;
        flex: 1 1 100% !important;
        box-sizing: border-box !important;
    }

    /* Botón Volver visible únicamente en smartphone real */
    #mobile-back-btn,
    .mobile-only-back {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        margin-right: 8px !important;
        border-radius: 50% !important;
        border: 1px solid rgba(46, 255, 59, 0.45) !important;
        background: rgba(46, 255, 59, 0.12) !important;
        color: var(--text-primary) !important;
        font-size: 1.2rem !important;
        font-weight: 700 !important;
        line-height: 1 !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        box-shadow: 0 2px 10px rgba(46, 255, 59, 0.18) !important;
        transition: transform 0.18s ease, background 0.2s ease !important;
    }

    body.dark-mode #mobile-back-btn,
    body.dark-mode .mobile-only-back {
        background: rgba(6, 33, 15, 0.85) !important;
        color: #2EFF3B !important;
        border-color: rgba(46, 255, 59, 0.6) !important;
    }

    #mobile-back-btn:active {
        transform: scale(0.92) !important;
    }

    /* Ajuste táctil de cabecera y área de mensajes */
    .chat-header {
        width: 100% !important;
        padding: 0.7rem 0.9rem !important;
        box-sizing: border-box !important;
    }

    .header-content {
        width: 100% !important;
        gap: 6px !important;
    }

    .header-contact-trigger {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .active-contact {
        min-width: 0 !important;
    }

    .active-name,
    .active-desc {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .video-label {
        display: none !important;
    }

    .chat-window {
        width: 100% !important;
        padding: 1rem 0.85rem !important;
        box-sizing: border-box !important;
    }

    .message-sent,
    .message-received {
        max-width: 88% !important;
    }

    /* Barra inferior de entrada, Puente Translingüe y botón de micrófono táctiles al 100% */
    .chat-footer {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.55rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px)) !important;
        box-sizing: border-box !important;
    }

    .language-controls.translingual-bridge-bar {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        padding: 0.8rem 0.85rem !important;
        box-sizing: border-box !important;
        gap: 0.5rem !important;
    }

    .language-controls.translingual-bridge-bar .lang-selector {
        flex: 1 1 auto !important;
        min-width: 110px !important;
    }

    .language-controls.translingual-bridge-bar .lang-selector select {
        width: 100% !important;
        min-height: 38px !important;
        font-size: 0.9rem !important;
    }

    .input-panel.essential-input-panel {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.4rem 0.55rem !important;
        box-sizing: border-box !important;
    }

    .input-container.essential-input-container {
        width: 100% !important;
        max-width: 100% !important;
        gap: 0.45rem !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }

    .btn-pro-modular-trigger {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        flex-shrink: 0 !important;
    }

    .btn-toggle-bridge-mini {
        min-height: 36px !important;
        padding: 0 0.65rem !important;
        font-size: 0.76rem !important;
        flex-shrink: 0 !important;
    }

    .input-container.essential-input-container textarea#messageInput {
        flex: 1 1 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        font-size: 16px !important;
        padding: 0.55rem 0.6rem !important;
        box-sizing: border-box !important;
    }

    #sendBtn.btn-dynamic-action {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        flex-shrink: 0 !important;
    }
}
