/* css/style.css - Estilo Premium Oscuro, Neón y Glassmorphism */

:root {
    --bg-darker: #090d16;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.45);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --primary-neon: #00d2ff;
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.4);
    
    --danger: #f43f5e;
    --danger-glow: rgba(244, 63, 94, 0.4);
    
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.4);
    
    --purple: #8b5cf6;
    --purple-glow: rgba(139, 92, 246, 0.4);
    
    --sidebar-width: 280px;
    --header-height: 80px;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
}

body {
    background-color: var(--bg-darker);
    background-image: 
        radial-gradient(at 10% 20%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 90% 10%, rgba(59, 130, 246, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Helpers */
.hidden {
    display: none !important;
}
.text-center {
    text-align: center;
}
.mr-auto {
    margin-right: auto;
}

/* -------------------------------------------------------------
   PANTALLA DE ACCESO (AUTH SCREEN)
   ------------------------------------------------------------- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    padding: 20px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 3rem;
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary-glow);
    margin-bottom: 15px;
    animation: pulseGlow 3s infinite ease-in-out;
}

.auth-logo h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 5px;
}

.auth-logo h1 span {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.auth-logo p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-group input[type="text"],
.input-group input[type="password"],
.input-group input[type="date"],
.input-group input[type="time"],
.custom-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus,
.custom-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.auth-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border: none;
    border-radius: 12px;
    padding: 14px;
    color: #white;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px var(--primary-glow);
    margin-top: 10px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

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

.auth-message {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 20px;
    transition: all 0.3s;
}

.auth-message.error {
    color: var(--danger);
}

.auth-message.success {
    color: var(--success);
}

/* -------------------------------------------------------------
   LAYOUT PRINCIPAL DE LA APLICACIÓN (APP LAYOUT)
   ------------------------------------------------------------- */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Barra Lateral (Sidebar) */
.app-sidebar {
    width: var(--sidebar-width);
    background: rgba(10, 15, 30, 0.7);
    border-right: 1px solid var(--border-color);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex-shrink: 0;
    overflow-y: auto;
    z-index: 10;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo-icon {
    font-size: 1.8rem;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.sidebar-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.sidebar-header h2 span {
    color: var(--primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.user-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.user-info .username {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-info .user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.logout-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.3s;
}

.logout-icon:hover {
    color: var(--danger);
    background: rgba(244, 63, 94, 0.1);
}

/* Sidebar Sections */
.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-section h3 {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary {
    background: var(--primary);
    border: none;
    color: white;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}

.btn-danger {
    background: var(--danger);
    border: none;
    color: white;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px var(--danger-glow);
}

.btn-danger:hover {
    background: #e11d48;
    box-shadow: 0 6px 16px rgba(244, 63, 94, 0.5);
}

.btn-full {
    width: 100%;
}

.btn-admin-tab {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-radius: 10px;
    padding: 11px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    text-align: left;
}

.btn-admin-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-admin-tab.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    color: var(--primary-neon);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

/* Colaboradores */
.owner-badge {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.78rem;
    color: var(--warning);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.collaborators-list-wrapper {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 4px;
}

.collaborators-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.collaborators-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.02);
}

.collaborators-list li .collab-name {
    font-weight: 500;
}

.btn-remove-collab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-remove-collab:hover {
    color: var(--danger);
    background: rgba(244, 63, 94, 0.1);
}

.share-controls {
    display: flex;
    gap: 8px;
}

.share-controls input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
}

.share-controls button {
    padding: 8px 12px;
    border-radius: 8px;
}

/* -------------------------------------------------------------
   CONTENIDO PRINCIPAL (MAIN AREA)
   ------------------------------------------------------------- */
.app-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.app-header {
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    flex-shrink: 0;
    z-index: 8;
}

.header-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.sync-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sync-indicator i {
    font-size: 0.6rem;
}

.sync-indicator.online {
    color: var(--success);
    text-shadow: 0 0 10px var(--success-glow);
}

.sync-indicator.offline {
    color: var(--danger);
    text-shadow: 0 0 10px var(--danger-glow);
}

.sync-indicator.syncing {
    color: var(--warning);
    animation: pulseSync 1.5s infinite;
}

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

.master-volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px 16px;
}

.master-volume-control i {
    color: var(--text-muted);
}

.master-volume-control input[type="range"] {
    width: 100px;
    cursor: pointer;
}

.master-volume-control span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    width: 32px;
    text-align: right;
}

/* Toggle Switch */
.mode-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding-left: 20px;
}

.mode-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked + .slider:before {
    transform: translateX(22px);
    background-color: white;
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* -------------------------------------------------------------
   MAIN WORKSPACE (ADMIN AND SOUNDBOARD CONTROLS)
   ------------------------------------------------------------- */
.main-workspace {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Admin Panels */
.admin-panel {
    animation: fadeIn 0.4s ease-out;
}

.admin-panel-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.admin-panel-card h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media(max-width: 1024px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-box h3 {
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
    color: var(--primary-neon);
}

/* File Drop Area */
.file-drop-area {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.01);
}

.file-drop-area:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.03);
}

.file-drop-area i {
    font-size: 2.2rem;
    color: var(--text-muted);
}

.file-msg {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

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

.admin-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    margin-top: 20px;
}

.ine-stats-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Ads Campaign list */
.ads-list-container {
    max-height: 320px;
    overflow-y: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.admin-table th,
.admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.admin-table th {
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.15);
}

.admin-table td {
    color: var(--text-main);
}

.btn-delete-ad {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-delete-ad:hover {
    color: var(--danger);
    background: rgba(244, 63, 94, 0.15);
}

.form-row {
    display: flex;
    gap: 15px;
}
.form-row .input-group {
    flex: 1;
}

.days-checkboxes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    background: rgba(0, 0, 0, 0.15);
    padding: 10px;
    border-radius: 8px;
}

.day-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    cursor: pointer;
}

/* Soundboard Workspace cards */
.soundboard-workspace {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.automated-sections {
    display: grid;
    grid-template-columns: 3fr 2fr 2fr;
    gap: 25px;
}

@media(max-width: 1400px) {
    .automated-sections {
        grid-template-columns: 1.2fr 1fr 1fr;
    }
}

@media(max-width: 1200px) {
    .automated-sections {
        grid-template-columns: 1fr;
    }
}

.soundboard-section-card {
    background: rgba(30, 41, 59, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.section-title-bar h2 {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.time-badge {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--primary-neon);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

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

/* INE grid layout */
.ine-slots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.ine-slot {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    height: 76px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ine-slot.empty {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.15);
    cursor: not-allowed;
}

.ine-slot:not(.empty):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
    border-color: var(--primary);
}

.ine-slot:not(.empty):active {
    transform: translateY(0);
}

.ine-slot .slot-header {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}
.ine-slot .slot-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 2px 0;
}
.ine-slot .slot-sub {
    font-size: 0.68rem;
    color: var(--primary-neon);
    font-weight: 500;
}

.ine-slot.missing-audio {
    border-color: rgba(244, 63, 94, 0.3);
    background: rgba(244, 63, 94, 0.05);
    cursor: not-allowed;
}

.ine-slot.missing-audio .slot-sub {
    color: var(--danger);
}

.ine-slot .missing-icon {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 2px;
}

/* Advertising slots layout */
.ads-slots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    min-height: 76px;
    align-content: start;
}

.no-ads-msg {
    grid-column: span 2;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 20px 0;
    border: 1px dashed rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.ad-btn {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    height: 76px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.ad-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--purple);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--purple-glow);
}

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

.ad-btn .ad-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.ad-btn .ad-name {
    margin-top: 2px;
    font-size: 0.88rem;
    font-weight: 700;
}

/* MAIN GRID (48 Slots) */
.main-soundboard-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
}

@media(max-width: 1400px) {
    .main-soundboard-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
@media(max-width: 992px) {
    .main-soundboard-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.sound-btn {
    aspect-ratio: 1.3 / 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    text-align: center;
    position: relative;
    overflow: hidden;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Sound button filled state */
.sound-btn.filled {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-style: solid;
}

.sound-btn.filled:hover {
    transform: scale(1.04) translateY(-2px);
    z-index: 2;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.sound-btn.filled:active {
    transform: scale(0.98);
}

/* Sound button elements */
.sound-btn .btn-key {
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 5px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    text-transform: uppercase;
}

.sound-btn .btn-edit-indicator {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.2s;
    background: rgba(0, 0, 0, 0.3);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sound-btn.filled:hover .btn-edit-indicator {
    opacity: 1;
}

.sound-btn .btn-name {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 10px;
}

.sound-btn .btn-icon {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.sound-btn:not(.filled):hover .btn-icon {
    color: var(--primary);
    transform: scale(1.2);
}

/* Playing states for all sound buttons */
.sound-btn.playing,
.ad-btn.playing,
.ine-slot.playing {
    border-color: var(--success);
    box-shadow: 0 0 15px var(--success-glow);
    animation: pulsePlayBorder 1.5s infinite;
}

/* Progress filling background effect */
.progress-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--success);
    box-shadow: 0 0 10px var(--success-glow);
    width: 0%;
    transition: width 0.1s linear;
}

/* Loop indicator badge */
.loop-badge {
    position: absolute;
    bottom: 6px;
    right: 8px;
    font-size: 0.65rem;
    color: var(--success);
    animation: rotate 6s infinite linear;
}

/* -------------------------------------------------------------
   LIBRARY DRAWER (BIBLIOTECA LATERAL)
   ------------------------------------------------------------- */
.library-drawer {
    position: fixed;
    top: 0;
    right: -380px; /* Hidden by default */
    width: 380px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    border-left: 1px solid var(--border-color);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.library-drawer.open {
    right: 0;
}

.drawer-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-close:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.drawer-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    background: rgba(0, 0, 0, 0.1);
}

.lib-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    padding: 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.lib-tab.active {
    color: var(--primary-neon);
    border-bottom-color: var(--primary);
    background: rgba(255, 255, 255, 0.01);
}

.drawer-content {
    flex-grow: 1;
    padding: 24px;
    overflow-y: auto;
}

.lib-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-bar {
    position: relative;
}

.search-bar input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px 12px 42px;
    color: var(--text-main);
    outline: none;
    transition: all 0.3s;
}

.search-bar input:focus {
    border-color: var(--primary);
}

.search-bar .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.library-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 230px);
    overflow-y: auto;
}

/* Audio Result Item */
.audio-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
}

.audio-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.btn-play-preview {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.btn-play-preview:hover {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.audio-item-info {
    flex-grow: 1;
    overflow: hidden;
}

.audio-item-name {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.audio-item-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.badge-scope {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
}

.badge-scope.public {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-scope.group {
    background: rgba(139, 92, 246, 0.1);
    color: var(--purple);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.btn-assign-sound {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--primary-neon);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-assign-sound:hover {
    background: var(--primary);
    color: white;
}

/* Radio buttons container style */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.15);
    padding: 12px;
    border-radius: 10px;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-muted);
}
.radio-label input {
    margin-top: 3px;
}
.radio-label span strong {
    color: var(--text-main);
    display: block;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

/* -------------------------------------------------------------
   MODALES (MODAL CONTAINERS AND DIALOGS)
   ------------------------------------------------------------- */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 150;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: scaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-close,
.modal-close-btn {
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: rgba(0, 0, 0, 0.1);
}

/* Grid Preview inside slot assignment modal */
.grid-preview {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 12px;
    max-height: 250px;
    overflow-y: auto;
}

.preview-slot {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 600;
    transition: all 0.2s;
}

.preview-slot.filled {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary);
    color: var(--primary-neon);
}

.preview-slot:hover {
    background: var(--primary);
    border-color: var(--primary-neon);
    color: white;
}

/* Sound Property Modal customization */
.color-picker-input {
    height: 44px;
    padding: 2px !important;
    background: transparent !important;
    cursor: pointer;
}

.key-binding-input {
    text-align: center;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary-neon) !important;
    cursor: pointer;
}

.btn-tiny {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.72rem;
    color: var(--text-muted);
    cursor: pointer;
    align-self: flex-end;
}
.btn-tiny:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: var(--danger);
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-danger-outline:hover {
    background: rgba(244, 63, 94, 0.1);
    border-color: var(--danger);
}

.slider-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.checkbox-group {
    margin-top: 10px;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

/* -------------------------------------------------------------
   NOTIFICACIONES TOAST (NOTIFICATIONS)
   ------------------------------------------------------------- */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 200;
}

.toast {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 360px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: slideInLeft 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success {
    border-left: 4px solid var(--success);
}
.toast.success i {
    color: var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}
.toast.error i {
    color: var(--danger);
}

.toast.info {
    border-left: 4px solid var(--primary);
}
.toast.info i {
    color: var(--primary);
}

.toast-msg {
    font-size: 0.85rem;
    font-weight: 500;
    flex-grow: 1;
}

/* -------------------------------------------------------------
   ANIMACIONES (KEYFRAMES & TRANSITIONS)
   ------------------------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        text-shadow: 0 0 15px var(--primary-glow);
    }
    50% {
        text-shadow: 0 0 30px rgba(59, 130, 246, 0.8);
    }
}

@keyframes pulsePlayBorder {
    0%, 100% {
        border-color: var(--success);
        box-shadow: 0 0 10px var(--success-glow);
    }
    50% {
        border-color: #34d399;
        box-shadow: 0 0 20px rgba(52, 211, 153, 0.6);
    }
}

@keyframes pulseSync {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

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

/* =============================================================
   VARIABLES Y ESTILOS DEL TEMA CLARO (LIGHT THEME)
   ============================================================= */
body.light-theme {
    --bg-darker: #f1f5f9;
    --bg-dark: #ffffff;
    --bg-card: #ffffff;
    --border-color: rgba(15, 23, 42, 0.08);
    --text-main: #0f172a;
    --text-muted: #64748b;
    
    --primary: #2563eb;
    --primary-glow: rgba(37, 99, 235, 0.15);
    
    --success: #059669;
    --success-glow: rgba(5, 150, 105, 0.15);
    
    --danger: #dc2626;
    --danger-glow: rgba(220, 38, 38, 0.15);
    
    --warning: #d97706;
    --warning-glow: rgba(217, 119, 6, 0.15);
    
    --purple: #7c3aed;
    --purple-glow: rgba(124, 58, 237, 0.15);
}

body.light-theme {
    background-image: 
        radial-gradient(at 10% 20%, rgba(124, 58, 237, 0.06) 0px, transparent 50%),
        radial-gradient(at 90% 10%, rgba(37, 99, 235, 0.06) 0px, transparent 50%);
}

body.light-theme .app-sidebar {
    background: #ffffff;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 4px 0 20px rgba(15, 23, 42, 0.02);
}

body.light-theme .user-profile {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.05);
}

body.light-theme .collaborators-list-wrapper {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.05);
}

body.light-theme .collaborators-list li {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.05);
    color: #0f172a;
}

body.light-theme .app-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.01);
}

body.light-theme .master-volume-control {
    background: rgba(15, 23, 42, 0.02);
    border-color: rgba(15, 23, 42, 0.06);
}

body.light-theme .slider {
    background-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .slider:before {
    background-color: #64748b;
}

body.light-theme input:checked + .slider:before {
    background-color: white;
}

body.light-theme .btn-secondary {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

body.light-theme .btn-secondary:hover {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.2);
}

body.light-theme .soundboard-section-card,
body.light-theme .admin-panel-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
}

body.light-theme .section-title-bar {
    border-bottom-color: rgba(15, 23, 42, 0.06);
}

body.light-theme .admin-footer-actions {
    border-top-color: rgba(15, 23, 42, 0.06);
}

body.light-theme .admin-box {
    background: rgba(15, 23, 42, 0.01);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

body.light-theme .admin-table th {
    background: rgba(15, 23, 42, 0.03);
    color: #475569;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

body.light-theme .admin-table td {
    border-bottom-color: rgba(15, 23, 42, 0.04);
}

body.light-theme .ine-slot {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

body.light-theme .ine-slot.empty {
    background: rgba(15, 23, 42, 0.01);
    border: 1px dashed rgba(15, 23, 42, 0.08);
    color: rgba(15, 23, 42, 0.3);
}

body.light-theme .ine-slot:not(.empty):hover {
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.12);
}

body.light-theme .ad-btn {
    background: rgba(124, 58, 237, 0.03);
    border: 1px solid rgba(124, 58, 237, 0.12);
}

body.light-theme .ad-btn:hover {
    background: rgba(124, 58, 237, 0.06);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.08);
}

body.light-theme .sound-btn {
    background: rgba(15, 23, 42, 0.01);
    border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .sound-btn.filled {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

body.light-theme .sound-btn.filled:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body.light-theme .audio-item {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

body.light-theme .audio-item:hover {
    background: rgba(15, 23, 42, 0.02);
}

body.light-theme .btn-play-preview {
    background: rgba(15, 23, 42, 0.03);
    color: #0f172a;
}

body.light-theme .btn-play-preview:hover {
    background: var(--primary);
    color: white;
}

body.light-theme .custom-select {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

body.light-theme .days-checkboxes,
body.light-theme .radio-group,
body.light-theme .grid-preview {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

body.light-theme .preview-slot {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

body.light-theme .preview-slot.filled {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.2);
}

body.light-theme .preview-slot:hover {
    background: var(--primary);
    color: white;
}

body.light-theme .input-group input[type="text"],
body.light-theme .input-group input[type="password"],
body.light-theme .input-group input[type="date"],
body.light-theme .input-group input[type="time"] {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

body.light-theme .input-group input:focus {
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.08);
}

body.light-theme .btn-admin-tab {
    border-color: rgba(15, 23, 42, 0.06);
    color: #64748b;
}

body.light-theme .btn-admin-tab:hover {
    background: rgba(15, 23, 42, 0.01);
}

body.light-theme .btn-admin-tab.active {
    background: rgba(37, 99, 235, 0.05);
    color: #2563eb;
    border-color: var(--primary);
}

body.light-theme .logo-icon {
    text-shadow: none;
}

body.light-theme .auth-card {
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.05);
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.06);
}

body.light-theme .form-tabs {
    background: rgba(15, 23, 42, 0.03);
}

body.light-theme .tab-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

body.light-theme .modal-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

body.light-theme .modal-footer {
    background: rgba(15, 23, 42, 0.01);
    border-top-color: rgba(15, 23, 42, 0.05);
}

body.light-theme .library-drawer {
    background: #ffffff;
    box-shadow: -10px 0 40px rgba(15, 23, 42, 0.05);
    border-left-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .drawer-tabs {
    background: rgba(15, 23, 42, 0.01);
}

body.light-theme .search-bar input {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
}

body.light-theme .btn-remove-collab:hover,
body.light-theme .btn-delete-ad:hover {
    background: rgba(220, 38, 38, 0.05);
}

/* Estilos para selección de horas y panel de invitaciones */
.hours-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.hours-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hours-all-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 15px;
}

body.light-theme .hours-all-option {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.05);
}

.invitation-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.btn-tiny-success {
    background: var(--success);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-tiny-success:hover {
    background: #059669;
    box-shadow: 0 0 8px var(--success-glow);
}

.btn-tiny-danger {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-tiny-danger:hover {
    background: #e11d48;
    box-shadow: 0 0 8px var(--danger-glow);
}

.collab-name-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.collab-name-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
}

body.light-theme .toast {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15) !important;
}

body.light-theme .toast .toast-msg {
    color: #0f172a !important;
}

body.light-theme .toast.info {
    border-left: 4px solid #2563eb !important;
}

body.light-theme .toast.success {
    border-left: 4px solid #059669 !important;
}

body.light-theme .toast.error {
    border-left: 4px solid #dc2626 !important;
}

/* =============================================================
   LOCUCIÓN DE HORA Y CLIMA WIDGET STYLES
   ============================================================= */
.voice-section {
    display: flex;
    flex-direction: column;
}

.voice-controls-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    justify-content: space-between;
}

.voice-selector-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.voice-selector-row label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.select-voice-mode,
.select-tts-voice {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
}

.voice-buttons-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 5px;
}

.voice-buttons-row button:last-child {
    grid-column: span 3;
}

.widget-edit-pen-inline {
    font-size: 0.68rem;
    margin-left: 5px;
    color: #f59e0b; /* Amber warning color */
    opacity: 0.85;
    pointer-events: none;
}

.btn-voice-play {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border-radius: 10px;
    padding: 10px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-voice-play:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-voice-play.primary {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border: none;
    color: white;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.btn-voice-play.primary:hover {
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.5);
    filter: brightness(1.1);
}

.weather-badge {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Light Theme overrides for voice-play button and other components */
body.light-theme .btn-voice-play {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

body.light-theme .btn-voice-play:hover {
    background: rgba(15, 23, 42, 0.03);
}

body.light-theme .btn-voice-play.primary {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: white;
}

body.light-theme .library-drawer {
    background: #ffffff !important;
    border-left: 1px solid rgba(15, 23, 42, 0.08) !important;
    color: #0f172a !important;
    box-shadow: -10px 0 40px rgba(15, 23, 42, 0.08) !important;
}

body.light-theme .library-drawer h2 {
    color: #0f172a !important;
}

body.light-theme .lib-tab {
    color: #64748b !important;
}

body.light-theme .lib-tab.active {
    color: #2563eb !important;
    border-bottom-color: #2563eb !important;
    background: rgba(15, 23, 42, 0.02) !important;
}

body.light-theme .audio-item {
    background: #f8fafc !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    color: #0f172a !important;
}

body.light-theme .audio-item:hover {
    background: #f1f5f9 !important;
}

body.light-theme .audio-item-name {
    color: #0f172a !important;
}

body.light-theme .btn-play-preview {
    background: rgba(15, 23, 42, 0.05) !important;
    color: #0f172a !important;
}

body.light-theme .btn-play-preview:hover {
    background: #2563eb !important;
    color: #ffffff !important;
}

body.light-theme .btn-close {
    color: #64748b !important;
}

body.light-theme .btn-close:hover {
    color: #0f172a !important;
    background: rgba(15, 23, 42, 0.05) !important;
}

body.light-theme .btn-edit-indicator {
    background: rgba(15, 23, 42, 0.08) !important;
    color: #0f172a !important;
}

/* =============================================================
   NUEVOS ESTILOS: LISTA SIDEBAR, UPLOADS COMPACTOS Y CABINA
   ============================================================= */

/* Sidebar list styles */
.soundboards-list-container {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.15);
    padding: 6px;
    border: 1px solid var(--border-color);
}
.soundboards-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.soundboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    color: var(--text-muted);
}
.soundboard-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}
.soundboard-item.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--primary-neon);
    box-shadow: inset 0 0 10px rgba(139, 92, 246, 0.1);
}
.soundboard-item .sb-name-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.soundboard-item .sb-role-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
}
.soundboard-item .sb-role-badge.owner {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-neon);
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.soundboard-item .sb-role-badge.collab {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple);
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.soundboard-placeholder {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    padding: 15px 0;
    font-style: italic;
}

/* Voice subgrid and upload cards */
.voice-admin-grid {
    grid-template-columns: repeat(2, 1fr) !important;
}
.voice-upload-subgrid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.voice-upload-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s;
}
.voice-upload-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}
.voice-upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.voice-upload-header h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}
.voice-count-badge {
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 10px;
    transition: all 0.3s;
}
.voice-count-badge.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.form-voice-upload {
    display: flex;
    gap: 8px;
    align-items: center;
}
.file-input-compact {
    font-size: 0.78rem;
    flex-grow: 1;
    color: var(--text-muted);
    width: 60%;
}
.btn-primary-compact {
    background: var(--primary);
    border: none;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-primary-compact:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 8px var(--primary-glow);
}

/* Cabina panel style */
.cabina-panel {
    display: flex;
    flex-direction: column;
    padding: 30px;
    height: 100vh;
    background: radial-gradient(circle at top right, #1e1b4b, #0f172a);
    color: var(--text-main);
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}
.cabina-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 20px;
    margin-bottom: 30px;
}
.cabina-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo-icon-cabina {
    font-size: 1.8rem;
    color: var(--primary-neon);
    filter: drop-shadow(0 0 10px var(--primary-glow));
}
.cabina-logo h2 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
}
.cabina-badge {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: white;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}
.cabina-header-right {
    display: flex;
    align-items: center;
}
.cabina-main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    height: calc(100vh - 120px);
}
.cabina-visualizer-card {
    background: rgba(30, 41, 59, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}
.cabina-visualizer-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.visualizer-wrapper {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    margin-bottom: 40px;
}
.visualizer-bars {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 80px;
}
.visualizer-bars .bar {
    width: 8px;
    height: 15px;
    background: linear-gradient(to top, var(--primary), var(--purple));
    border-radius: 4px;
    transition: height 0.1s ease;
}
.cabina-panel.playing-audio .visualizer-bars .bar {
    animation: bounceVisualizer 1.2s infinite ease-in-out alternate;
}
/* Stagger animation delays */
.visualizer-bars .bar:nth-child(1) { animation-delay: 0.1s; }
.visualizer-bars .bar:nth-child(2) { animation-delay: 0.3s; }
.visualizer-bars .bar:nth-child(3) { animation-delay: 0.5s; }
.visualizer-bars .bar:nth-child(4) { animation-delay: 0.2s; }
.visualizer-bars .bar:nth-child(5) { animation-delay: 0.4s; }
.visualizer-bars .bar:nth-child(6) { animation-delay: 0.6s; }
.visualizer-bars .bar:nth-child(7) { animation-delay: 0.1s; }
.visualizer-bars .bar:nth-child(8) { animation-delay: 0.3s; }
.visualizer-bars .bar:nth-child(9) { animation-delay: 0.5s; }
.visualizer-bars .bar:nth-child(10) { animation-delay: 0.2s; }
.visualizer-bars .bar:nth-child(11) { animation-delay: 0.4s; }
.visualizer-bars .bar:nth-child(12) { animation-delay: 0.6s; }
.visualizer-bars .bar:nth-child(13) { animation-delay: 0.1s; }
.visualizer-bars .bar:nth-child(14) { animation-delay: 0.3s; }
.visualizer-bars .bar:nth-child(15) { animation-delay: 0.5s; }

.now-playing-info {
    text-align: center;
    z-index: 1;
}
.now-playing-subtitle {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}
#cabina-now-playing {
    font-size: 2.2rem;
    font-weight: 800;
    margin-top: 10px;
    color: white;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}
.cabina-panel.playing-audio #cabina-now-playing {
    color: var(--primary-neon);
    text-shadow: 0 0 20px var(--primary-glow);
}
.cabina-history-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
}
.cabina-history-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}
.history-list-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    max-height: calc(100vh - 250px);
}
.cabina-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cabina-history-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 12px 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}
.cabina-history-item:hover {
    background: rgba(255, 255, 255, 0.04);
}
.history-item-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.history-item-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}
.history-item-user {
    font-size: 0.72rem;
    color: var(--text-muted);
}
.history-item-time {
    font-size: 0.72rem;
    color: var(--primary-neon);
    font-weight: 700;
}
.history-placeholder {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    padding: 30px 0;
    font-style: italic;
}

@keyframes bounceVisualizer {
    0% { height: 15px; }
    50% { height: 75px; }
    100% { height: 25px; }
}

/* Light Theme tweaks for Cabina */
body.light-theme .soundboards-list-container {
    background: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.08);
}
body.light-theme .soundboard-item {
    color: #64748b;
}
body.light-theme .soundboard-item:hover {
    background: rgba(15, 23, 42, 0.03);
    color: #0f172a;
}
body.light-theme .soundboard-item.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(139, 92, 246, 0.05));
    border-color: rgba(37, 99, 235, 0.2);
    color: #2563eb;
}
body.light-theme .voice-upload-card {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.06);
}
body.light-theme .voice-upload-card:hover {
    background: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.1);
}
body.light-theme .voice-count-badge {
    background: rgba(15, 23, 42, 0.05);
}
body.light-theme .cabina-panel {
    background: radial-gradient(circle at top right, #e2e8f0, #f8fafc);
    color: #0f172a;
    border: none;
}
body.light-theme .cabina-header {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
body.light-theme .cabina-logo h2 {
    color: #0f172a;
}
body.light-theme .cabina-visualizer-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
body.light-theme #cabina-now-playing {
    color: #0f172a;
}
body.light-theme .cabina-panel.playing-audio #cabina-now-playing {
    color: #2563eb;
}
body.light-theme .cabina-history-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
body.light-theme .cabina-history-card h3 {
    color: #0f172a;
    border-bottom-color: rgba(15, 23, 42, 0.08);
}
body.light-theme .cabina-history-item {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.06);
}
body.light-theme .cabina-history-item:hover {
    background: #f1f5f9;
}
body.light-theme .history-item-name {
    color: #0f172a;
}
body.light-theme .history-item-time {
    color: #2563eb;
}


