/* ==============================================================
   CIRUGÍA DE TEMAS: Variables Dinámicas (Globales)
   ============================================================== */
:root {
    /* Variables por defecto (Tema Oscuro - Deep Night) */
    --bg-main: #131314;
    --bg-side: #1e1f20;
    --bg-card: #1e1f20;
    --bg-card-hover: #333537;
    --bg-user-msg: #2b2c2f;
    --text-main: #e3e3e3;
    --text-dim: #9aa0a6;
    --border: #3c4043;
    --blue: #8ab4f8;
    --green: #4caf50;
    --grad: linear-gradient(90deg, #4285f4, #9b72cb, #d96570);
    
    /* Variables Panel Settings Pro */
    --set-bg: #1e1f20;
    --set-side: #131314;
    --set-input: #131314;
}

[data-theme="light"] {
    /* Variables Tema Claro (Studio White) */
    --bg-main: #f8f9fa;
    --bg-side: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f3f4;
    --bg-user-msg: #e8eaed;
    --text-main: #202124;
    --text-dim: #5f6368;
    --border: #dadce0;
    --blue: #1a73e8;
    --green: #2e7d32;
    --grad: linear-gradient(90deg, #1a73e8, #7b1fa2, #d32f2f);
    
    --set-bg: #ffffff;
    --set-side: #f8f9fa;
    --set-input: #ffffff;
}

/* Forzar que todos los elementos tengan transiciones suaves para evitar el salto brusco */
*, *::before, *::after { 
    font-family: 'Google Sans', sans-serif !important; 
    scrollbar-width: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* CIRUGÍA: Transiciones suaves para el cambio de tema */
body, html { 
    margin: 0; padding: 0; height: 100%; 
    background: var(--bg-main); 
    color: var(--text-main); 
    overflow: hidden; 
    opacity: 1;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body.app-ready {
    opacity: 1 !important;
}

/* --- ESTRUCTURA GENERAL (TECHO Y CUERPO) --- */
.app-container { 
    display: flex; 
    flex-direction: column; 
    height: 100vh; 
    width: 100vw; 
}

/* LA BARRA SUPERIOR */
.top-header { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 0; background: var(--bg-main); height: 60px; box-sizing: border-box;
    border-bottom: 1px solid var(--border); 
    overflow: visible !important; 
}

.header-left { 
    display: flex; align-items: center; justify-content: space-between; 
    width: 304px; height: 100%; padding: 0 15px 0 20px; 
    background: var(--bg-side); position: relative; box-sizing: border-box; 
}

.header-center { flex: 1; text-align: left; display: flex; align-items: center; justify-content: flex-start; padding-left: 20px; box-sizing: border-box; height: 100%; } 

.header-right { 
    width: 380px; height: 100%; padding-right: 20px; 
    background: var(--bg-side); display: flex; justify-content: flex-end; align-items: center; box-sizing: border-box;
    overflow: visible !important; 
} 

.brand-title { font-size: 1.4rem; font-weight: 500; color: var(--text-main); margin: 0; }

.search-btn-gemini { background: transparent; border: none; color: var(--text-dim); height: 48px; width: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; margin: 0; }
.search-btn-gemini:hover { background: var(--bg-card-hover); }
.search-btn-gemini svg { width: 20px; height: 20px; }

.search-container { position: absolute; right: 60px; top: 50%; transform: translateY(-50%); width: 190px; padding: 0; z-index: 10; }
.search-container input { background: var(--bg-user-msg); border: 1px solid var(--border); color: var(--text-main); border-radius: 20px; padding: 10px 15px; width: 100%; box-sizing: border-box; outline: none; font-size: 0.85rem; }

.user-avatar { width: 32px; height: 32px; background: var(--blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: bold; cursor: pointer; }

.icon-btn { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 1.4rem; padding: 10px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.icon-btn:hover { background: var(--bg-card-hover); }

/* EL CUERPO PRINCIPAL */
.main-body { display: flex; flex: 1; overflow: hidden; }

/* --- SIDEBAR IZQUIERDA --- */
.sidebar { width: 280px; background: var(--bg-side); display: flex; flex-direction: column; padding: 12px; transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; border-right: 1px solid var(--border); }
.sidebar.collapsed { width: 72px; padding: 12px 8px; }
.sidebar.collapsed span, .sidebar.collapsed .history-label, .sidebar.collapsed .search-container, .sidebar.collapsed .history-section { display: none; }

.new-chat-pill, .nav-pill { background: var(--bg-main); border: 1px solid var(--border); color: var(--text-main); padding: 10px 16px; border-radius: 25px; display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 10px 5px; font-size: 0.9rem; font-weight: 500; transition: all 0.2s; white-space: nowrap; }
.sidebar.collapsed .new-chat-pill, .sidebar.collapsed .nav-pill { width: 48px; height: 48px; padding: 0; justify-content: center; border-radius: 50%; margin: 10px auto; border: none; }
.nav-pill { background: transparent; border: none; }
.new-chat-pill:hover, .nav-pill:hover { background: var(--bg-card-hover); }

.history-section { flex: 1; overflow-y: auto; }
.history-label { font-size: 0.7rem; color: var(--text-dim); padding: 20px 10px 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.hist-item { padding: 10px 15px; font-size: 0.85rem; border-radius: 12px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-main); transition: 0.2s; }
.hist-item:hover { background: var(--bg-card-hover); padding-left: 20px; }

/* --- ZONA CENTRAL --- */
.main-content { flex: 1; display: flex; flex-direction: column; position: relative; min-width: 0; background: var(--bg-main); }
.view-port { flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; }
.content-container { width: 100%; max-width: 820px; padding: 20px; box-sizing: border-box; }

.welcome-title { font-size: 3.2rem; font-weight: 500; margin-top: 12vh; text-align: center; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 50px; }
.card { background: var(--bg-card); padding: 20px; border-radius: 16px; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; justify-content: space-between; min-height: 100px; border: 1px solid var(--border); }
.card:hover { background: var(--bg-card-hover); border-color: var(--blue); }

.welcome-card { 
    display: flex; 
    align-items: center; 
    background-color: var(--bg-card-hover); 
    border-radius: 24px; 
    padding: 20px 30px; 
    transition: background-color 0.3s ease, color 0.3s ease; 
}

/* --- COLUMNA DERECHA (REDISEÑO V5) --- */
.right-panel { width: 380px; background: var(--bg-side); display: flex; flex-direction: column; height: 100%; border-left: 1px solid var(--border); }

/* HUB DE SELECCIÓN SUPERIOR */
#sonodit-selection-hub {
    background: var(--bg-side);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.hub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

#hub-clear {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 14px;
    transition: color 0.2s;
}
#hub-clear:hover { color: var(--blue); }

.hub-slots { display: flex; gap: 8px; width: 100%; }
.hub-slot {
    flex: 1;
    background: var(--bg-main);
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 8px;
    font-size: 0.65rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
}

.hub-slot.filled {
    border-style: solid;
    border-color: var(--blue);
    background: rgba(138, 180, 248, 0.08);
    color: var(--blue);
}

/* NAVEGACIÓN POR PESTAÑAS */
.sonodit-nav-tabs {
    display: flex;
    padding: 5px 10px 0;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover { color: var(--text-main); }

.tab-btn.active {
    color: var(--blue);
    border-bottom: 2px solid var(--blue);
}

#search-wrapper { padding: 12px 20px; }
#universal-search {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    outline: none;
}
#universal-search:focus { border-color: var(--blue); }

/* ESTILO MINI-CARD (CEREBRO V5) */
.audio-list { padding: 10px 20px; overflow-y: auto; flex: 1; }
.audio-card {
    background: var(--bg-main);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 6px;
    transition: 0.2s;
}
.audio-card:hover { background: var(--bg-card-hover); }
.audio-card.selected-card {
    border-color: var(--blue);
    background: rgba(138, 180, 248, 0.05);
}

.card-top { display: flex; align-items: center; gap: 10px; }
.play-btn-mini {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--blue); border: none; color: #000;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 0.7rem;
}

.card-info { flex: 1; overflow: hidden; }
.card-title { font-size: 0.75rem; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-cat { font-size: 0.6rem; color: var(--blue); text-transform: uppercase; font-weight: 700; margin-top: 2px; }

.select-btn {
    background: transparent; border: 1px solid var(--border);
    color: var(--text-dim); font-size: 0.65rem; padding: 4px 10px;
    border-radius: 15px; cursor: pointer; transition: 0.2s;
}
.select-btn:hover { border-color: var(--blue); color: var(--text-main); }
.selected-card .select-btn { background: var(--blue); border-color: var(--blue); color: #000; font-weight: 700; }

.wave-box { width: 100%; height: 15px; margin-top: 6px; opacity: 0.5; }

/* MODULOS DE CONTENIDO */
.panel-module { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* --- OTROS ESTILOS EXISTENTES --- */
.section-title { font-size: 2.2rem; font-weight: 400; margin-bottom: 30px; }
.spots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; padding-bottom: 50px; width: 100%; }
.spot-card { position: relative; height: 220px; background-color: var(--bg-card); background-size: cover; background-position: center; border-radius: 20px; border: 1px solid var(--border); overflow: hidden; cursor: pointer; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease; }
.spot-card:hover { transform: translateY(-5px) scale(1.02); border-color: var(--blue); }
.spot-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; box-sizing: border-box; }
.spot-card h3 { margin: 0; font-size: 0.95rem; color: #fff; font-weight: 500; text-transform: uppercase; }
.spot-card p { margin: 4px 0 0 0; font-size: 0.75rem; color: rgba(255,255,255,0.7); }

.input-section { padding: 10px 20px 15px; display: flex; flex-direction: column; align-items: center; box-sizing: border-box; }

/* CIRUGÍA VITAL: Posición relativa obligatoria para contener el botón y transición suave */
.input-container { 
    width: 100%; max-width: 820px; background: var(--bg-card); border-radius: 28px; padding: 10px 24px; 
    display: flex; align-items: flex-end; border: 1px solid var(--border); box-sizing: border-box; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
    position: relative !important; 
    /* SOLO animamos el borde, para que el JS haga el trabajo de altura sin chocar (Adios resorte) */
    transition: border-radius 0.3s ease; 
}

/* Al expandir, el padre solo cambia su borde */
.input-container.expanded { 
    border-radius: 20px; 
}

#user-input { 
    flex: 1; background: none; border: none; color: var(--text-main); 
    padding: 10px 0; font-size: 1rem; outline: none; resize: none; 
    /* Altura límite natural antes de expandir */
    max-height: 200px; 
    /* Animamos SOLO el límite máximo, esto elimina el efecto "resorte" peleando con JS */
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Al tocar el botón, liberamos el límite y el texto fluye hacia arriba suavemente */
.input-container.expanded #user-input {
    max-height: 60vh !important;
}

.send-btn { background: none; border: none; color: var(--blue); cursor: pointer; font-size: 1.6rem; padding: 8px; }

/* CIRUGÍA VITAL: El estilo del botón flotante. Oculto por defecto. */
#expand-toggle-btn {
    position: absolute; right: 15px; top: 15px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim); cursor: pointer; padding: 6px; border-radius: 8px; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: all 0.3s ease; z-index: 10; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#expand-toggle-btn.visible { opacity: 1; pointer-events: auto; }
#expand-toggle-btn:hover { color: var(--blue); border-color: var(--blue); }

.disclaimer { color: var(--text-dim); font-size: 0.75rem; margin: 8px 0 0 0; text-align: center; }

.msg { margin-bottom: 30px; display: flex; gap: 15px; width: 100%; }
.msg-av { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.msg.user { justify-content: flex-end; flex-direction: row-reverse; }
.msg.user .msg-av { background: var(--blue); color: #fff; }
.msg.ai .msg-av { background: var(--grad); color: #fff; }

.msg-body { flex: 1; line-height: 1.6; font-size: 1.0rem; letter-spacing: 0.2px; } 
.msg.user .msg-body { flex: none; max-width: 80%; background: var(--bg-user-msg); padding: 12px 18px; border-radius: 20px 20px 4px 20px; }

.player-pill { background: var(--bg-card); border-radius: 30px; padding: 8px 16px; display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--border); margin: 10px 0; }

/* SCROLLBARS OCULTOS */
::-webkit-scrollbar { display: none; }

/* ==============================================================
    COMPONENTE: SELECTOR DUAL (IDIOMA Y PAÍS)
============================================================== */
#country-selector-root { position: relative; margin-right: 15px; overflow: visible !important; }

.selector-dual-container {
    display: flex;
    gap: 12px;
    align-items: center;
    position: relative;
    z-index: 1000;
}

.dropdown-wrapper { position: relative; }

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.dropdown-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--blue);
}

.dropdown-btn img { 
    width: 20px; height: 20px; border-radius: 50%; 
    object-fit: cover; box-shadow: 0 1px 3px rgba(0,0,0,0.3); 
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 160px;
    max-height: 350px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
}

.dropdown-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border);
}

.dropdown-item:last-child { border-bottom: none; }
.dropdown-item img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.dropdown-item:hover { background: var(--bg-card-hover); }
.dropdown-item.active { background: rgba(138, 180, 248, 0.08); color: var(--blue); font-weight: 600; }

.dropdown-menu::-webkit-scrollbar { width: 6px; }
.dropdown-menu::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }


/* MODAL AUTH */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 9999; animation: fadeIn 0.2s ease; }
.modal-card { background: var(--bg-card); border: 1px solid var(--border); width: 100%; max-width: 420px; border-radius: 28px; padding: 40px; position: relative; box-shadow: 0 24px 48px rgba(0,0,0,0.3); }
.close-modal { position: absolute; top: 20px; right: 20px; background: none; border: none; color: var(--text-dim); font-size: 24px; cursor: pointer; }
.modal-header { text-align: center; margin-bottom: 30px; }
.modal-logo { font-size: 40px; margin-bottom: 10px; }
.modal-header h2 { font-size: 1.8rem; font-weight: 500; margin: 0; color: var(--text-main); }
.modal-header p { color: var(--text-dim); font-size: 0.9rem; margin-top: 8px; }

.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 8px; margin-left: 4px; }
.input-group input { width: 100%; background: var(--bg-main); border: 1px solid var(--border); color: var(--text-main); padding: 14px 20px; border-radius: 12px; font-size: 1rem; outline: none; transition: border-color 0.2s; box-sizing: border-box; }
.input-group input:focus { border-color: var(--blue); }

.primary-btn { width: 100%; background: var(--blue); color: #fff; border: none; padding: 14px; border-radius: 25px; font-size: 1rem; font-weight: 600; cursor: pointer; margin-top: 10px; transition: opacity 0.2s; }
.primary-btn:hover { opacity: 0.9; }

.switch-auth { text-align: center; margin-top: 25px; font-size: 0.9rem; color: var(--text-dim); }
.switch-auth span { color: var(--blue); cursor: pointer; font-weight: 500; }
.switch-auth span:hover { text-decoration: underline; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =========================================
    CIRUGÍA: ESTILOS BUSCADORES Y BOTONES PANEL DERECHO
    ========================================= */

/* Los inputs de búsqueda (Música y FX) */
#buscador-musica, 
#buscador-fx {
    width: 100%;
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    margin-bottom: 8px;
}

#buscador-musica:focus, 
#buscador-fx:focus {
    border-color: var(--blue);
    background-color: var(--bg-card-hover);
}

#buscador-musica::placeholder, 
#buscador-fx::placeholder {
    color: var(--text-dim);
}

/* El contenedor de los botoncitos de filtro */
.pills-container,
.fx-rol-pills {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap; 
}

/* Los botoncitos de filtro de FX y Música */
.filter-btn,
.fx-filter-pill,
#btn-fav-filter {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover,
.fx-filter-pill:hover,
#btn-fav-filter:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-main);
}

/* El botón que está seleccionado en ese momento */
.filter-btn.active,
.fx-filter-pill.activo,
#btn-fav-filter.active {
    background-color: rgba(138, 180, 248, 0.15);
    border-color: var(--blue);
    color: var(--blue);
}

/* =========================================
    ENRIQUECIMIENTO VISUAL DEL CHAT (MARKDOWN)
    ========================================= */
.msg-body h1, .msg-body h2, .msg-body h3 {
    color: var(--text-main);
    margin-top: 10px;
    margin-bottom: 12px;
    font-weight: 500;
}

.msg-body p {
    margin-bottom: 14px;
    line-height: 1.6;
}

.msg-body strong {
    color: var(--blue);
    font-weight: 600;
}

/* Listas con decoración Premium */
.msg-body ul {
    list-style-type: none;
    padding-left: 5px;
    margin-bottom: 18px;
}

.msg-body ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Reemplazamos las viñetas por brillos estilo IA */
.msg-body ul li::before {
    content: '✨';
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 0.85rem;
}

/* Bloques de código o énfasis técnico */
.msg-body pre, .msg-body code {
    background: var(--bg-card-hover);
    padding: 2px 6px;
    border-radius: 6px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-main);
    border: 1px solid var(--border);
}

/* ==============================================================
    🛠️ COMPONENTE EXTRA: SINCRONIZACIÓN DE MÓDULO INSPECTOR (LIGHT/DARK)
    ============================================================== */
.inspector-music-drawer {
    background: rgba(0, 0, 0, 0.15) !important;
    border-top: 1px solid var(--border) !important;
}

/* Adaptación dinámica a Studio White (Tema Claro) */
[data-theme="light"] .inspector-music-drawer {
    background: rgba(0, 0, 0, 0.02) !important;
}

/* Forzar que el fondo de la línea de tiempo DAW cambie entre temas */
[id^="daw-timeline-"] {
    background: #18191a !important;
    border-color: var(--border) !important;
}

[data-theme="light"] [id^="daw-timeline-"] {
    background: #e8eaed !important;
}

/* Ajuste de los separadores de bloques estructurales */
[id^="daw-timeline-"] > div {
    border-right: 1px solid rgba(0, 0, 0, 0.4) !important;
}

[data-theme="light"] [id^="daw-timeline-"] > div {
    border-right: 1px solid rgba(255, 255, 255, 0.6) !important;
}

/* Recalibración visual de los bloques DAW seguros en Modo Claro (Más contraste) */
[data-theme="light"] [id^="daw-timeline-"] > div:not([style*="rgba(234"]) {
    background: linear-gradient(180deg, rgba(26, 115, 232, 0.14) 0%, rgba(26, 115, 232, 0.05) 100%) !important;
}

/* Recalibración de bloques bloqueados/advertencias en Modo Claro */
[data-theme="light"] [id^="daw-timeline-"] > div[style*="rgba(234"] {
    background: linear-gradient(180deg, rgba(211, 47, 47, 0.14) 0%, rgba(211, 47, 47, 0.05) 100%) !important;
    border-bottom-color: var(--red, #d32f2f) !important;
}

/* Tarjeta contenedora de la ficha técnica de Prompt */
.inspector-music-drawer > div > div:nth-child(2) > div:first-child {
    background: rgba(255, 255, 255, 0.01) !important;
    border: 1px solid var(--border) !important;
}

[data-theme="light"] .inspector-music-drawer > div > div:nth-child(2) > div:first-child {
    background: var(--bg-side) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Normalización de etiquetas indexadas secundarias (Background Tags) en modo claro */
[data-theme="light"] .inspector-music-drawer span[style*="background:rgba(255,255,255,0.04)"] {
    background: var(--bg-card-hover) !important;
    color: var(--text-dim) !important;
    border-color: var(--border) !important;
}

/* Normalización de ondas apagadas en modo claro */
[data-theme="light"] .core-bars-container {
    --border: #5f6368 !important;
}

/* ==============================================================
    🔥 MÁXIMO BLINDAJE CSS: CONTROL DE BOTONES Y LÍNEAS DIVISORIAS
    ============================================================== */

/* 1. RESET Y CENTRADO GEOMÉTRICO ABSOLUTO PARA TODOS LOS BOTONES DE PLAY */
.core-play-btn, .play-btn-mini {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important; /* Liquida paddings invisibles de navegadores */
    box-sizing: border-box !important;
}

/* 2. ENCOGER UN 20% EL BOTÓN PRINCIPAL DE FX Y LOCUTORES (Baja de 40px a 32px + Centrado Óptico) */
div[data-archivo-fx] .core-play-btn,
div[data-archivo] .core-play-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    font-size: 0.75rem !important;
    padding-left: 2.5px !important; /* Empuje milimétrico para balancear el triángulo */
}

/* 3. ENCOGER UN 20% EL BOTÓN DE FILA DE MÚSICA DENTRO DE LA CARÁTULA (Baja de 32px a 26px) */
div[id^="wrapper-m_"] .core-play-btn {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    font-size: 0.65rem !important;
    padding-left: 2px !important;
}

/* 4. ENCOGER UN 20% LOS REPRODUCTORES COMPACTOS DE LAS TARJETAS DEL SIDEBAR DERECHO */
.sonodit-card .core-play-btn {
    width: 21px !important;
    height: 21px !important;
    min-width: 21px !important;
    min-height: 21px !important;
    font-size: 0.55rem !important;
    padding-left: 1.5px !important;
}

.sonodit-card div[style*="position: relative"] .core-play-btn {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    font-size: 0.45rem !important;
    padding-left: 1px !important;
}

/* 5. DESTRUCCIÓN DE CÁPSULAS FLOTANTES E INYECCIÓN DE LÍNEA DIVISORIA EN FX Y LOCUTORES */
div[data-archivo-fx], 
div[data-archivo] {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    border-bottom: 1px solid var(--border) !important; /* Misma línea finita que música */
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 0 !important; /* Elimina la separación tipo bloque */
    padding: 10px 15px !important;
}

/* Efecto hover elegante unificado para las listas planas */
div[data-archivo-fx]:hover, 
div[data-archivo]:hover {
    background: rgba(128, 128, 128, 0.02) !important;
}