:root {
  /* Dark Theme (Default) */
  --bg-color: #07080b;
  --bg-radial: radial-gradient(circle at 50% 0%, rgba(255, 30, 39, 0.12) 0%, rgba(7, 8, 11, 0) 50%);
  --bg-card: #111319;
  --bg-card-hover: #161922;
  --text-main: #ffffff;
  --text-muted: #8e95a5;
  --border-color: #202430;
  --header-bg: rgba(11, 13, 19, 0.88);
  --header-border: #1b1e28;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --input-bg: #161922;
  --input-border: #282d3c;
  --input-text: #ffffff;
  --theme-toggle-bg: #141720;
  
  /* Shared Brand Accents */
  --accent-red: #ff1e27;
  --accent-red-hover: #e00b14;
  --accent-red-glow: rgba(255, 30, 39, 0.35);
  --accent-green: #11a842;
  --accent-green-hover: #0e8c37;
  --accent-green-glow: rgba(17, 168, 66, 0.35);
  
  /* Modal Tokens */
  --modal-bg: #ffffff;
  --modal-text: #0e1118;
  --modal-text-muted: #555b6d;
  --modal-border: #ff1e27;
  --modal-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(255, 30, 39, 0.4);
  
  --border-radius: 16px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-color: #f5f7fb;
  --bg-radial: radial-gradient(circle at 50% 0%, rgba(255, 30, 39, 0.08) 0%, rgba(245, 247, 251, 0) 50%);
  --bg-card: #ffffff;
  --bg-card-hover: #fcfdfe;
  --text-main: #0c1017;
  --text-muted: #5e6678;
  --border-color: #e2e6f0;
  --header-bg: rgba(255, 255, 255, 0.92);
  --header-border: #e6ebf5;
  --card-shadow: 0 6px 24px rgba(12, 16, 23, 0.06);
  --input-bg: #f8fafc;
  --input-border: #dbe2ee;
  --input-text: #0c1017;
  --theme-toggle-bg: #e6eaf2;
  
  --modal-shadow: 0 25px 70px rgba(12, 16, 23, 0.25), 0 0 35px rgba(255, 30, 39, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

body {
  background-color: var(--bg-color);
  background-image: var(--bg-radial);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: var(--transition);
}

/* Call to Action Buttons */
.btn-primary {
  background: linear-gradient(135deg, #ff2a2a, #d60000);
  color: white;
  padding: 12px 26px;
  border-radius: 9999px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 18px var(--accent-red-glow);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 30, 39, 0.55);
}

.btn-secondary {
  background: linear-gradient(135deg, #16c946, #0e9634);
  color: white;
  padding: 12px 26px;
  border-radius: 9999px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 18px var(--accent-green-glow);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: var(--transition);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(22, 201, 70, 0.55);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 18px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-red);
}

[data-theme="light"] .btn-outline:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Cards */
.card {
  background-color: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 24px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}
.card:hover {
  background-color: var(--bg-card-hover);
  border-color: rgba(255, 30, 39, 0.4);
  transform: translateY(-3px);
}

.input-field {
  width: 100%;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--input-text);
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 15px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}
.input-field:focus {
  outline: none;
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(255, 30, 39, 0.2);
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* Modal Overlay - Glassmorphism Premium */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(6, 8, 14, 0.78);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 85px 16px 22px;
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  animation: fadeIn 0.25s ease-out;
}

#nickname-confirm-modal {
  z-index: 1100 !important;
}

/* Bloqueo total de scroll de la página de fondo cuando cualquier modal esté activo */
html.modal-open,
body.modal-open {
  overflow: hidden !important;
  touch-action: none !important;
}

/* Modal Content Card */
.modal-content {
  background: #ffffff;
  color: #0e1118;
  border-radius: 26px;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 110px);
  position: relative;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 35px rgba(255, 30, 39, 0.35);
  animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 3.5px solid var(--accent-red);
  margin: auto;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

[data-theme="dark"] .modal-content {
  background: #11131a;
  color: #f1f5f9;
}

[data-theme="light"] .modal-content {
  background: #ffffff;
  color: #0e1118;
}

/* Cabecera Fija del Modal */
.modal-header-fixed {
  padding: 26px 30px 10px;
  flex-shrink: 0;
  background: #ffffff;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  transition: background var(--transition);
}

[data-theme="dark"] .modal-header-fixed {
  background: #11131a;
}

[data-theme="light"] .modal-header-fixed {
  background: #ffffff;
}

.modal-title-row {
  margin-top: 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

#modal-title {
  color: #0e1118;
  transition: color var(--transition);
}

[data-theme="dark"] #modal-title {
  color: #ffffff !important;
}

[data-theme="light"] #modal-title {
  color: #0e1118 !important;
}

/* Cuerpo con Scroll Independiente */
.modal-body-scrollable {
  padding: 4px 30px 16px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Texto de la Novedad Dinámico para Modo Oscuro y Modo Claro */
#modal-body-content {
  color: #2d3342;
  transition: color var(--transition);
}

#modal-body-content p,
.modal-paragraph {
  font-size: 0.98rem;
  color: #2d3342;
  line-height: 1.55;
  margin-bottom: 8px;
  font-weight: 500;
  transition: color var(--transition);
}

[data-theme="dark"] #modal-body-content,
[data-theme="dark"] #modal-body-content p,
[data-theme="dark"] .modal-paragraph {
  color: #f1f5f9 !important;
}

[data-theme="light"] #modal-body-content,
[data-theme="light"] #modal-body-content p,
[data-theme="light"] .modal-paragraph {
  color: #2d3342 !important;
}

[data-theme="dark"] .checklist-text {
  color: #f1f5f9 !important;
}

[data-theme="light"] .checklist-text {
  color: #1c2230 !important;
}

[data-theme="dark"] .alert-warning {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fef3c7 !important;
  border-left-color: #f59e0b !important;
}

[data-theme="dark"] #modal-comments-drawer h4 {
  color: #ffffff !important;
}

[data-theme="light"] #modal-comments-drawer h4 {
  color: #0e1118 !important;
}

.modal-body-scrollable::-webkit-scrollbar {
  width: 6px;
}
.modal-body-scrollable::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
.modal-body-scrollable::-webkit-scrollbar-thumb:hover {
  background: var(--accent-red);
}

/* Footer Fijo del Modal con Botones de Acción Siempre Visibles */
.modal-actions-footer {
  padding: 14px 26px 18px;
  background: #ffffff;
  border-top: 1.5px solid #edf2f7;
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
  flex-shrink: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: background var(--transition), border-color var(--transition);
}

[data-theme="dark"] .modal-actions-footer {
  background: #11131a;
  border-top-color: #232738;
}

[data-theme="light"] .modal-actions-footer {
  background: #ffffff;
  border-top-color: #edf2f7;
}

.modal-action-btn {
  flex: 1;
  min-height: 48px;
  padding: 12px 18px;
  font-size: 0.92rem;
  font-weight: 800;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
}

@keyframes modalPop {
  0% { opacity: 0; transform: translateY(30px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #101216;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  border: 2px solid #2a2e3d;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: var(--transition);
}
.modal-close:hover {
  transform: scale(1.1) rotate(90deg);
  background: var(--accent-red);
  border-color: var(--accent-red);
}

/* Mascot Peeking Over Top - Head and Headphones 100% Intact */
.mascot-container {
  position: absolute;
  top: -65px;
  left: 50%;
  transform: translateX(-50%);
  width: 145px;
  height: 85px;
  pointer-events: none;
  z-index: 35;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.mascot-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.55));
  animation: mascotPeek 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mascotPeek {
  0% { transform: translateY(35px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Layout and Header Spacing with Clean Side Margins */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  padding: 16px 0;
  border-bottom: 1px solid var(--header-border);
  background-color: var(--header-bg);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 clamp(20px, 4vw, 48px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-divider {
  width: 1px;
  height: 36px;
  background-color: var(--border-color);
}

.header-text h1 {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}
.header-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

/* Main Content Area Centered with Roomy Margins */
.main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 40px clamp(20px, 4vw, 48px);
}

/* Footer Centered with Matching Margins */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 clamp(20px, 4vw, 48px);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Theme Toggle Control */
.theme-switch {
  background: var(--theme-toggle-bg);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 4px;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  width: 68px;
  height: 34px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
  transition: var(--transition);
}

.theme-switch-thumb {
  position: absolute;
  top: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-red);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--accent-red-glow);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s;
}

[data-theme="dark"] .theme-switch-thumb {
  left: 4px;
  transform: translateX(0);
}

[data-theme="light"] .theme-switch-thumb {
  left: 4px;
  transform: translateX(32px);
}

.theme-switch-icons {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 6px;
  color: var(--text-muted);
  pointer-events: none;
}

/* ================= EMOJIS Y ARTE VECTORIAL ANIMADO MINIMALISTA ================= */
.vector-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.2s, color 0.2s;
}

.vector-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Keyframes de animación continua */
@keyframes vector-shake {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(-14deg) scale(1.06); }
  30% { transform: rotate(14deg) scale(1.06); }
  45% { transform: rotate(-8deg); }
  60% { transform: rotate(8deg); }
  75% { transform: rotate(0deg); }
}

@keyframes vector-sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
  50% { transform: scale(1.22) rotate(16deg); opacity: 1; filter: drop-shadow(0 0 6px var(--accent-red-glow)); }
}

@keyframes vector-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@keyframes vector-spin-slow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes vector-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes vector-tap {
  0%, 100% { transform: translate(0, 0) scale(1); }
  30% { transform: translate(1px, 2px) scale(0.92); }
  60% { transform: translate(-1px, -1px) scale(1.06); }
}

@keyframes vector-bounce {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-4px); }
  70% { transform: translateY(1px); }
}

/* Clases de animación activa */
.emoji-animated,
.anim-shake {
  display: inline-flex;
  animation: vector-shake 2.4s infinite ease-in-out;
  transform-origin: bottom center;
}

.anim-sparkle,
.anim-twinkle {
  display: inline-flex;
  animation: vector-sparkle 2.6s infinite ease-in-out;
}

.anim-pulse {
  display: inline-flex;
  animation: vector-pulse 2.2s infinite ease-in-out;
}

.anim-spin-slow {
  display: inline-flex;
  animation: vector-spin-slow 16s infinite linear;
}

.anim-float {
  display: inline-flex;
  animation: vector-float 2.6s infinite ease-in-out;
}

.anim-tap {
  display: inline-flex;
  animation: vector-tap 2.2s infinite ease-in-out;
}

.anim-bounce {
  display: inline-flex;
  animation: vector-bounce 2.2s infinite ease-in-out;
}

/* Micro-animaciones en interacciones Hover */
.btn-primary:hover .vector-hover-slide,
.btn-secondary:hover .vector-hover-slide,
.btn-outline:hover .vector-hover-slide,
.action-hover-trigger:hover .vector-hover-slide {
  transform: translateX(4px);
}

.btn-primary:hover .vector-hover-spin,
.btn-secondary:hover .vector-hover-spin,
.btn-outline:hover .vector-hover-spin,
.action-hover-trigger:hover .vector-hover-spin {
  transform: rotate(180deg);
}

.btn-primary:hover .vector-hover-bounce,
.btn-secondary:hover .vector-hover-bounce,
.btn-outline:hover .vector-hover-bounce,
.action-hover-trigger:hover .vector-hover-bounce {
  transform: translateY(-3px) scale(1.1);
}

.btn-icon-danger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background-color 0.2s, transform 0.2s;
}

.btn-icon-danger:hover {
  color: #ff4d4d !important;
  background: rgba(255, 77, 77, 0.12);
  transform: scale(1.16) rotate(6deg);
}

/* Visibility Utility */
.view-hidden {
  display: none !important;
}

/* Vector Browser Mockup */
.browser-vector {
  width: 115px;
  background: #f1f3f7;
  border-radius: 12px;
  border: 1.5px solid #dbe0eb;
  padding: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.browser-dots {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.browser-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Checklist items */
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  transition: transform 0.2s ease;
}
.checklist-item:hover {
  transform: translateX(3px);
}
.checklist-icon {
  color: #11a842;
  flex-shrink: 0;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.checklist-item:hover .checklist-icon {
  transform: scale(1.22);
}
.checklist-text {
  font-size: 0.98rem;
  font-weight: 600;
  color: #1c2230;
  line-height: 1.45;
}

/* Warning alert */
.alert-warning {
  margin-top: 16px;
  background: #fff9e6;
  border-left: 4px solid #f59e0b;
  padding: 12px 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #92400e;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.alert-warning:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.16);
}
.alert-warning-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #f59e0b;
}

/* Admin Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  padding: 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.admin-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-color);
}

/* ================= DISEÑO UNIFICADO DE NOVEDADES (PC y MÓVIL) ================= */
.client-layout-container {
  width: 100%;
  box-sizing: border-box;
}

.novedades-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

@media (max-width: 1040px) {
  .novedades-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .novedades-grid {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }
}

/* Tarjeta Principal Horizontal */
.novedad-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 16px;
  gap: 16px;
  background: #0b0c10;
  border: 1px solid #1a1c23;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.novedad-card:hover {
  background: #11131a;
  border-color: rgba(255, 30, 39, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 30, 39, 0.15);
}

.novedad-card.pinned-card {
  border-color: rgba(255, 30, 39, 0.3);
  background: linear-gradient(180deg, rgba(255, 30, 39, 0.05) 0%, #0b0c10 100%);
}

/* Contenedor del Megáfono Animado */
.card-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 30, 39, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Sección Central de Texto (Expandible) */
.card-text-container {
  flex: 1; /* Esto hace que ocupe todo el espacio disponible */
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
  min-width: 0; /* Vital para que el texto largo se corte con puntos suspensivos (...) */
}

.card-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Esto hace que el título se corte si es muy largo */
  text-transform: uppercase;
}

/* Estadísticas pequeñas debajo del título */
.card-compact-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  margin-top: 2px;
}

/* Lado Derecho: Etiquetas y Flecha */
.card-action-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.badge-solid {
  background: var(--accent-red);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 9999px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
}

.badge-solid.pinned {
  background: rgba(255, 30, 39, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(255, 30, 39, 0.4);
}

.action-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 30, 39, 0.08);
  color: var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 30, 39, 0.25);
  transition: all 0.2s;
}

.novedad-card:hover .action-circle {
  background: var(--accent-red);
  color: white;
  transform: translateX(3px);
}

/* Badges */
.badge-pinned {
  background: rgba(255, 30, 39, 0.14);
  color: var(--accent-red);
  border: 1px solid rgba(255, 30, 39, 0.35);
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
}

.badge-views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Comentarios: Fondos 100% Sólidos y Opacos (Nunca Transparentes) */
.comment-card-user {
  background: #ffffff !important;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  color: #1e293b;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.comment-card-admin {
  background: #fff1f2 !important; /* Fondo rosa/rojo suave 100% sólido y opaco */
  border: 1.5px solid #ffccd0 !important;
  border-radius: 12px;
  padding: 12px 16px;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(255, 30, 39, 0.08);
}

.admin-comment-mascot {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
  border: 1.5px solid var(--accent-red);
  box-shadow: 0 1px 4px rgba(255, 30, 39, 0.3);
  display: inline-block;
  vertical-align: middle;
}

.comment-admin-author {
  font-weight: 800;
  font-size: 0.86rem;
  color: var(--accent-red);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Botones de ayuda para insertar iconos animados en panel Admin */
.btn-tag-helper {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-tag-helper:hover {
  border-color: var(--accent-red);
  background: rgba(255, 30, 39, 0.1);
  color: var(--accent-red);
  transform: translateY(-1px);
}

/* Botón Pin en Dashboard */
.btn-pin-active {
  background: rgba(255, 30, 39, 0.15) !important;
  border: 1px solid var(--accent-red) !important;
  color: var(--accent-red) !important;
  font-weight: 800;
}

/* ================= BOTONES DEL HEADER Y SEPARACIÓN ================= */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px; /* Separación amplia y limpia entre botones */
}

.pwa-install-btn {
  cursor: pointer;
  transition: var(--transition);
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.pwa-install-btn:hover {
  border-color: var(--accent-red);
  background: rgba(255, 30, 39, 0.08);
  transform: translateY(-2px);
}

#notification-header-btn {
  padding: 8px 12px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
#notification-header-btn:hover {
  border-color: var(--accent-green);
  background: rgba(22, 201, 70, 0.08);
  transform: translateY(-2px);
}

#user-profile-header-btn {
  padding: 8px 12px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
#user-profile-header-btn:hover {
  border-color: var(--accent-red);
  background: rgba(255, 30, 39, 0.08);
  transform: translateY(-2px);
}

/* Toast Notificaciones Flotante */
.hedam-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hedam-toast-inner {
  background: var(--bg-card);
  border: 1px solid var(--accent-red);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(12px);
}

/* ================= MODAL TUTORIAL NOTIFICACIONES (MUÑECA ROSADA) ================= */
#notif-tutorial-modal {
  z-index: 10050 !important;
  padding: 24px 20px !important;
}

.notif-tutorial-card {
  background: #ffffff;
  color: #0e1118;
  border-radius: 28px;
  width: 100%;
  max-width: 490px;
  position: relative;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 45px rgba(255, 30, 39, 0.4);
  animation: modalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border: 3px solid var(--accent-red);
  padding: 34px 28px 24px;
  text-align: center;
  margin: 0 auto;
}

[data-theme="dark"] .notif-tutorial-card {
  background: #11131a;
  color: #ffffff;
  border-color: rgba(255, 30, 39, 0.85);
}

.notif-mascot-container {
  position: absolute;
  left: -155px;
  bottom: -6px;
  width: 165px;
  height: 420px;
  max-height: 98%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.notif-mascot-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 14px rgba(255, 30, 39, 0.35));
}

@media (max-width: 840px) {
  .notif-mascot-container {
    left: -115px;
    width: 130px;
    height: 350px;
  }
}

@media (max-width: 640px) {
  .notif-mascot-container {
    left: -15px;
    bottom: -6px;
    width: 85px;
    height: 200px;
    opacity: 0.95;
  }
}

.badge-notif-pill {
  background: rgba(255, 30, 39, 0.1);
  border: 1px solid rgba(255, 30, 39, 0.3);
  color: var(--accent-red);
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.notif-title {
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 8px;
}

.notif-subtitle {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.45;
  margin-bottom: 20px;
}

[data-theme="dark"] .notif-subtitle {
  color: #94a3b8;
}

.notif-steps-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 16px 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

[data-theme="dark"] .notif-steps-box {
  background: #171b26;
  border-color: #272f42;
}

.notif-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notif-step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-red);
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--accent-red-glow);
}

.notif-step-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.35;
}

[data-theme="dark"] .notif-step-text {
  color: #e2e8f0;
}

.notif-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notif-btn-main {
  width: 100%;
  padding: 14px 20px;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 9999px;
  box-shadow: 0 6px 20px var(--accent-red-glow);
}

.notif-btn-secondary {
  width: 100%;
  padding: 11px 18px;
  font-size: 0.85rem;
  justify-content: center;
  border-radius: 9999px;
}

/* ================= BADGE DE ALIAS Y GESTIÓN DE PERFIL ================= */
.comment-author-badge {
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
  color: #334155;
  box-sizing: border-box;
}

[data-theme="dark"] .comment-author-badge {
  background: #171a24;
  border-color: #2b3244;
  color: #cbd5e1;
}

.comment-author-badge strong {
  color: var(--accent-red);
  font-weight: 800;
}

.btn-change-alias {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-change-alias:hover {
  color: var(--accent-red);
  border-color: rgba(255, 30, 39, 0.3);
  background: rgba(255, 30, 39, 0.1);
}

/* ================= RESPONSIVE DESIGN TOTAL PARA CELULARES Y TABLETS ================= */
@media (max-width: 960px) {
  .main-content {
    padding: 24px 20px;
  }
}

@media (max-width: 640px) {
  /* Header Móvil Ultra Optimizado: Espacio sin recortes */
  .header {
    padding: 10px 0;
  }
  .header-inner {
    padding: 0 10px;
    gap: 8px;
  }
  .header-title-container {
    gap: 8px;
  }
  #logo-clickable img {
    height: 28px !important;
  }
  #logo-clickable span {
    font-size: 1.05rem !important;
  }
  .header-divider,
  .header-text {
    display: none !important;
  }
  
  .header-actions {
    gap: 5px;
    flex-shrink: 0;
  }

  #header-refresh-btn {
    display: none !important;
  }
  
  #header-refresh-btn.installed-mobile {
    display: inline-flex !important;
    padding: 6px 8px !important;
  }

  .pwa-install-btn {
    padding: 6px 9px;
    font-size: 0.75rem;
    gap: 4px;
  }
  .pwa-install-btn span:not(.vector-icon-wrap) {
    font-size: 0.75rem;
  }

  #notification-header-btn,
  #user-profile-header-btn {
    padding: 6px 8px;
  }

  .theme-switch {
    width: 48px;
    height: 26px;
    flex-shrink: 0;
  }
  .theme-switch-thumb {
    width: 20px;
    height: 20px;
    top: 3px;
    left: 3px;
  }
  [data-theme="light"] .theme-switch-thumb {
    transform: translateX(22px);
  }
  .theme-switch-icons svg {
    width: 11px;
    height: 11px;
  }

  .main-content {
    padding: 16px 14px;
  }

  .card {
    padding: 24px 16px;
    border-radius: 18px;
  }
  .viewer-card {
    padding: 20px 16px;
    border-radius: 20px;
    border-width: 2.5px;
  }

  html.modal-open {
    overflow: hidden !important;
    height: 100% !important;
  }
  body.modal-open {
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    touch-action: none !important;
    -webkit-overflow-scrolling: auto !important;
    overscroll-behavior: none !important;
  }

  .modal-overlay {
    padding: 72px 12px 14px;
    align-items: center;
    box-sizing: border-box;
  }
  .modal-content {
    margin: auto;
    border-radius: 20px;
    border-width: 2.5px;
    max-height: calc(100dvh - 86px);
    max-width: 100%;
    overflow: visible;
  }
  .modal-header-fixed {
    padding: 18px 18px 8px;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
  }
  .modal-body-scrollable {
    padding: 2px 18px 12px;
  }
  .modal-actions-footer {
    padding: 8px 10px 12px;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    gap: 6px;
  }
  .modal-action-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 38px;
    padding: 7px 4px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: -0.2px;
    gap: 5px;
    border-radius: 10px;
    white-space: nowrap;
    overflow: hidden;
  }
  .modal-action-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .modal-action-btn svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
  }
  .modal-action-btn .vector-hover-slide {
    display: none !important;
  }
  @media (max-width: 360px) {
    .modal-action-btn {
      font-size: 0.67rem !important;
      padding: 6px 3px !important;
      gap: 3px !important;
    }
  }
  .mascot-container {
    width: 110px;
    height: 68px;
    top: -52px;
  }
  .modal-close {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
  }

  #modal-title {
    font-size: 1.35rem !important;
    line-height: 1.25 !important;
  }

  #modal-image-container img {
    max-height: 200px !important;
    border-radius: 12px;
  }

  .browser-vector {
    display: none !important;
  }

  .notif-tutorial-card {
    padding: 26px 18px 20px !important;
    border-radius: 22px !important;
    max-width: 100% !important;
  }
  .notif-title {
    font-size: 1.22rem !important;
  }
  .notif-subtitle {
    font-size: 0.82rem !important;
    margin-bottom: 14px !important;
  }
  .notif-steps-box {
    padding: 12px 14px !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }
  .notif-btn-main {
    padding: 12px 16px !important;
    font-size: 0.88rem !important;
  }
  .notif-btn-secondary {
    padding: 10px 16px !important;
    font-size: 0.82rem !important;
  }

  .comments-drawer-panel {
    padding: 18px 14px;
    border-radius: 16px;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .admin-table tr {
    margin-bottom: 16px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  }

  .admin-table td {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    text-align: right;
  }

  .admin-table td:last-child {
    border-bottom: none;
    padding-top: 12px;
    justify-content: flex-end;
  }

  .admin-table td::before {
    content: attr(data-label);
    font-weight: 800;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    margin-right: 12px;
    flex-shrink: 0;
  }

  .admin-table tr td[colspan] {
    border: none;
    display: block;
    text-align: center;
    padding: 24px 10px;
  }
  .admin-table tr td[colspan]::before {
    display: none;
  }

  #admin-create-announcement-form > div {
    grid-template-columns: 1fr !important;
  }

  .hedam-toast-container {
    bottom: 16px;
    right: 16px;
    left: 16px;
    justify-content: center;
  }
  .hedam-toast-inner {
    width: 100%;
    justify-content: center;
    font-size: 0.82rem;
    padding: 10px 16px;
  }
  
  /* Ajustes finales de la Tarjeta Unificada en Celulares */
  .card-action-container {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
  .action-circle {
    width: 28px;
    height: 28px;
  }
  .card-icon-box {
    width: 46px;
    height: 46px;
  }
  .card-title {
    font-size: 1rem;
  }

  /* FIX: FORMULARIO ADMIN EN MÓVILES */
  #admin-create-form-card,
  #admin-banner-form-card {
    padding: 20px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden; 
  }

  #admin-create-announcement-form .input-field,
  #admin-banner-form .input-field {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #admin-create-announcement-form div[style*="display: grid"],
  #admin-banner-form div[style*="display: grid"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  #admin-create-form-card div[style*="display: flex"] {
    flex-wrap: wrap !important;
  }

  .btn-tag-helper {
    flex: 1 1 100%;
    justify-content: center;
    padding: 10px 8px;
    margin-bottom: 2px;
  }

  #admin-create-form-card h3,
  #admin-banner-form-card h3 {
    font-size: 1.15rem !important;
    align-items: flex-start !important;
    line-height: 1.35 !important;
  }
  
  /* Ajustes exclusivos del banner para celulares */
  .promo-banner-card {
    max-width: 100%;
    border-radius: 14px;
  }
  .promo-banner-img {
    min-height: 60px;
    max-height: 110px;
  }
  .promo-banner-btn {
    right: 8px;
    bottom: 8px;
    font-size: 0.65rem;
    padding: 5px 10px;
  }
} /* <--- CIERRE ÚNICO Y CORRECTO DEL @media (max-width: 640px) */


/* ================= REGLAS GLOBALES (PC Y GENERAL) ================= */

#header-refresh-btn {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#header-refresh-btn:hover {
  background: rgba(59, 130, 246, 0.1) !important;
  border-color: #3b82f6 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* ================= FIX: CORRECCIÓN DE DESBORDE DE TARJETAS EN PC ================= */
.novedad-card {
  min-width: 0; /* Fuerza a la tarjeta a respetar el grid */
}

.card-text-container {
  min-width: 0; /* Vital para que el texto no empuje los bordes */
}

.card-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%; /* Asegura que el corte con (...) funcione */
}

/* Estilos para etiquetas nuevas en PC */
.badge-new {
  background: var(--accent-red);
  color: white;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ================= FASE 1: BANNER PROMOCIONAL 468x60 (GLOBAL) ================= */
.promo-banner-wrapper {
  width: 100%;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.promo-banner-card {
  position: relative;
  width: 100%;
  max-width: 680px;
  min-height: 60px;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 30, 39, 0.75);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 30, 39, 0.25);
  background: #0b0c10;
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.promo-banner-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65), 0 0 28px rgba(255, 30, 39, 0.4);
}

.promo-banner-img {
  width: 100%;
  height: auto;
  min-height: 68px;
  max-height: 135px;
  object-fit: cover;
  display: block;
}

.promo-banner-btn {
  position: absolute;
  right: 12px;
  bottom: 10px;
  background: linear-gradient(135deg, #fde047 0%, #eab308 100%);
  color: #090a0f;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 6px 13px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65), 0 0 12px rgba(250, 204, 21, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.promo-banner-card:hover .promo-banner-btn {
  transform: scale(1.05);
  filter: brightness(1.08);
}

/* ================= FASE 2: CHAT GLOBAL (UI/UX POTENCIADO) ================= */

/* Botón Base */
.btn-neon-chat {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 9999px;
  padding: 8px 12px;
  width: 100%;
  max-width: 600px;
  gap: 16px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
}

/* Estado: APAGADO (Gris y Opaco) */
.btn-neon-chat.chat-offline {
  background: #0f111a;
  border: 1.5px solid #2a2e3d;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.btn-neon-chat.chat-offline .neon-icon-circle {
  background: #1a1d26;
  border-color: #3b4255;
  box-shadow: none;
}
.btn-neon-chat.chat-offline .neon-arrow-circle {
  background: #2a2e3d;
  box-shadow: none;
}
.btn-neon-chat.chat-offline h3 {
  color: #64748b;
  text-shadow: none;
}

/* Estado: EN VIVO (Brillante 3D) */
.btn-neon-chat.chat-live {
  background: #0a0216;
  border: 1.5px solid #c084fc;
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.4), inset 0 0 15px rgba(168, 85, 247, 0.2);
}
.btn-neon-chat.chat-live:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.6), inset 0 0 20px rgba(168, 85, 247, 0.3);
  border-color: #d8b4fe;
}
.btn-neon-chat.chat-live .neon-icon-circle {
  background: radial-gradient(circle at top left, #d8b4fe 0%, #9333ea 100%);
  border-color: #e9d5ff;
  box-shadow: 0 0 20px #a855f7;
}
.btn-neon-chat.chat-live .neon-arrow-circle {
  background: radial-gradient(circle at top left, #c084fc 0%, #7e22ce 100%);
  box-shadow: 0 0 15px #a855f7;
}
.btn-neon-chat.chat-live h3 {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Elementos Internos del Botón */
.neon-icon-circle {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid transparent;
  position: relative;
  flex-shrink: 0;
  transition: all 0.4s ease;
}

.chat-status-dot {
  position: absolute; 
  bottom: 0px; 
  right: 2px; 
  width: 14px; 
  height: 14px; 
  border-radius: 50%; 
  border: 3px solid #090314;
  transition: background 0.4s ease;
}
.chat-status-dot.offline { background: #64748b; }
.chat-status-dot.live { background: #22c55e; box-shadow: 0 0 8px #22c55e; }

.neon-text-container {
  flex: 1; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center;
}

.neon-text-container h3 {
  font-size: 1.45rem; 
  font-weight: 900; 
  margin: 0; 
  line-height: 1; 
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.4s ease;
}

/* Subtítulo del botón */
.neon-subtext {
  font-size: 0.82rem;
  margin: 2px 0 0 0;
  font-weight: 500;
  transition: all 0.4s ease;
}

/* Color cuando está APAGADO */
.btn-neon-chat.chat-offline .neon-subtext {
  color: #475569;
}

/* Color cuando está EN VIVO */
.btn-neon-chat.chat-live .neon-subtext {
  color: #e9d5ff;
}

@media (max-width: 640px) {
  .neon-subtext {
    font-size: 0.7rem;
  }
}

.neon-arrow-circle {
  width: 42px; height: 42px; 
  border-radius: 50%; 
  display: flex; align-items: center; justify-content: center; 
  flex-shrink: 0;
  transition: all 0.4s ease;
}

/* Etiqueta Flotante EN VIVO */
.chat-floating-badge {
  position: absolute;
  top: -12px;
  left: 20px;
  display: inline-flex; 
  align-items: center; 
  gap: 4px; 
  background: #090314; 
  border: 1.5px solid #c084fc; 
  padding: 4px 10px; 
  border-radius: 12px; 
  font-size: 0.7rem; 
  font-weight: 900; 
  color: #e9d5ff; 
  letter-spacing: 0.8px;
  box-shadow: 0 4px 10px rgba(168, 85, 247, 0.4);
  z-index: 10;
  animation: floatBadge 3s ease-in-out infinite;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@media (max-width: 640px) {
  .btn-neon-chat { padding: 6px 10px; gap: 10px; }
  .neon-icon-circle { width: 44px; height: 44px; }
  .neon-arrow-circle { width: 36px; height: 36px; }
  .neon-text-container h3 { font-size: 1.15rem; }
  .chat-floating-badge { top: -10px; left: 15px; font-size: 0.65rem; padding: 3px 8px; }
}

/* ... (AQUÍ DEBAJO DEJAS EL RESTO DE TU CSS DEL CHAT, COMO .chat-live-modal, etc.) ... */

/* Modal Chat Live (Estilo TikTok / Rojo Oscuro) */
.chat-live-modal {
  background: #0a0a0c;
  border: 1.5px solid var(--accent-red);
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(255,30,39,0.3);
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  height: 85vh;
  max-height: 800px;
  overflow: hidden;
  margin: auto;
  animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 640px) {
  .chat-live-modal {
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
  }
}

/* ================= FIXES VISUALES Y TEMA CLARO ================= */

/* Dar más margen lateral al modal general en celular */
@media (max-width: 640px) {
  .modal-overlay {
    padding: 72px 20px 16px !important; /* Más aire a los lados */
  }
}

/* ---------------- TEMA CLARO: CHAT GLOBAL ---------------- */
[data-theme="light"] .chat-live-modal {
  background: #ffffff;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 0 20px rgba(255,30,39,0.15);
}
[data-theme="light"] .chat-live-modal > div:first-child {
  background: #f8fafc !important; /* Cabecera clara */
  border-bottom-color: #e2e8f0 !important;
}
[data-theme="light"] .chat-live-modal > div:first-child h3,
[data-theme="light"] .chat-live-modal > div:first-child span,
[data-theme="light"] .chat-live-modal > div:first-child button {
  color: #0f172a !important; /* Texto oscuro en cabecera */
}

/* Fondo principal de mensajes en blanco */
[data-theme="light"] #chat-live-messages {
  background-color: #ffffff !important;
}

/* Mensajes de usuarios normales (Azul) en fondo claro */
[data-theme="light"] .user-msg-container {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .user-msg-name {
  color: #0f172a !important;
}

/* Mensajes Admin (Rojo) en fondo claro */
[data-theme="light"] .admin-msg-container {
  background: #fff1f2 !important;
  color: #0f172a !important;
  border: 1px solid #ffe4e6 !important;
}

/* Barra de escritura en tema claro */
[data-theme="light"] #chat-live-form {
  background: #ffffff !important;
  border-top-color: #e2e8f0 !important;
}
[data-theme="light"] #chat-live-form input {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
[data-theme="light"] #chat-live-form svg {
  stroke: #64748b !important;
}

/* ---------------- TEMA CLARO: MODALES PERFIL Y CERRADO ---------------- */
[data-theme="light"] #user-profile-modal .modal-card,
[data-theme="light"] #chat-closed-modal .modal-card {
  background: #ffffff;
  color: #0f172a;
}
[data-theme="light"] #user-profile-modal h3,
[data-theme="light"] #chat-closed-modal h3 {
  color: #0f172a !important;
}
[data-theme="light"] #user-profile-modal p,
[data-theme="light"] #chat-closed-modal p {
  color: #64748b !important;
}
[data-theme="light"] #chat-closed-modal .modal-card > div:first-of-type {
  background: radial-gradient(circle at center, rgba(255,30,39,0.08) 0%, #f8fafc 70%) !important;
}
/* ---------------- TEMA CLARO: TARJETAS DE NOVEDADES (FEED PRINCIPAL) ---------------- */
[data-theme="light"] .novedad-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 14px rgba(12, 16, 23, 0.05) !important;
}

[data-theme="light"] .novedad-card:hover {
  background: #fcfdfe !important;
  border-color: rgba(255, 30, 39, 0.4) !important;
  box-shadow: 0 10px 25px rgba(12, 16, 23, 0.1), 0 0 15px rgba(255, 30, 39, 0.1) !important;
}

/* Tarjeta Fijada (Degradado Blanco/Rojo suave) */
[data-theme="light"] .novedad-card.pinned-card {
  background: linear-gradient(180deg, rgba(255, 30, 39, 0.06) 0%, #ffffff 100%) !important;
  border-color: rgba(255, 30, 39, 0.3) !important;
}

/* Proteger el botón rojo EN VIVO y limpiar barra inferior en Tema Claro */
[data-theme="light"] .chat-live-modal > div:first-child span.anim-pulse {
  color: #ffffff !important;
}
[data-theme="light"] .chat-live-modal > div:last-child {
  background: #f8fafc !important;
  border-top-color: #e2e8f0 !important;
}
[data-theme="light"] #chat-live-form button[type="submit"] svg {
  stroke: #ffffff !important;
}
