/* Cabecera, aviso global y modal de reportes (antes estilos en línea en views/layout/header.php y footer.php).
   Se carga la última y va anclada a los ID para mantener la prioridad que tenían los estilos en línea
   sobre style.css, theme-nova.css y las hojas de cada vista. Clases hd- (cabecera) y ft- (pie). */

/* ---------- Aviso global flotante ---------- */
#globalAnnouncementBanner { position: fixed; bottom: 2rem; right: 2rem; background: rgba(21, 24, 36, 0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1.5px solid var(--primary); border-radius: var(--border-radius-md); padding: 1rem 3.5rem 1rem 1.5rem; color: var(--text-white); z-index: 10000; box-shadow: 0 10px 40px rgba(16, 185, 129, 0.25); max-width: 380px; animation: slideInUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex; align-items: center; gap: 0.8rem; }
#globalAnnouncementBanner .hd-banner-icon { background: rgba(16, 185, 129, 0.15); width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); flex-shrink: 0; animation: pulseGlow 2s infinite; }
#globalAnnouncementBanner .hd-banner-icon i { font-size: 1.1rem; }
#globalAnnouncementBanner .hd-banner-text { font-size: 0.88rem; font-weight: 600; line-height: 1.4; flex: 1; }
#globalAnnouncementBanner .hd-banner-close { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.25rem; display: flex; align-items: center; justify-content: center; padding: 0; transition: color 0.2s; }
#globalAnnouncementBanner .hd-banner-close:hover { color: var(--text-white); }

/* ---------- Acciones de móvil ---------- */
#appHeader .mobile-actions-wrapper { display: flex; align-items: center; gap: 0.5rem; }
#appHeader .hd-mbell { position: relative; text-decoration: none; display: flex; align-items: center; justify-content: center; }
#appHeader .hd-mbell i { color: var(--text-white); }
#appHeader .hd-mbell.is-unread i { color: var(--primary); }
#appHeader .hd-mbell-count { position: absolute; top: 4px; right: 4px; background: #ef4444; color: white; font-size: 0.6rem; font-weight: 800; border-radius: 50%; width: 15px; height: 15px; display: flex; align-items: center; justify-content: center; border: 1.5px solid #090a0f; }

/* ---------- Cajón lateral (móvil) ---------- */
#appHeader .drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; border-bottom: 1px solid var(--border-glass); padding-bottom: 0.8rem; width: 100%; }
#appHeader .hd-drawer-title { font-family: var(--font-heading); font-weight: 800; font-size: 1.15rem; color: var(--text-white); display: flex; align-items: center; gap: 0.5rem; }
#appHeader .hd-drawer-title i { font-size: 1.2rem; }
#appHeader .drawer-close-btn { background: transparent; border: none; color: var(--text-muted); font-size: 1.4rem; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; outline: none; transition: var(--transition-smooth); }
#appHeader .drawer-close-btn:hover { color: var(--text-white); }
#appHeader .drawer-user-box { width: 100%; margin-bottom: 1.2rem; background: rgba(255,255,255,0.03); border: 1px solid var(--border-glass); border-radius: 12px; padding: 0.9rem; }
#appHeader .hd-duser { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
#appHeader .hd-duser-avatar { width: 40px; height: 40px; border-radius: 50%; }
#appHeader img.hd-duser-avatar { object-fit: cover; border: 2px solid var(--primary); }
#appHeader div.hd-duser-avatar { background: rgba(16,185,129,0.15); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
#appHeader .hd-duser-info { flex: 1; min-width: 0; }
#appHeader .hd-duser-name { font-weight: 700; color: #fff; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#appHeader .hd-duser-role { font-size: 0.75rem; color: var(--primary); font-weight: 600; }
#appHeader .hd-dbtns { display: flex; gap: 0.5rem; }
#appHeader .hd-dbtns a { text-align: center; border-radius: 6px; padding: 0.4rem 0.7rem; font-size: 0.8rem; font-weight: 600; text-decoration: none; }
#appHeader .hd-dbtns a.hd-dbtn-profile { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid var(--border-glass); padding: 0.4rem; color: #fff; }
#appHeader .hd-dbtns a.hd-dbtn-admin { background: rgba(16,185,129,0.15); border: 1px solid var(--primary); font-weight: 700; color: var(--primary); }
#appHeader .hd-dbtns a.hd-dbtn-logout { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #ef4444; }
#appHeader .hd-dguest { text-align: center; }
#appHeader .hd-dguest p { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.75rem; }
#appHeader .hd-dguest .hd-dbtns a { flex: 1; border-radius: 8px; padding: 0.5rem; font-size: 0.85rem; font-weight: 700; }
#appHeader .hd-dguest .hd-dbtns a.hd-dbtn-login { background: rgba(255,255,255,0.06); border: 1px solid var(--border-glass); color: #fff; }
#appHeader .hd-dguest .hd-dbtns a.hd-dbtn-register { background: var(--primary); color: #000; }

/* ---------- Botón Zona VIP ---------- */
#appHeader .nav-vip-btn { background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.12) 100%); border: 1.5px solid #f59e0b; color: #fbbf24 !important; font-weight: 800; border-radius: 8px; padding: 0.35rem 0.85rem; display: inline-flex; align-items: center; gap: 5px; box-shadow: 0 0 15px rgba(245, 158, 11, 0.25); text-decoration: none; margin-right: 0.2rem; transition: transform 0.2s; }
#appHeader .nav-vip-btn:hover { transform: scale(1.05); }
#appHeader .nav-vip-btn i { color: #fbbf24; }

/* ---------- Menú: iconos, acordeón móvil y desplegable de escritorio ---------- */
#appHeader .hd-ic { color: var(--primary); }
#appHeader .hd-ic-link { margin-right: 0.35rem; }
#appHeader .hd-acc { width: 100%; padding: 0 0.8rem; margin: 0.25rem 0; }
#appHeader .hd-acc details { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.04); padding-bottom: 0.3rem; }
#appHeader .hd-acc summary { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0.4rem; color: var(--text-muted); font-size: 0.95rem; font-weight: 600; cursor: pointer; list-style: none; outline: none; }
#appHeader .hd-acc summary.is-active { color: var(--primary); }
#appHeader .hd-acc summary .hd-ic { margin-right: 0.55rem; }
#appHeader .hd-acc summary .bi-chevron-down { font-size: 0.75rem; }
#appHeader .hd-acc-list { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.65rem; padding-bottom: 0.6rem; margin-top: 0.2rem; }
#appHeader .hd-acc-list a { color: var(--text-muted); font-size: 0.9rem; font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: 0.45rem; }
#appHeader .hd-acc-list a.is-active { color: var(--primary); }
#appHeader .menu-dropdown-container { position: relative; display: inline-block; }
#appHeader .menu-dropdown-trigger { background: transparent; border: none; font-size: 0.95rem; font-weight: 600; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.75rem; outline: none; transition: var(--transition-smooth); }
#appHeader .menu-dropdown-trigger .bi-chevron-down { font-size: 0.7rem; }
#appHeader .menu-dropdown-menu { display: none; position: absolute; left: 50%; transform: translateX(-50%); top: 100%; min-width: 190px; background: rgba(16, 18, 26, 0.96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--border-glass); border-radius: var(--border-radius-sm); z-index: 1020; box-shadow: 0 10px 30px rgba(0,0,0,0.5); padding: 0.5rem 0; margin-top: 5px; }
#appHeader .menu-dropdown-menu a { display: flex; align-items: center; gap: 0.6rem; color: var(--text-muted); padding: 0.65rem 1.2rem; font-size: 0.9rem; font-weight: 600; transition: var(--transition-smooth); width: 100%; text-decoration: none; }
#appHeader .menu-dropdown-menu a.is-active { color: var(--primary); }
#appHeader .menu-dropdown-menu a:hover { background: rgba(16,185,129,0.12); color: var(--primary); }

/* ---------- Zona de usuario y buscador ---------- */
#appHeader #dynamicHeaderUserArea { display: inline-flex; align-items: center; gap: 0.8rem; flex-wrap: nowrap; }
#appHeader .search-wrapper { position: relative; margin-right: 0.4rem; }
#appHeader #searchSuggestionsDropdown { display: none; position: absolute; top: calc(100% + 8px); right: 0; width: 320px; background: rgba(21, 24, 36, 0.98); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border-glass); border-radius: var(--border-radius-sm); z-index: 1050; box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5); padding: 0.5rem 0; overflow: hidden; max-height: 480px; }
#appHeader #suggestionsList, #appHeader #mobileSuggestionsList { display: flex; flex-direction: column; }
#appHeader #mobileSuggestionsDropdown { display: none; }

/* ---------- Campana y desplegable de notificaciones ---------- */
#appHeader .nav-bell-container { position: relative; display: inline-flex; align-items: center; margin-right: 0.2rem; }
#appHeader .nav-bell-link { position: relative; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; padding: 0.4rem; cursor: pointer; }
#appHeader .nav-bell-link > i { font-size: 1.15rem; color: var(--text-muted); transition: color 0.2s; }
#appHeader .nav-bell-link.is-unread > i { color: var(--primary); animation: bellShake 1.8s infinite ease-in-out; }
#appHeader .bell-badge { position: absolute; top: 0px; right: -2px; background: #ef4444; color: white; font-size: 0.65rem; font-weight: 800; border-radius: 50%; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; border: 1.5px solid #090a0f; box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }
#appHeader #bellDropdownMenu { display: none; position: absolute; right: 0; top: calc(100% + 10px); width: 340px; max-width: calc(100vw - 24px); background: rgba(13, 15, 23, 0.98); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7); z-index: 999999; overflow: hidden; }
#appHeader .hd-bell-head { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.02); }
#appHeader .hd-bell-title { font-size: 0.9rem; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 6px; }
#appHeader .hd-bell-readall { background: transparent; border: none; color: var(--primary); font-size: 0.75rem; font-weight: 700; cursor: pointer; padding: 0; display: flex; align-items: center; gap: 4px; }
#appHeader .hd-bell-readall i { font-size: 1rem; }
#appHeader .hd-bell-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; }
#appHeader .hd-bell-empty { padding: 2rem 1rem; text-align: center; color: var(--text-muted); font-size: 0.85rem; }
#appHeader .hd-bell-empty i { font-size: 2rem; display: block; margin-bottom: 0.5rem; opacity: 0.4; }
#appHeader .notif-dropdown-item { display: block; padding: 0.9rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,0.04); text-decoration: none; transition: background 0.2s; background: transparent; }
#appHeader .notif-dropdown-item.is-unread { background: rgba(16, 185, 129, 0.08); }
#appHeader .notif-dropdown-item:hover { background: rgba(255,255,255,0.06); }
#appHeader .hd-notif-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
#appHeader .hd-notif-title { font-size: 0.85rem; font-weight: 700; color: #fff; line-height: 1.3; }
#appHeader .hd-notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); display: inline-block; flex-shrink: 0; box-shadow: 0 0 8px var(--primary); }
#appHeader .notif-dropdown-item:not(.is-unread) .hd-notif-dot { background-color: transparent; }
#appHeader .hd-notif-text { font-size: 0.78rem; color: #9ca3af; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; }
#appHeader .hd-notif-time { font-size: 0.7rem; color: #6b7280; display: flex; align-items: center; gap: 4px; }
#appHeader .hd-bell-all { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0.75rem; background: rgba(255,255,255,0.02); border-top: 1px solid rgba(255,255,255,0.08); color: var(--primary); font-size: 0.82rem; font-weight: 700; text-decoration: none; transition: background 0.2s; }
#appHeader .hd-bell-all:hover { background: rgba(16,185,129,0.1); }
#appHeader .hd-bell-all i { font-size: 1.1rem; }

/* ---------- Perfil, admin y salir ---------- */
#appHeader .nav-profile-link { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; font-size: 0.84rem; font-weight: 700; }
#appHeader .hd-pavatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--primary); }
#appHeader .hd-picon { color: var(--primary); font-size: 1rem; }
#appHeader .nav-profile-link.is-vip .hd-pavatar { border-color: #f59e0b; }
#appHeader .nav-profile-link.is-vip .hd-picon { color: #f59e0b; }
#appHeader .vip-badge-pill { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); color: #000; font-size: 0.62rem; font-weight: 900; padding: 1px 5px; border-radius: 4px; box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
#appHeader .hd-admin, #appHeader .hd-logout { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; font-size: 0.82rem; font-weight: 700; }
#appHeader .hd-admin { color: var(--primary); }
#appHeader .hd-logout { color: #ef4444; }
#appHeader .hd-ic-white { color: var(--text-white); }

/* ---------- Pie y modal de reportes ---------- */
.app-footer .footer-links .ft-link-icon { margin-right: 4px; }
#reportModal { display: none; }
#reportModal .ft-ic-flag { color: var(--primary); }
#reportModal .ft-ic-bug { color: #ef4444; }
#reportModal .ft-ic-link { color: #f59e0b; }
#reportModal .report-type-selector { display: flex; gap: 10px; margin-bottom: 15px; }
#reportModal .form-group { margin-bottom: 12px; }
#reportModal .form-group.ft-gap-lg { margin-bottom: 15px; }
#reportModal .form-group label { display: block; font-size: 13px; font-weight: 600; color: #9ca3af; margin-bottom: 4px; }
#reportModal .ft-ic-clip { color: #10b981; }
#reportModal textarea.report-input { resize: vertical; }
#reportModal input[type="file"].report-input { padding: 6px 12px; font-size: 0.82rem; }
#reportModal .form-group small { display: block; color: #6b7280; font-size: 11px; margin-top: 4px; }
#reportModal #reportAlert { padding: 10px; border-radius: 6px; font-size: 13px; margin-bottom: 12px; }
#reportModal #reportAlert[hidden] { display: none; }
#reportModal #reportAlert.is-ok { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
#reportModal #reportAlert.is-error { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Estados que activa el JS */
#globalAnnouncementBanner[hidden] { display: none; }
#appHeader #searchSuggestionsDropdown.is-open, #appHeader #mobileSuggestionsDropdown.is-open, #appHeader #bellDropdownMenu.is-open { display: block; }
#reportModal.is-open { display: flex; }
