/* RedAI-Web – Notifications panel (beta, notif dropdown) */

      /* Beta badge (versión): color permanente, mismo en modo claro y oscuro */
      .beta-badge{display:inline-flex;align-items:center;justify-content:center;margin-left:6px;padding:2px 6px;border-radius:8px;font-size:10px;font-weight:800;letter-spacing:.4px;text-transform:uppercase;border:1px solid rgba(71,85,105,.45) !important;background:linear-gradient(180deg, rgba(71,85,105,.18), rgba(71,85,105,.08)) !important;color:#475569 !important}
      html[data-mode="dark"] .beta-badge{border-color:rgba(148,163,184,.5) !important;background:linear-gradient(180deg, rgba(148,163,184,.22), rgba(148,163,184,.1)) !important;color:#94a3b8 !important}
      /* Notificaciones (header) */
      .notifications{position:relative; margin-left:8px}
      .notifications-toggle{display:inline-flex;align-items:center;justify-content:center;gap:4px;width:auto;min-width:36px;height:36px;padding:0 10px;border-radius:8px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:inherit;cursor:pointer;font-size:13px;position:relative}
      .notifications-toggle .notif-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 6px;border-radius:999px;background:#ef4444;color:#fff;font-size:10px;font-weight:700;margin-left:2px;animation:pulse 2s infinite}
      @keyframes pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.05)}}
      .notifications-toggle:hover{background:rgba(255,255,255,.1)}
      /* Bottom Sheet - Notifications Dropdown */
      .notifications-dropdown{
        position:fixed;
        left:0;
        right:0;
        bottom:0;
        top:auto;
        width:100%;
        max-width:100%;
        max-height:85vh;
        overflow:hidden !important;
        border-radius:20px 20px 0 0;
        border:none;
        background:var(--neo-surface);
        box-shadow:0 -8px 32px rgba(0,0,0,.4);
        display:none;
        flex-direction:column;
        backdrop-filter:blur(15px);
        transform:translateY(100%);
        opacity:0;
        transition:transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        z-index:9999;
        box-sizing:border-box;
      }
      .notifications-dropdown.show{
        display:flex !important;
        transform:translateY(0);
        opacity:1;
      }
      .notifications-dropdown.open {
        display: flex !important;
      }
      /* Cerrado: nunca interceptar clics (evita capa invisible en admin/resto) */
      .notifications-dropdown:not(.open):not(.show) {
        pointer-events: none !important;
        visibility: hidden !important;
        display: none !important;
      }
      html[data-mode="light"] .notifications-toggle{background:var(--neo-surface);border-color:var(--neo-border)}
      html[data-mode="light"] .notifications-dropdown{
  background: var(--neo-surface);
  border-color: var(--neo-border);
  box-shadow: 0 -4px 24px color-mix(in srgb, var(--neo-primary) 12%, transparent);
}

html[data-mode="light"] .notifications-dropdown::before {
  background: color-mix(in srgb, var(--neo-primary) 15%, transparent);
}

/* === NUEVO SISTEMA DE NOTIFICACIONES === */

/* Handle para bottom sheet */
.notifications-dropdown::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 5px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 3px;
  z-index: 1;
}

/* Header con tabs */
.notif-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px;
    padding-top: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.notif-tabs {
    display: flex;
    gap: 8px;
}

.notif-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    position: relative;
}

.notif-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

.notif-tab.active {
    background: rgba(124, 58, 237, 0.15);
    color: #7c3aed;
}

.notif-badge-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
}

/* NUEVO BOTÓN DE CERRAR NOTIFICACIONES - DESDE CERO */
.close-notifications-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}



  /* Compatibilidad específica para temáticas predefinidas */
  html[data-theme="ocean"] .close-notifications-btn {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.3);
  }

  html[data-theme="ocean"] .close-notifications-btn:hover {
    background: linear-gradient(135deg, #0284c7, #0891b2);
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.4);
  }

  html[data-theme="forest"] .close-notifications-btn {
    background: linear-gradient(135deg, #059669, #84cc16);
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
  }

  html[data-theme="forest"] .close-notifications-btn:hover {
    background: linear-gradient(135deg, #047857, #65a30d);
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.4);
  }

  html[data-theme="sunset"] .close-notifications-btn {
    background: linear-gradient(135deg, #f97316, #dc2626);
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.3);
  }

  html[data-theme="sunset"] .close-notifications-btn:hover {
    background: linear-gradient(135deg, #ea580c, #b91c1c);
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.4);
  }

  html[data-theme="midnight"] .close-notifications-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
  }

  html[data-theme="midnight"] .close-notifications-btn:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
  }

  html[data-theme="coral"] .close-notifications-btn {
    background: linear-gradient(135deg, #ec4899, #f97316);
    box-shadow: 0 2px 6px rgba(236, 72, 153, 0.3);
  }

  html[data-theme="coral"] .close-notifications-btn:hover {
    background: linear-gradient(135deg, #db2777, #ea580c);
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.4);
  }

  html[data-theme="aurora"] .close-notifications-btn {
    background: linear-gradient(135deg, #10b981, #06b6d4);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  }

  html[data-theme="aurora"] .close-notifications-btn:hover {
    background: linear-gradient(135deg, #059669, #0891b2);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
  }

  html[data-theme="neon"] .close-notifications-btn {
    background: linear-gradient(135deg, #a855f7, #06b6d4);
    box-shadow: 0 2px 6px rgba(168, 85, 247, 0.3);
  }

  html[data-theme="neon"] .close-notifications-btn:hover {
    background: linear-gradient(135deg, #9333ea, #0891b2);
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.4);
  }

  html[data-theme="lilac"] .close-notifications-btn {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
  }

  html[data-theme="lilac"] .close-notifications-btn:hover {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.4);
  }

  html[data-theme="wine"] .close-notifications-btn {
    background: linear-gradient(135deg, #9f1239, #e11d48);
    box-shadow: 0 2px 6px rgba(190, 18, 60, 0.3);
  }

  html[data-theme="wine"] .close-notifications-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #f43f5e);
    box-shadow: 0 4px 10px rgba(190, 18, 60, 0.4);
  }









/* Ancho fijo del panel en desktop para que el texto tenga espacio y no se corte */
@media (min-width: 1024px) {
    .notifications-dropdown.header-dd-panel {
        width: min(400px, calc(100vw - 24px)) !important;
        max-width: min(400px, calc(100vw - 24px)) !important;
        box-sizing: border-box !important;
    }
}

/* Contenido de tabs: único scroll vertical */
.notif-content {
    display: none;
    flex: 1;
    min-height: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    box-sizing: border-box;
}

.notif-content.active {
    display: block;
}

/* Scroll decorado en panel de notificaciones */
.notif-content::-webkit-scrollbar {
    width: 8px;
}

.notif-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}

.notif-content::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.notif-content::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.6);
}

.notifications-dropdown {
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, 0.4) rgba(255, 255, 255, 0.06);
}

html[data-mode="light"] .notif-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.06);
}

html[data-mode="light"] .notif-content::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--neo-primary) 35%, transparent);
    border-color: var(--neo-border);
}

html[data-mode="light"] .notif-content::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--neo-primary) 55%, transparent);
}

/* Tab de Notificaciones */
.notif-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.notif-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.notif-empty p {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.notif-empty small {
    font-size: 13px;
    opacity: 0.7;
}

.notif-actions {
    display: flex;
    justify-content: flex-end;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

/* Items de notificación mejorados */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notif-item.unread {
    background: rgba(124, 58, 237, 0.08);
}

.notif-item.unread:hover {
    background: rgba(124, 58, 237, 0.12);
}

.notif-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-item-content {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

.notif-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.9);
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

.notif-message {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin-bottom: 6px;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

.notif-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    opacity: 0.8;
}

.notif-follow-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.notif-follow-actions .notif-btn-accept,
.notif-follow-actions .notif-btn-reject {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
}
.notif-follow-actions .notif-btn-accept {
    background: var(--neo-primary, #7c3aed);
    color: #fff;
}
.notif-follow-actions .notif-btn-reject {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.2);
}
.notif-follow-actions .notif-btn-accept:hover,
.notif-follow-actions .notif-btn-reject:hover {
    opacity: 0.9;
}

.notif-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7c3aed;
    flex-shrink: 0;
    margin-top: 6px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Tab de Configuración */
.notif-settings {
    padding: 20px;
    overflow-x: hidden;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.settings-section {
    margin-bottom: 24px;
}

.settings-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(52px, auto);
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 0;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}

.setting-info label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

.setting-info small {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* Switches personalizados: siempre en su columna, nunca encima del texto */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    flex-grow: 0;
    justify-self: end;
}

.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.2);
    transition: 0.3s;
    border-radius: 24px;
}

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

input:checked + .slider {
    background-color: #7c3aed;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.settings-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animaciones */
.notifications-dropdown.open {
    display: block;
    animation: dropdownSlideIn 0.3s ease;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modo claro: mismas variables que oscuro (cambian con Ocean/Sunset/Forest) */
html[data-mode="light"] .notif-header {
    background: color-mix(in srgb, var(--neo-primary) 3%, var(--neo-surface));
    border-bottom-color: var(--neo-border);
}

html[data-mode="light"] .notif-tab {
    color: var(--neo-muted);
}

html[data-mode="light"] .notif-tab:hover {
    background: color-mix(in srgb, var(--neo-primary) 8%, var(--neo-surface));
    color: var(--neo-text);
}

html[data-mode="light"] .notif-tab.active {
    background: color-mix(in srgb, var(--neo-primary) 12%, var(--neo-surface));
}

html[data-mode="light"] .notif-close {
    color: var(--neo-muted);
}

html[data-mode="light"] .notif-close:hover {
    background: color-mix(in srgb, var(--neo-primary) 8%, var(--neo-surface));
    color: var(--neo-text);
}

html[data-mode="light"] .notif-item {
    border-bottom-color: var(--neo-border);
}

html[data-mode="light"] .notif-item:hover {
    background: color-mix(in srgb, var(--neo-primary) 4%, var(--neo-surface));
}

html[data-mode="light"] .notif-item.unread {
  background: color-mix(in srgb, var(--neo-primary) 8%, var(--neo-surface));
}

html[data-mode="light"] .notif-item.unread:hover {
  background: color-mix(in srgb, var(--neo-primary) 12%, var(--neo-surface));
}

html[data-mode="light"] .notif-title {
    color: var(--neo-text);
}

html[data-mode="light"] .notif-message {
    color: var(--neo-muted);
}

html[data-mode="light"] .notif-time {
    color: var(--neo-muted);
}

html[data-mode="light"] .notif-empty {
    color: var(--neo-muted);
}

html[data-mode="light"] .notif-empty p {
    color: var(--neo-text);
}

html[data-mode="light"] .slider {
    background-color: color-mix(in srgb, var(--neo-primary) 20%, var(--neo-surface));
}

html[data-mode="light"] .slider:before {
    background-color: var(--neo-surface);
}

html[data-mode="light"] .settings-section h4 {
    color: var(--neo-text);
    border-bottom-color: var(--neo-border);
}

html[data-mode="light"] .setting-item {
    border-bottom-color: var(--neo-border);
}

html[data-mode="light"] .setting-info label {
    color: var(--neo-text);
}

html[data-mode="light"] .setting-info small {
    color: var(--neo-muted);
}

html[data-mode="light"] .settings-actions {
    border-top-color: var(--neo-border);
}

/* Estilos para modo claro */
html[data-mode="light"] .notif-item {
    border-bottom-color: var(--neo-border);
}

html[data-mode="light"] .notif-item:hover {
    background: color-mix(in srgb, var(--neo-primary) 4%, var(--neo-surface));
}

/* Desktop: mismo comportamiento que el resto de dropdowns del header (debajo del botón) */
@media (min-width: 1024px) {
    .notifications-dropdown {
        /* Posición la define header.css (absolute, debajo del toggle); aquí solo refuerzo de layout */
        display: flex !important;
        flex-direction: column !important;
    }
    .notifications-dropdown.open,
    .notifications-dropdown.show {
        display: flex !important;
        flex-direction: column !important;
    }
    .notifications-dropdown::before {
        display: none;
    }
}

/* ===== RESPONSIVE NOTIFICATIONS PANEL ===== */

/* Móvil (max-width: 479px) */
@media (max-width: 479px) {
    .notifications-dropdown {
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        border-radius: 24px 24px 0 0;
        top: auto;
        bottom: 0;
        transform: translateY(100%);
        z-index: 9999;
    }
    
    .notifications-dropdown.show {
        transform: translateY(0);
        opacity: 1;
    }
    
    .notif-header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .notif-tabs {
        width: 100%;
        justify-content: space-between;
        gap: 4px;
    }
    
    .notif-tab {
        flex: 1;
        padding: 10px 12px;
        font-size: 13px;
        justify-content: center;
    }
    
    .notif-tab span:not(.notif-badge-small) {
        display: none;
    }
    
    .notif-tab i {
        font-size: 16px;
    }
    
    .notif-content {
        max-height: calc(80vh - 100px);
    }
    
    .notif-item {
        padding: 16px;
        gap: 12px;
        min-height: 64px;
    }
    
    .notif-icon {
        font-size: 20px;
    }
    
    .notif-title {
        font-size: 15px;
    }
    
    .notif-message {
        font-size: 14px;
    }
    
    .notif-time {
        font-size: 12px;
    }
    
    .notif-empty {
        padding: 40px 20px;
    }
    
    .notif-empty i {
        font-size: 48px;
    }
    
    .notif-empty p {
        font-size: 14px;
    }
    
    .notif-empty small {
        font-size: 12px;
    }
    
    .notif-actions {
        padding: 12px 16px;
        flex-direction: column;
    }
    
    .notif-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Settings tab en móvil */
    .notif-settings {
        padding: 16px;
    }
    
    .settings-section {
        margin-bottom: 20px;
    }
    
    .settings-section h4 {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .setting-item {
        grid-template-columns: minmax(0, 1fr) minmax(52px, auto);
        padding: 12px 0;
        gap: 12px;
    }
    
    .setting-info label {
        font-size: 13px;
    }
    
    .setting-info small {
        font-size: 11px;
    }
    
    .switch {
        justify-self: end;
    }
    
    .settings-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .settings-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== NUEVOS ESTILOS MEJORADOS PARA CONFIGURACIÓN ===== */

/* Resumen de notificaciones */
.notif-stats-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 16px;
    margin: 0 20px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.notif-stat-item {
    text-align: center;
    padding: 12px 8px;
}

.notif-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #6366f1;
    display: block;
    line-height: 1;
    margin-bottom: 4px;
}

.notif-stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Modo No Molestar */
.dnd-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    margin: 0 20px 20px;
    color: #fca5a5;
}

.dnd-banner i {
    font-size: 20px;
    color: #ef4444;
}

.dnd-banner-content {
    flex: 1;
}

.dnd-banner-content strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.dnd-banner-content small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* Secciones mejoradas */
.settings-section {
    margin-bottom: 28px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.settings-section h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Items con mejor diseño */
.setting-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.2s ease;
}

.setting-item:hover {
    background: rgba(255, 255, 255, 0.02);
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
    border-radius: 8px;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.setting-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 12px;
    flex-shrink: 0;
}

.setting-item-with-icon {
    display: flex;
    align-items: center;
}

/* Mejor switch */
.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: 0.3s;
    border-radius: 28px;
}

.switch .slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.switch input:checked + .slider:before {
    transform: translateX(24px);
}

.switch input:focus + .slider {
    box-shadow: 0 0 1px #6366f1;
}

/* Time range picker */
.time-range-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.time-range-picker select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    color: inherit;
    font-size: 14px;
    cursor: pointer;
}

.time-range-picker span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

/* Info tooltip */
.setting-info label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-tooltip {
    position: relative;
    cursor: help;
    opacity: 0.5;
    font-size: 12px;
    transition: opacity 0.2s;
}

.info-tooltip:hover {
    opacity: 1;
}

/* Acciones de configuración */
.settings-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 16px 16px;
}

.settings-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.settings-actions .btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}

.settings-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.settings-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.settings-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.settings-actions .btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.settings-actions .btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Toggle de sonido y vibración */
.sound-vibration-toggles {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-pill:hover {
    background: rgba(255, 255, 255, 0.1);
}

.toggle-pill.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
    color: #818cf8;
}

/* Animación para switch deshabilitado */
.switch input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Preferencias guardadas toast */
.settings-saved-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.settings-saved-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive mejorado */
@media (max-width: 479px) {
    .notif-stats-summary {
        margin: 0 16px 16px;
        padding: 12px;
        gap: 8px;
    }
    
    .notif-stat-value {
        font-size: 20px;
    }
    
    .notif-stat-label {
        font-size: 10px;
    }
    
    .dnd-banner {
        margin: 0 16px 16px;
        padding: 12px;
    }
    
    .settings-section {
        padding: 12px 16px;
        margin-bottom: 16px;
    }
    
    .setting-item:hover {
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .time-range-picker {
        flex-wrap: wrap;
    }
    
    .time-range-picker select {
        flex: 1;
        min-width: 80px;
    }
    
    .sound-vibration-toggles {
        flex-wrap: wrap;
    }
    
    .toggle-pill {
        flex: 1;
        justify-content: center;
    }
}
