/**
 * ==========================================
 * VIEWER PRO v13.0 - PROFESSIONAL STYLESHEET
 * ==========================================
 * Redesigned with 4 primary colors:
 * - Xanh dương đậm (Dark Blue) — Primary
 * - Đỏ (Red) — Danger / Live
 * - Vàng (Yellow) — Warning / Upcoming
 * - Xanh lá (Green) — Success
 * Version: 20250210v1500
 *
 * === 5 PARTS ===
 * PART 1: CSS Variables + Reset + Layout + Sidebar + Widgets (lines 1-1200)
 * PART 2: Header + Content Area + Featured Sections
 * PART 3: Schedule Cards (Grid + List) + Next Banner + States
 * PART 4: Modals (Announcement, Events, Event Detail, PIC, Lightbox)
 * PART 5: Buttons + Toasts + Animations + Responsive
 */

/* ==========================================
   PART 1: CSS VARIABLES — 4 MÀU CHỦ ĐẠO
   ========================================== */
:root {
  /* ===== XANH DƯƠNG ĐẬM — Primary ===== */
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --primary-lighter: #60a5fa;
  --primary-bg: rgba(30, 64, 175, 0.1);
  --primary-border: rgba(30, 64, 175, 0.3);

  /* ===== ĐỎ — Danger / Live ===== */
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --danger-light: #ef4444;
  --danger-lighter: #f87171;
  --danger-bg: rgba(220, 38, 38, 0.1);
  --danger-border: rgba(220, 38, 38, 0.3);

  /* ===== VÀNG — Warning / Upcoming ===== */
  --warning: #f59e0b;
  --warning-dark: #d97706;
  --warning-light: #fbbf24;
  --warning-lighter: #fcd34d;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --warning-border: rgba(245, 158, 11, 0.3);

  /* ===== XANH LÁ — Success ===== */
  --success: #16a34a;
  --success-dark: #15803d;
  --success-light: #22c55e;
  --success-lighter: #4ade80;
  --success-bg: rgba(22, 163, 74, 0.1);
  --success-border: rgba(22, 163, 74, 0.3);

  /* Semantic aliases (backward-compat) */
  --secondary: #64748b;
  --info: #0ea5e9;
  --info-light: #38bdf8;
  --info-bg: rgba(14, 165, 233, 0.1);

  /* ===== STATUS COLORS ===== */
  --live-color: var(--danger);
  --live-bg: var(--danger-bg);
  --live-border: var(--danger-border);
  --upcoming-color: var(--warning);
  --upcoming-bg: var(--warning-bg);
  --upcoming-border: var(--warning-border);
  --past-color: #64748b;
  --past-bg: rgba(100, 116, 139, 0.1);
  --past-border: rgba(100, 116, 139, 0.3);

  /* ===== BACKGROUNDS ===== */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --bg-hover: rgba(255, 255, 255, 0.05);

  /* ===== TEXT ===== */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* ===== BORDERS ===== */
  --border-color: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.05);

  /* ===== SHADOWS ===== */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.5);
  --shadow-primary: 0 4px 14px rgba(30, 64, 175, 0.25);
  --shadow-danger: 0 4px 14px rgba(220, 38, 38, 0.25);
  --shadow-warning: 0 4px 14px rgba(245, 158, 11, 0.25);
  --shadow-success: 0 4px 14px rgba(22, 163, 74, 0.25);

  /* ===== LAYOUT ===== */
  --sidebar-width: 280px;
  --sidebar-collapsed: 70px;
  --header-height: 70px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  --card-bg: #1e293b;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);

  /* ===== FONT ===== */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ==========================================
   LIGHT THEME VARIABLES
   ========================================== */
:root:not([data-theme="dark"]),
body:not(.dark-theme) {
  --bg-primary: #f0f4f8;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-hover: rgba(0, 0, 0, 0.04);

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.04);

  --card-bg: #ffffff;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
  --shadow-primary: 0 4px 14px rgba(30, 64, 175, 0.15);
  --shadow-danger: 0 4px 14px rgba(220, 38, 38, 0.15);
  --shadow-warning: 0 4px 14px rgba(245, 158, 11, 0.15);
  --shadow-success: 0 4px 14px rgba(22, 163, 74, 0.15);
}

/* ==========================================
   DARK THEME VARIABLES (explicit)
   ========================================== */
:root[data-theme="dark"],
body.dark-theme {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --bg-hover: rgba(255, 255, 255, 0.05);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --border-color: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.05);

  --card-bg: #1e293b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* === PART 3: Dark theme specific optimizations === */
:root[data-theme="dark"] .sidebar-scroll-indicator,
body.dark-theme .sidebar-scroll-indicator {
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(8px);
}

:root[data-theme="dark"] .widget.collapsible.collapsed,
body.dark-theme .widget.collapsible.collapsed {
  opacity: 0.7;
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* === PART 3: Focus & Accessibility === */
button:focus-visible,
a:focus-visible,
.widget.collapsible .widget-title:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.hidden {
  display: none !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--primary-border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* ==========================================
   SETTINGS-BASED VISIBILITY CLASSES
   ========================================== */
body.compact-mode .schedule-card {
  padding: 0;
}

body.compact-mode .card-title-section {
  padding: 10px 12px;
}

body.compact-mode .card-time {
  padding: 10px 12px;
  font-size: 1.2rem;
}

body.compact-mode .card-host {
  padding: 10px 12px;
  font-size: 0.95rem;
}

body.compact-mode .card-meta {
  padding: 0 12px 10px;
}

body.compact-mode .card-actions {
  padding: 8px 12px;
}

body.hide-host-avatar .host-avatar {
  display: none !important;
}

body.hide-platform-badge .meta-platform {
  display: none !important;
}

/* No header mode */
.main.no-header {
  margin-top: 0;
}

.main.no-header .content {
  padding-top: 24px;
}

/* ==========================================
   LAYOUT — APP STRUCTURE
   ========================================== */
.app {
  display: flex;
  min-height: 100vh;
}

/* ==========================================
   SIDEBAR — Professional với 4 màu accent
   [PART 1 OPTIMIZED] Desktop-first + Mobile responsive
   ========================================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* === Sidebar Hidden State (Desktop) === */
/* Desktop: Ẩn hoàn toàn sidebar, không thu gọn */
.sidebar.sidebar-hidden {
  transform: translateX(-100%);
}

/* === Sidebar Collapsed State (Legacy - kept for compatibility) === */
.sidebar.collapsed {
  width: var(--sidebar-collapsed);
  overflow: hidden;
}

.sidebar.collapsed .sidebar-content,
.sidebar.collapsed .sidebar-footer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sidebar.collapsed .logo span {
  display: none;
}

.sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 16px 12px;
}

.sidebar.collapsed .logo {
  justify-content: center;
}

.sidebar.collapsed .sidebar-toggle {
  position: absolute;
  right: 50%;
  transform: translateX(50%);
}

/* === Sidebar Header — Gradient xanh dương đậm + rainbow top === */
/* [PART 1 OPTIMIZED] Sticky header + optimized spacing */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Rainbow accent line ở trên cùng sidebar */
.sidebar-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--primary-light) 0%,
    var(--danger) 33%,
    var(--warning) 66%,
    var(--success) 100%
  );
  z-index: 1;
}

/* [PART 1 OPTIMIZED] Logo responsive sizing */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.logo .logo-image {
  width: 40px;
  height: 40px;
  object-fit: cover;
  background: transparent;
  border-radius: 8px;
  padding: 0;
  flex-shrink: 0;
}

.logo .logo-image.hidden {
  display: none;
}

.logo .logo-icon {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.3));
  flex-shrink: 0;
}

.logo .logo-image:not(.hidden) ~ .logo-icon {
  display: none;
}

.logo span {
  transition: opacity 0.3s ease;
}

/* Desktop: ẩn nút ☰ trong sidebar (dùng nút ở main header thay thế) */
/* Mobile: hiện để user có thể đóng sidebar */
.sidebar-toggle {
  width: 36px;
  height: 36px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-sm);
  color: white;
  transition: var(--transition);
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

/* === Sidebar Content === */
/* [PART 1 OPTIMIZED] Smooth scrolling + better padding */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
}

/* === Sidebar Footer === */
/* [PART 1 OPTIMIZED] Sticky footer */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  position: sticky;
  bottom: 0;
  z-index: 10;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.refresh-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.refresh-badge i {
  color: var(--success);
}

.last-update {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
  transition: opacity 0.3s ease;
}

/* Subtle refresh indicator - pulsing animation while auto-refreshing */
.last-update[data-refreshing="true"] {
  animation: refreshPulse 1s ease-in-out infinite;
}

.last-update[data-refreshing="true"]::after {
  content: ' ⟳';
  display: inline;
  animation: refreshSpin 1s linear infinite;
}

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

@keyframes refreshSpin {
  from { display: inline-block; transform: rotate(0deg); }
  to { display: inline-block; transform: rotate(360deg); }
}

.refresh-countdown {
  font-size: 0.7rem;
  color: var(--accent);
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* === PART 3: Scroll Behavior & Performance === */
/* Smooth scroll snap for sidebar sections */
.sidebar-content.scroll-snap {
  scroll-snap-type: y proximity;
  scroll-padding-top: 20px;
}

.sidebar-content.scroll-snap > .widget {
  scroll-snap-align: start;
}

/* Show/hide scroll indicator */
.sidebar-scroll-indicator {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.7rem;
  color: var(--text-secondary);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
  box-shadow: var(--shadow-md);
}

.sidebar-scroll-indicator.visible {
  opacity: 1;
}

.sidebar-scroll-indicator i {
  animation: bounceDown 1.5s ease-in-out infinite;
}

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

/* Performance: GPU acceleration for animated elements */
.widget,
.stat-item,
.filter-chip,
.sidebar-toggle,
.mobile-menu-btn {
  will-change: transform;
}

.widget:hover,
.stat-item:hover,
.filter-chip:hover {
  backface-visibility: hidden;
  -webkit-font-smoothing: subpixel-antialiased;
}

/* === Sidebar Part 1 Utilities === */
/* [PART 1 OPTIMIZED] Helper classes for responsive behavior */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 0 4px;
  margin-bottom: 4px;
}

/* Responsive font sizing for better mobile readability */
@media (max-width: 480px) {
  .sidebar {
    width: 85vw;
    max-width: 300px;
  }

  .sidebar-header {
    padding: 10px 12px;
  }

  .logo {
    font-size: 0.95rem;
  }

  .sidebar-content {
    padding: 12px;
    gap: 12px;
  }

  /* === PART 2: Extra compact for very small screens === */
  .clock-widget {
    padding: 12px;
  }

  .clock-time {
    font-size: 1.6rem;
  }

  .clock-date {
    font-size: 0.75rem;
  }

  .clock-greeting {
    font-size: 0.75rem;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
  }

  .stats-widget {
    gap: 6px;
  }

  .stat-item {
    padding: 8px 10px;
    gap: 8px;
    min-height: 50px;
  }

  .stat-icon {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }

  .stat-value {
    font-size: 1.05rem;
  }

  .stat-label {
    font-size: 0.65rem;
  }

  .filter-chip {
    padding: 4px 9px;
    font-size: 0.7rem;
  }

  .widget-title {
    font-size: 0.85rem;
  }

  /* === PART 3: Extra compact widgets === */
  .widget {
    padding: 12px;
  }

  .widget-title {
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .widget.collapsible .widget-title {
    padding-right: 26px;
  }

  .widget.collapsible .widget-title::after {
    font-size: 0.7rem;
  }
}

/* ==========================================
   WIDGETS — Base Styles
   [PART 2 OPTIMIZED] Responsive padding
   ========================================== */
.widget {
  background: var(--bg-tertiary);
  border-radius: var(--border-radius);
  padding: 16px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.widget:hover {
  border-color: var(--primary-border);
}

.widget-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  transition: font-size 0.3s ease;
}

.widget-title i {
  color: var(--primary-light);
  flex-shrink: 0;
}

/* === PART 3: Collapsible Widgets === */
.widget.collapsible .widget-title {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 30px;
}

.widget.collapsible .widget-title::after {
  content: '\f078'; /* fa-chevron-down */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.widget.collapsible.collapsed .widget-title::after {
  transform: translateY(-50%) rotate(-90deg);
}

.widget.collapsible .widget-title:hover {
  color: var(--primary-light);
}

.widget.collapsible .widget-title:hover::after {
  color: var(--primary-light);
}

.widget-body {
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease,
              margin-top 0.3s ease;
  max-height: 2000px;
  opacity: 1;
  overflow: hidden;
}

.widget.collapsed .widget-body {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}

.widget-badge {
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: auto;
  font-weight: 600;
}

.pics-widget .widget-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ==========================================
   CLOCK WIDGET — Nền sáng + accent xanh dương
   [PART 2 OPTIMIZED] Responsive sizing for mobile
   ========================================== */
.clock-widget {
  text-align: center;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.12) 0%, var(--bg-tertiary) 100%);
  border: 1px solid rgba(30, 64, 175, 0.25);
  transition: padding 0.3s ease;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.clock-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1e40af, #3b82f6, #60a5fa);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.clock-time {
  font-size: 2.2rem;
  font-weight: 800;
  color: #1e40af;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  text-shadow: none;
  transition: font-size 0.3s ease;
}

.clock-date {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 4px;
  transition: font-size 0.3s ease;
}

.clock-greeting {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(30, 64, 175, 0.12);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: font-size 0.3s ease, margin-top 0.3s ease;
}

.clock-greeting i {
  color: #f59e0b;
  flex-shrink: 0;
}

/* ==========================================
   STATS WIDGET — Mỗi stat một màu riêng
   [PART 2 OPTIMIZED] Responsive grid layout for mobile
   ========================================== */
.stats-widget {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 0;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--border-radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  min-height: 62px;
}

.stat-item:hover {
  transform: translateX(4px);
}

.stat-item:active {
  transform: translateX(2px);
}

/* Color-coded — nền rõ + viền trái đậm + icon màu */
.stat-item.live {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-left: 4px solid #dc2626;
}

.stat-item.live:hover {
  background: rgba(220, 38, 38, 0.22);
  border-color: rgba(220, 38, 38, 0.4);
  border-left-color: #dc2626;
}

.stat-item.upcoming {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left: 4px solid #f59e0b;
}

.stat-item.upcoming:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.4);
  border-left-color: #f59e0b;
}

.stat-item.total {
  background: rgba(30, 64, 175, 0.15);
  border: 1px solid rgba(30, 64, 175, 0.3);
  border-left: 4px solid #1e40af;
}

.stat-item.total:hover {
  background: rgba(30, 64, 175, 0.22);
  border-color: rgba(30, 64, 175, 0.4);
  border-left-color: #1e40af;
}

/* Stat icons */
.stat-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.stat-item:hover .stat-icon {
  transform: scale(1.1);
}

.stat-item.live .stat-icon {
  background: rgba(220, 38, 38, 0.2);
  color: #dc2626;
}

.stat-item.upcoming .stat-icon {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.stat-item.total .stat-icon {
  background: rgba(30, 64, 175, 0.2);
  color: #1e40af;
}

.stat-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  transition: font-size 0.3s ease;
}

.stat-item.live .stat-value { color: #dc2626; }
.stat-item.upcoming .stat-value { color: #d97706; }
.stat-item.total .stat-value { color: #1e40af; }

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: font-size 0.3s ease;
}

/* === PART 2: Optional Grid Layout for Stats === */
/* Use class .stats-widget.grid-layout for 2-column grid on larger screens */
.stats-widget.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

@media (max-width: 768px) {
  .stats-widget.grid-layout {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   FILTERS WIDGET
   [PART 2 OPTIMIZED] Better wrapping and spacing
   ========================================== */
.filters-widget {
  background: var(--bg-tertiary) !important;
  border: 1px solid var(--border-color) !important;
}

.filters-widget .widget-title {
  color: var(--text-primary);
  border-bottom-color: var(--border-light);
}

.filters-widget .widget-title i {
  color: var(--primary-light);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-hover);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-chip i {
  font-size: 0.7rem;
  flex-shrink: 0;
}

.filter-chip-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.filter-chip-logo:hover {
  transform: scale(1.15);
}

/* Color-coded chip types — nền rõ + viền + text đậm */
.filters-widget .filter-chip.brand {
  background: rgba(30, 64, 175, 0.18);
  border: 1.5px solid rgba(30, 64, 175, 0.4);
  color: #1e40af;
}

.filters-widget .filter-chip.brand i {
  color: #2563eb;
}

.filters-widget .filter-chip.host {
  background: rgba(22, 163, 74, 0.18);
  border: 1.5px solid rgba(22, 163, 74, 0.4);
  color: #15803d;
}

.filters-widget .filter-chip.host i {
  color: #16a34a;
}

.filters-widget .filter-chip.room {
  background: rgba(217, 119, 6, 0.18);
  border: 1.5px solid rgba(217, 119, 6, 0.4);
  color: #b45309;
}

.filters-widget .filter-chip.room i {
  color: #d97706;
}

/* Color-coded chip types — mặc định (ngoài sidebar) */
.filter-chip.brand {
  border-color: var(--primary-border);
  color: var(--primary-light);
  background: var(--primary-bg);
}

.filter-chip.host {
  border-color: var(--success-border);
  color: var(--success);
  background: var(--success-bg);
}

.filter-chip.room {
  border-color: var(--warning-border);
  color: var(--warning);
  background: var(--warning-bg);
}

a.filter-chip-link {
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

a.filter-chip-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

a.filter-chip-link.brand:hover {
  background: rgba(30, 64, 175, 0.18);
  border-color: rgba(30, 64, 175, 0.5);
}

a.filter-chip-link.room:hover {
  background: rgba(217, 119, 6, 0.18);
  border-color: rgba(217, 119, 6, 0.5);
}

a.filter-chip-link.host:hover {
  background: rgba(22, 163, 74, 0.18);
  border-color: rgba(22, 163, 74, 0.5);
}

.filter-link-icon {
  font-size: 0.6rem !important;
  opacity: 0.7;
}

a.filter-chip-link:hover .filter-link-icon {
  opacity: 1;
}

/* ==========================================
   EVENTS WIDGET — Sidebar (hidden, in main)
   ========================================== */
.events-widget {
  display: none !important;
}

.events-widget .widget-title {
  color: var(--primary-light);
  font-size: 1rem;
}

.events-widget .widget-title i {
  color: var(--warning);
  animation: pulse-star 2s infinite;
}

@keyframes pulse-star {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

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

.event-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.event-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.event-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 50%;
  flex-shrink: 0;
}

.event-icon i {
  color: white;
  font-size: 0.9rem;
}

.event-content {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}

.event-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================
   PICs WIDGET — Card Style với xanh lá gradient
   ========================================== */
.pics-widget {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 40%, #22c55e 100%);
  border: none;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.3);
}

.pics-widget .widget-title {
  color: #fff;
  font-size: 1rem;
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.pics-widget .widget-title i {
  color: rgba(255, 255, 255, 0.9);
}

.pics-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* PIC Card */
.pic-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: var(--transition);
}

.pic-card:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card Avatar */
.pic-card-avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.pic-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pic-card-avatar-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

/* Card Body */
.pic-card-body {
  flex: 1;
  min-width: 0;
}

.pic-card-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 2px;
}

.pic-card-code {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  font-family: monospace;
  margin-bottom: 4px;
}

.pic-card-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* Role badges — 4 màu */
.pic-role-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.pic-role-badge.op {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.pic-role-badge.tech {
  background: rgba(251, 191, 36, 0.25);
  color: #fef08a;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.pic-role-badge.room {
  background: rgba(96, 165, 250, 0.25);
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.4);
}

.pic-role-badge.room i {
  font-size: 0.55rem;
}

/* Card Arrow */
.pic-card-arrow {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: var(--transition);
}

.pic-card:hover .pic-card-arrow {
  opacity: 0.8;
  transform: translateX(0);
}

/* ==========================================
   PIC DETAIL MODAL
   ========================================== */
.pic-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pic-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.pic-modal-box {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: picModalSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Rainbow top border */
.pic-modal-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--primary) 0%,
    var(--danger) 33%,
    var(--warning) 66%,
    var(--success) 100%
  );
  z-index: 2;
}

@keyframes picModalSlideIn {
  from { opacity: 0; transform: translateY(24px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.pic-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}

.pic-modal-close:hover {
  background: var(--danger);
  color: white;
  transform: rotate(90deg);
}

.pic-modal-body {
  overflow-y: auto;
  padding: 0;
}

.pic-modal-loading {
  padding: 60px 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.pic-modal-loading i {
  margin-right: 8px;
  color: var(--primary-lighter);
}

/* Hero Section — Avatar on top */
.pic-modal-hero {
  text-align: center;
  padding-bottom: 20px;
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.12) 0%, transparent 100%);
}

.pic-modal-avatar-area {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 280px;
  overflow: hidden;
  position: relative;
  background: rgba(0, 0, 0, 0.2);
}

.pic-modal-avatar-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pic-modal-avatar-area:hover img {
  transform: scale(1.03);
}

.pic-modal-avatar-fallback {
  width: 100%;
  height: 100%;
  min-height: 180px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 3.5rem;
}

.pic-modal-zoom-hint {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(4px);
}

.pic-modal-avatar-area:hover .pic-modal-zoom-hint {
  opacity: 1;
}

/* Identity */
.pic-modal-identity {
  padding: 16px 24px 0;
}

.pic-modal-name {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pic-modal-code {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 10px;
  border-radius: 6px;
  font-family: monospace;
  margin-top: 6px;
}

.pic-modal-badges {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.pic-modal-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pic-modal-badge.op {
  background: var(--success-bg);
  color: var(--success-light);
  border: 1px solid var(--success-border);
}

.pic-modal-badge.tech {
  background: var(--warning-bg);
  color: var(--warning-light);
  border: 1px solid var(--warning-border);
}

/* Content Area */
.pic-modal-content {
  padding: 0;
}

/* Modal Sections */
.pic-modal-section {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pic-modal-section:last-child {
  padding-bottom: 24px;
}

.pic-modal-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.pic-modal-section-title i {
  margin-right: 6px;
  width: 16px;
  text-align: center;
  color: var(--primary-lighter);
}

/* Contacts */
.pic-modal-contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pic-modal-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: var(--transition);
  border: 1px solid transparent;
}

.pic-modal-contact:hover {
  background: var(--primary-bg);
  border-color: var(--primary-border);
  color: var(--primary-lighter);
}

.pic-modal-contact i {
  width: 18px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--primary-lighter);
}

/* URLs */
.pic-modal-urls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pic-modal-url {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
  overflow: hidden;
  border: 1px solid transparent;
}

.pic-modal-url:hover {
  background: var(--primary-bg);
  border-color: var(--primary-border);
  color: var(--primary-lighter);
}

.pic-modal-url i {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--primary-lighter);
}

.pic-modal-url span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Rooms */
.pic-modal-rooms {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pic-modal-room {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.pic-modal-room i {
  width: 18px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--primary-lighter);
}

.pic-modal-room span {
  flex: 1;
}

.pic-modal-platform {
  font-size: 0.68rem;
  background: var(--primary-bg);
  color: var(--primary-lighter);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.pic-modal-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px 0;
}

/* Description */
.pic-modal-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ==========================================
   NOTE WIDGET — Vàng highlight
   ========================================== */
.note-widget {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(251, 191, 36, 0.08) 100%);
  border: 1px solid var(--warning-border);
  box-shadow: var(--shadow-warning);
}

.note-widget:hover {
  border-color: var(--warning);
}

.note-widget .widget-title {
  color: var(--warning-light);
  font-size: 1rem;
}

.note-widget .widget-title i {
  color: var(--warning);
}

.note-content {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.6;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
}

.note-content a {
  color: var(--primary-lighter);
  word-break: break-all;
}

/* ==========================================
   ==========================================
   PART 2: MAIN CONTENT + HEADER + FEATURED
   ==========================================
   ========================================== */

/* ==========================================
   MAIN CONTENT
   ========================================== */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.sidebar.collapsed + .main,
.main.expanded {
  margin-left: var(--sidebar-collapsed);
}

/* Main full width when sidebar is hidden */
.sidebar.sidebar-hidden + .main {
  margin-left: 0;
}

/* ==========================================
   HEADER — Sticky với backdrop blur
   ========================================== */
.header {
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

/* Desktop sidebar toggle button */
.sidebar-menu-btn {
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  font-size: 1.2rem;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
}

.sidebar-menu-btn:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

/* Mobile menu button - hidden on desktop */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.page-title h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

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

/* ==========================================
   FILTER TABS — Color-coded với 4 màu
   ========================================== */
.filter-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: var(--border-radius);
}

.filter-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.filter-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Default active = primary blue */
.filter-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-primary);
}

/* Live tab = red pulse */
.filter-tab i.pulse {
  font-size: 0.6rem;
  color: var(--danger);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* ==========================================
   VIEW TOGGLE — Xanh dương đậm active
   ========================================== */
.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: var(--border-radius-sm);
}

.view-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.view-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.view-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-primary);
}

/* ==========================================
   CONTENT AREA
   ========================================== */
.content {
  flex: 1;
  padding: 24px;
  background: var(--bg-primary);
}

/* ==========================================
   UNIFIED SECTION HEADER — Đồng bộ tất cả sections
   ========================================== */
.section-header-unified {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.section-header-unified .section-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.section-header-unified .section-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-primary);
}

.section-header-unified .section-count {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 16px;
  margin-left: auto;
}

/* Note (amber) */
.section-header-unified.note .section-icon { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.section-header-unified.note .section-title { color: #d97706; }
.section-header-unified.note { border-bottom-color: rgba(245, 158, 11, 0.15); }

/* Images (teal) */
.section-header-unified.images .section-icon { background: rgba(13, 148, 136, 0.15); color: #0d9488; }
.section-header-unified.images .section-title { color: #0d9488; }
.section-header-unified.images .section-count { background: rgba(13, 148, 136, 0.15); color: #0d9488; border: 1px solid rgba(13, 148, 136, 0.25); }
.section-header-unified.images { border-bottom-color: rgba(13, 148, 136, 0.15); }

/* Events (amber/gold) */
.section-header-unified.events .section-icon { background: rgba(217, 119, 6, 0.15); color: #d97706; }
.section-header-unified.events .section-title { color: #d97706; }
.section-header-unified.events .section-count { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3); }
.section-header-unified.events { border-bottom-color: rgba(217, 119, 6, 0.15); }

/* Schedules (green) */
.section-header-unified.schedules .section-icon { background: rgba(22, 163, 74, 0.15); color: #16a34a; }
.section-header-unified.schedules .section-title { color: #16a34a; }
.section-header-unified.schedules .section-count { background: rgba(22, 163, 74, 0.15); color: #16a34a; border: 1px solid rgba(22, 163, 74, 0.25); }
.section-header-unified.schedules { border-bottom-color: rgba(22, 163, 74, 0.15); }

/* ==========================================
   FEATURED NOTE — Vàng accent
   ========================================== */
.featured-note {
  background: linear-gradient(145deg, var(--bg-secondary) 0%, rgba(245, 158, 11, 0.05) 100%);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  position: relative;
}

/* Top accent */
.featured-note::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--warning), #f97316, var(--danger));
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.featured-note-content {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.7;
  word-break: break-word;
}

/* Rich Content — TinyMCE formatting support */
.featured-note-content p {
  margin: 0 0 12px 0;
}

.featured-note-content p:last-child {
  margin-bottom: 0;
}

.featured-note-content h1,
.featured-note-content h2,
.featured-note-content h3,
.featured-note-content h4 {
  color: var(--text-primary);
  margin: 16px 0 10px 0;
  line-height: 1.4;
}

.featured-note-content h1:first-child,
.featured-note-content h2:first-child,
.featured-note-content h3:first-child {
  margin-top: 0;
}

.featured-note-content ul,
.featured-note-content ol {
  margin: 0 0 12px 20px;
  padding: 0;
}

.featured-note-content li {
  margin-bottom: 6px;
}

.featured-note-content strong,
.featured-note-content b {
  font-weight: 600;
}

.featured-note-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.featured-note-content th,
.featured-note-content td {
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  text-align: left;
}

.featured-note-content th {
  background: var(--primary-bg);
  font-weight: 600;
  color: var(--primary-light);
}

.featured-note-content blockquote {
  border-left: 4px solid var(--primary);
  margin: 12px 0;
  padding: 10px 16px;
  background: var(--primary-bg);
  border-radius: 0 8px 8px 0;
}

.featured-note-content a {
  color: var(--primary-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--transition);
}

.featured-note-content a:hover {
  color: var(--primary);
}

/* ==========================================
   FEATURED IMAGES — Professional Gallery
   Xanh dương gradient + hover effects
   ========================================== */
/* ============================================
   FEATURED IMAGES SECTION - Redesign
   ============================================ */
.featured-images {
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(13, 148, 136, 0.08) 100%);
  border-radius: 16px;
  border: 1px solid rgba(13, 148, 136, 0.25);
  padding: 0;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(13, 148, 136, 0.1);
  position: relative;
  overflow: hidden;
}

/* Top accent line — teal */
.featured-images::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0d9488, #14b8a6, #2dd4bf);
  z-index: 1;
}

/* Cho header không bị sát viền trên */
.featured-images > .section-header-unified {
  padding-top: 16px;
  padding-left: 20px;
  padding-right: 20px;
}

/* Header — nền teal nhẹ rõ ràng */
.featured-images-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  margin: 0;
  border-bottom: 1px solid rgba(13, 148, 136, 0.2);
  background: rgba(13, 148, 136, 0.08);
  color: var(--text-primary);
}

.featured-images-header i {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 148, 136, 0.2);
  border-radius: 10px;
  color: #0d9488;
  font-size: 1.15rem;
  animation: none;
}

.featured-images-header span {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0d9488;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-shadow: none;
}

.images-count {
  background: rgba(13, 148, 136, 0.2);
  color: #0d9488;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
  border: 1px solid rgba(13, 148, 136, 0.3);
}

/* ============================================
   Gallery — Smart Masonry Layout
   Hình tự động sắp xếp vào các cột thông minh,
   hiển thị đầy đủ hình ảnh (không crop), giữ nguyên tỷ lệ gốc.
   ============================================ */
.featured-images-gallery {
  padding: 16px;
}

.featured-images-gallery.justified-layout {
  display: block;
}

/* Masonry container: flex columns */
.fi-masonry {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.fi-masonry-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Image Items */
.featured-image-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: filter 0.25s ease, box-shadow 0.25s ease;
  border-radius: 8px;
  background: var(--bg-secondary);
  min-width: 0;
}

.featured-image-item:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.featured-image-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.featured-image-item:hover img {
  transform: scale(1.04);
}

/* Image Overlay */
.featured-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 2;
}

.featured-image-item:hover .featured-image-overlay {
  opacity: 1;
}

.featured-image-overlay i {
  color: white;
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 64, 175, 0.85);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.3s ease;
}

.featured-image-item:hover .featured-image-overlay i {
  transform: scale(1);
  opacity: 1;
}

/* Image Number Badge */
.featured-image-number {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3;
  letter-spacing: 0.02em;
}

/* Image Title */
.featured-image-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 28px 10px 8px;
  text-align: center;
  z-index: 4;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.featured-image-item:has(.featured-image-title) .featured-image-overlay {
  justify-content: center;
  padding-bottom: 40px;
}

/* ==========================================
   FEATURED EVENTS — Xanh dương đậm accent
   ========================================== */
.featured-events {
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(217, 119, 6, 0.1) 100%);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid rgba(217, 119, 6, 0.25);
  box-shadow: 0 2px 12px rgba(217, 119, 6, 0.12);
  position: relative;
  overflow: hidden;
}

.featured-events::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #b45309, #d97706, #f59e0b);
}

.featured-events-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(217, 119, 6, 0.2);
  color: var(--text-primary);
}

.featured-events-header i {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(217, 119, 6, 0.18);
  border-radius: 12px;
  color: #d97706;
  font-size: 1.5rem;
}

.featured-events-header span {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #d97706;
}

.featured-events-header .events-count {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  margin-left: auto;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.featured-events-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

/* Event Preview Card */
.event-preview-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}

.event-preview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.3);
}

.event-preview-image {
  width: 100px;
  align-self: stretch;
  min-height: 80px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-tertiary);
}

.event-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-preview-image.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-bg), rgba(30, 64, 175, 0.05));
}

.event-preview-image.no-image i {
  font-size: 1.8rem;
  color: var(--primary-light);
  opacity: 0.6;
}

.event-preview-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event-preview-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-preview-content {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Event Preview - Source (Room/Brand) */
.event-preview-source {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.ev-source-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.ev-source-tag i {
  font-size: 0.6rem;
}

.ev-brand {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

.ev-room {
  background: rgba(6, 182, 212, 0.1);
  color: #0891b2;
}

/* Event Preview - Meta (date/time) */
.event-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.event-preview-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.event-preview-meta i {
  font-size: 0.65rem;
  color: var(--primary-light);
  opacity: 0.8;
}

/* Event Preview - Countdown */
.event-preview-cd {
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 0;
}

.event-preview-cd i {
  font-size: 0.65rem;
}

.event-preview-cd.cd-upcoming {
  color: #d97706;
}

.event-preview-cd.cd-upcoming i {
  color: #f59e0b;
}

.event-preview-cd.cd-active {
  color: #16a34a;
}

.event-preview-cd.cd-active i {
  color: #22c55e;
  animation: statusPulse 2s ease-in-out infinite;
}

.event-preview-cd.cd-ended {
  color: var(--text-tertiary);
  font-weight: 500;
}

.event-preview-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 8px;
}

.event-preview-action {
  font-size: 0.75rem;
  color: #d97706;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.event-preview-action i {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.event-preview-card:hover .event-preview-action i {
  transform: translateX(3px);
}

/* Preview card calendar buttons */
.preview-cal-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.preview-cal-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preview-cal-btn:hover {
  transform: scale(1.1);
}

.pcal-ics:hover {
  background: #1e293b;
  border-color: #1e293b;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(30, 41, 59, 0.3);
}

.pcal-google:hover {
  background: #4285f4;
  border-color: #4285f4;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(66, 133, 244, 0.3);
}

/* View All Events Button */
.btn-view-all-events {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
  padding: 12px 20px;
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: var(--border-radius);
  color: #d97706;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-view-all-events:hover {
  background: rgba(217, 119, 6, 0.15);
  border-color: rgba(217, 119, 6, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.15);
}

/* === END PART 2 === */


/* ============================================================================
   ██████╗ ██╗  ██╗ ██████╗ ███╗   ██╗    ██████╗
   ██╔══██╗██║  ██║██╔═══██╗████╗  ██║    ╚════██╗
   ██████╔╝███████║██║   ██║██╔██╗ ██║     █████╔╝
   ██╔═══╝ ██╔══██║██║   ██║██║╚██╗██║     ╚═══██╗
   ██║     ██║  ██║╚██████╔╝██║ ╚████║    ██████╔╝
   ╚═╝     ╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═══╝    ╚═════╝
   Schedule Cards (Grid + List) + Next Banner + States
   ============================================================================ */


/* ==========================================
   HIGHLIGHT BANNERS - Live & Next Cards
   ========================================== */
.highlight-banners {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

/* Khi chỉ có 1 card (chỉ Next hoặc chỉ Live) → full width với layout ngang */
.highlight-banners.single-card {
  grid-template-columns: 1fr;
}

/* Layout ngang cho single card */
.highlight-banners.single-card .highlight-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.highlight-banners.single-card .highlight-header {
  margin-bottom: 0;
  flex-shrink: 0;
}

.highlight-banners.single-card .highlight-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.highlight-banners.single-card .highlight-time {
  margin-bottom: 4px;
}

.highlight-banners.single-card .highlight-countdown {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  text-align: right;
  flex-shrink: 0;
  min-width: 140px;
}

.highlight-banners.single-card .live-badge {
  margin-top: 0;
}

.highlight-card {
  position: relative;
  padding: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.highlight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Header takes minimal space */
.highlight-header {
  flex-shrink: 0;
}

/* Content fills middle */
.highlight-content {
  flex: 1;
  min-width: 0;
}

/* Badge / Countdown pushed to right */
.highlight-card .live-badge,
.highlight-card .highlight-countdown {
  flex-shrink: 0;
  margin-left: auto;
}

/* LIVE CARD - Gradient đỏ mềm mại, chữ trắng */
.live-card {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(239, 68, 68, 0.4) 0%, transparent 70%),
    radial-gradient(ellipse at 80% 20%, rgba(244, 63, 94, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 60% 90%, rgba(249, 115, 22, 0.2) 0%, transparent 50%),
    linear-gradient(160deg, #991b1b 0%, #b91c1c 25%, #dc2626 50%, #e74c4c 75%, #c53030 100%);
  border: none;
  color: #fff;
  box-shadow:
    0 8px 32px rgba(220, 38, 38, 0.3),
    0 2px 8px rgba(220, 38, 38, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.live-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    rgba(251, 191, 36, 0.8), rgba(249, 115, 22, 0.9), rgba(239, 68, 68, 1),
    rgba(236, 72, 153, 0.9), rgba(249, 115, 22, 0.9), rgba(251, 191, 36, 0.8));
  background-size: 300% 100%;
  animation: liveBarFlow 3s ease-in-out infinite;
}

@keyframes liveBarFlow {
  0% { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}

.live-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 80%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03), transparent);
  animation: liveCardSweep 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes liveCardSweep {
  0%, 50% { left: -100%; }
  100% { left: 150%; }
}

.live-card .highlight-label {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.live-card .highlight-time {
  color: #fff;
}

.live-card .highlight-time .time-sep {
  color: rgba(255, 255, 255, 0.55);
}

.live-card .highlight-meta {
  color: rgba(255, 255, 255, 0.88);
}

.live-card .pulse-live {
  color: #fff;
  animation: pulse-red 2s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(1.15); }
}

.live-card .highlight-avatar {
  border-color: rgba(255, 255, 255, 0.45);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: white;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.live-badge i {
  font-size: 0.9rem;
  animation: broadcast 2s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

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

/* Live badge countdown (trên banner) - real-time */
.live-badge-countdown {
  font-weight: 400;
  opacity: 0.9;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.live-card:hover {
  box-shadow:
    0 12px 40px rgba(220, 38, 38, 0.4),
    0 4px 16px rgba(220, 38, 38, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* NEXT CARD - Gradient xanh dương mềm mại, chữ trắng */
.next-card {
  background:
    radial-gradient(ellipse at 15% 40%, rgba(59, 130, 246, 0.35) 0%, transparent 65%),
    radial-gradient(ellipse at 85% 25%, rgba(99, 102, 241, 0.3) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 95%, rgba(14, 165, 233, 0.2) 0%, transparent 50%),
    linear-gradient(160deg, #1e3a8a 0%, #1e40af 30%, #2549c4 55%, #3060d8 80%, #1e3a8a 100%);
  border: none;
  color: #fff;
  box-shadow:
    0 8px 32px rgba(30, 64, 175, 0.3),
    0 2px 8px rgba(30, 64, 175, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.next-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    rgba(96, 165, 250, 0.7), rgba(99, 102, 241, 0.8), rgba(59, 130, 246, 0.9),
    rgba(99, 102, 241, 0.8), rgba(96, 165, 250, 0.7));
  background-size: 300% 100%;
  animation: nextBarFlow 4s ease-in-out infinite;
}

@keyframes nextBarFlow {
  0% { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}

.next-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02), transparent);
  animation: nextCardSweep 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes nextCardSweep {
  0%, 50% { left: -100%; }
  100% { left: 150%; }
}

.next-card .highlight-label {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.next-card .highlight-time {
  color: #fff;
}

.next-card .highlight-time .time-sep {
  color: rgba(255, 255, 255, 0.55);
}

.next-card .highlight-meta {
  color: rgba(255, 255, 255, 0.88);
}

.next-card .highlight-header i {
  color: #fff;
  animation: pulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
}

.next-card .highlight-avatar {
  border-color: rgba(255, 255, 255, 0.45);
}

.next-card:hover {
  box-shadow:
    0 12px 40px rgba(30, 64, 175, 0.4),
    0 4px 16px rgba(30, 64, 175, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Shared styles */
.highlight-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.highlight-label {
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.highlight-header i {
  font-size: 1.3rem;
}

.highlight-time {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.time-sep {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 1.2rem;
}

.highlight-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.highlight-note {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  margin-left: 4px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  white-space: normal;
  word-break: break-word;
}

.highlight-note i {
  color: #fbbf24;
  font-size: 0.8em;
  flex-shrink: 0;
}

.highlight-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.4);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s;
}

.highlight-avatar:hover {
  transform: scale(1.15);
}

.highlight-countdown {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  text-align: right;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.countdown-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.countdown-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}


/* ==========================================
   STATE SCREENS (Loading, Empty, Error)
   ========================================== */
.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  text-align: center;
  padding: 40px;
}

.state i {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  opacity: 0.6;
}

.state h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.state p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.state.error i {
  color: var(--danger);
  opacity: 1;
}

/* Spinner */
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-right-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

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


/* ==========================================
   SCHEDULES SECTION - Container
   ========================================== */
.schedules-section {
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(22, 163, 74, 0.04) 100%);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  border: 1px solid rgba(22, 163, 74, 0.15);
}

.schedules-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(22, 163, 74, 0.15);
  background: rgba(22, 163, 74, 0.08);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  box-shadow: none;
  border-left: 4px solid #16a34a;
}

.schedules-section-header i {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 163, 74, 0.2);
  border-radius: 12px;
  color: #16a34a;
  font-size: 1.5rem;
}

.schedules-section-header span {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #16a34a;
  text-shadow: none;
}

.schedules-count {
  background: rgba(22, 163, 74, 0.2);
  backdrop-filter: blur(4px);
  color: #16a34a;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  margin-left: auto;
  border: 1px solid rgba(22, 163, 74, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}


/* ==========================================
   SCHEDULE GRID - Professional Cards
   ========================================== */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ========== SCHEDULE CARD — Redesign v2 ========== */
.schedule-card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1.5px solid var(--border-color);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.schedule-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--border-color);
  transition: var(--transition);
}

.schedule-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}


/* --- Card Header - Status + Date --- */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}

.card-status {
  padding: 8px 14px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 0 0 12px 0;
}

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

.card-date i {
  font-size: 0.7rem;
  opacity: 0.7;
}


/* ===== STATUS: LIVE — Nổi bật nhất ===== */
.schedule-card.live {
  border-color: var(--danger);
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.2), 0 0 0 1px rgba(220, 38, 38, 0.1);
  animation: liveGlow 2s ease-in-out infinite;
}

.schedule-card.live::before {
  height: 4px;
  background: linear-gradient(90deg, var(--danger), #ef4444, var(--danger));
  background-size: 200% 100%;
  animation: liveBarShimmer 2s linear infinite;
}

.schedule-card.live .card-status {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  font-size: 0.72rem;
}

.schedule-card.live .card-status i {
  animation: pulse 1s infinite;
}

/* Time remaining trong card status - real-time countdown */
.status-time-remaining {
  font-weight: 500;
  font-size: 0.65rem;
  opacity: 0.9;
  text-transform: none;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;  /* Số không nhảy khi countdown */
}

.status-time-remaining.ending {
  color: inherit;
}

.status-time-remaining.starting {
  color: inherit;
}

.schedule-card.live .card-time-row .time-start,
.schedule-card.live .card-time-row .time-end {
  color: #dc2626;
}

.schedule-card.live .card-time-row .time-sep {
  color: #fca5a5;
}

.schedule-card.live:hover {
  box-shadow: 0 8px 32px rgba(220, 38, 38, 0.28);
  border-color: #ef4444;
}

@keyframes liveGlow {
  0%, 100% { box-shadow: 0 4px 20px rgba(220, 38, 38, 0.2), 0 0 0 1px rgba(220, 38, 38, 0.1); }
  50% { box-shadow: 0 4px 28px rgba(220, 38, 38, 0.3), 0 0 0 1.5px rgba(220, 38, 38, 0.15); }
}

@keyframes liveBarShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ===== STATUS: UPCOMING — Sắp tới ===== */
.schedule-card.upcoming {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.1);
}

.schedule-card.upcoming::before {
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.schedule-card.upcoming .card-status {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.schedule-card.upcoming .card-time-row .time-start,
.schedule-card.upcoming .card-time-row .time-end {
  color: #d97706;
}

.schedule-card.upcoming:hover {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.18);
}


/* ===== STATUS: PAST — Đã xong (làm mờ rõ rệt) ===== */
.schedule-card.past {
  opacity: 0.55;
  border-color: var(--border-color);
  box-shadow: none;
  filter: grayscale(30%);
}

.schedule-card.past::before {
  height: 3px;
  background: #cbd5e1;
}

.schedule-card.past .card-status {
  background: #e2e8f0;
  color: #94a3b8;
}

.schedule-card.past .card-time-row .time-start,
.schedule-card.past .card-time-row .time-end {
  color: #94a3b8;
  text-decoration: line-through;
  text-decoration-color: #cbd5e1;
}

.schedule-card.past .card-time-row .time-sep {
  color: #cbd5e1;
}

.schedule-card.past .card-title-text {
  color: var(--text-secondary);
}

.schedule-card.past .card-host {
  color: var(--text-muted);
}

.schedule-card.past .card-host i {
  color: var(--text-muted);
}

.schedule-card.past .btn-copy-title {
  background: #94a3b8;
}

.schedule-card.past .card-cart {
  opacity: 0.7;
  border-left-color: #94a3b8;
}

.schedule-card.past .card-cart-header {
  color: #94a3b8;
}

.schedule-card.past:hover {
  opacity: 0.8;
  filter: grayscale(0%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Dark theme overrides for past cards */
[data-theme="dark"] .schedule-card.past .card-status,
.dark-theme .schedule-card.past .card-status {
  background: rgba(100, 116, 139, 0.3);
  color: #64748b;
}

[data-theme="dark"] .schedule-card.past::before,
.dark-theme .schedule-card.past::before {
  background: #475569;
}

[data-theme="dark"] .schedule-card.past .card-time-row .time-start,
[data-theme="dark"] .schedule-card.past .card-time-row .time-end,
.dark-theme .schedule-card.past .card-time-row .time-start,
.dark-theme .schedule-card.past .card-time-row .time-end {
  color: #64748b;
  text-decoration-color: #475569;
}


/* --- Card Body --- */
.card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* ========== CARD TIME ROW ========== */
.card-time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}

.card-time-row .time-start,
.card-time-row .time-end {
  color: var(--primary);
}

.card-time-row .time-sep {
  font-size: 0.85rem;
  color: var(--text-muted);
}


/* ========== CARD TITLE ROW - Full Display ========== */
.card-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.card-title-text {
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
}

.btn-copy-title {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border-radius: 8px;
  color: white;
  font-size: 0.75rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-copy-title:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
  box-shadow: var(--shadow-primary);
}


/* ========== CARD INFO ROW ========== */
.card-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.card-host-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-light);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.card-host-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.card-host i {
  color: var(--primary-light);
  font-size: 0.75rem;
}

/* Host avatar in card */
.host-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.host-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.host-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.host-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.host-title {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Multi-host layout */
.card-host.multi-host {
  gap: 8px;
}

.host-avatars-group {
  display: flex;
  flex-shrink: 0;
}

.host-avatars-group .host-avatar-sm {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--bg-primary);
  margin-left: -6px;
}

.host-avatars-group .host-avatar-sm:first-child {
  margin-left: 0;
}

.host-avatars-group .host-avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Detail modal - multi host */
.detail-multi-host {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-multi-host .detail-host-card {
  padding: 8px 12px;
}

/* Detail modal - host card (ensure styles exist) */
.detail-host-section {
  margin-bottom: 8px;
}

.detail-host-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: 12px;
}

.detail-host-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-host-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-host-avatar .avatar-initial {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.detail-host-info {
  display: flex;
  flex-direction: column;
}

.detail-host-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-multi-host .detail-host-avatar {
  width: 36px;
  height: 36px;
}

.detail-multi-host .detail-host-avatar .avatar-initial {
  font-size: 0.9rem;
}

.detail-multi-host .detail-host-name {
  font-size: 0.9rem;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.meta-tag i {
  font-size: 0.65rem;
}

.meta-tag.pic {
  color: var(--primary-light);
  background: rgba(30, 64, 175, 0.08);
}

/* Platform/Brand badges cho viewer */
.viewer-platform-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: #dbeafe;
  color: #1d4ed8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.meta-tag.viewer-platform-badge {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.viewer-brand-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fef3c7;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.meta-tag.viewer-brand-badge {
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* === Auto-detect platform colors (viewer) === */
/* TikTok: TTS, TT, TikTok, TikTokShop */
.vp-tiktok { background: #f0f0f0 !important; color: #161823 !important; border: 1px solid #c4c4c4; }
/* Shopee: SHP, SP, Shopee, ShopeeVideo */
.vp-shopee { background: #fff0eb !important; color: #ee4d2d !important; border: 1px solid #fcc8b5; }
/* Lazada: LZD, LZ, Lazada */
.vp-lazada { background: #eef2ff !important; color: #0f146d !important; border: 1px solid #c5cbff; }
/* Facebook: FB, FBLive, Facebook */
.vp-facebook { background: #e7f0ff !important; color: #1877f2 !important; border: 1px solid #b3d4ff; }
/* YouTube: YT, YouTube */
.vp-youtube { background: #ffeaea !important; color: #ff0000 !important; border: 1px solid #ffb3b3; }
/* Instagram: IG, Instagram */
.vp-instagram { background: #fdf0ff !important; color: #c13584 !important; border: 1px solid #e8b3f0; }
/* Sendo: SD, Sendo */
.vp-sendo { background: #fff3e0 !important; color: #e65100 !important; border: 1px solid #ffcc80; }
/* Tiki: TK, Tiki */
.vp-tiki { background: #e3f2fd !important; color: #1a94ff !important; border: 1px solid #90caf9; }
/* Zalo: ZL, Zalo */
.vp-zalo { background: #e8f5e9 !important; color: #0068ff !important; border: 1px solid #a5d6a7; }

/* Dark mode support */
[data-theme="dark"] .viewer-platform-badge,
[data-theme="dark"] .meta-tag.viewer-platform-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}
[data-theme="dark"] .vp-tiktok { background: rgba(22, 24, 35, 0.25) !important; color: #e0e0e0 !important; border-color: #555 !important; }
[data-theme="dark"] .vp-shopee { background: rgba(238, 77, 45, 0.15) !important; color: #ff8a65 !important; border-color: rgba(238, 77, 45, 0.3) !important; }
[data-theme="dark"] .vp-lazada { background: rgba(15, 20, 109, 0.2) !important; color: #8c9eff !important; border-color: rgba(15, 20, 109, 0.3) !important; }
[data-theme="dark"] .vp-facebook { background: rgba(24, 119, 242, 0.15) !important; color: #64b5f6 !important; border-color: rgba(24, 119, 242, 0.3) !important; }
[data-theme="dark"] .vp-youtube { background: rgba(255, 0, 0, 0.12) !important; color: #ef9a9a !important; border-color: rgba(255, 0, 0, 0.25) !important; }
[data-theme="dark"] .vp-instagram { background: rgba(193, 53, 132, 0.15) !important; color: #f48fb1 !important; border-color: rgba(193, 53, 132, 0.3) !important; }
[data-theme="dark"] .vp-sendo { background: rgba(230, 81, 0, 0.15) !important; color: #ffab91 !important; border-color: rgba(230, 81, 0, 0.3) !important; }
[data-theme="dark"] .vp-tiki { background: rgba(26, 148, 255, 0.15) !important; color: #64b5f6 !important; border-color: rgba(26, 148, 255, 0.3) !important; }
[data-theme="dark"] .vp-zalo { background: rgba(0, 104, 255, 0.15) !important; color: #81c784 !important; border-color: rgba(0, 104, 255, 0.3) !important; }
[data-theme="dark"] .viewer-brand-badge,
[data-theme="dark"] .meta-tag.viewer-brand-badge {
  background: rgba(234, 179, 8, 0.15);
  color: #fcd34d;
}

/* ========== CARD PIC & LINK ROW ========== */
.card-pic-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 14px;
  margin: 0;
  border-top: 1px dashed var(--border-light);
}

.card-pic-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--primary-light);
  background: rgba(30, 64, 175, 0.06);
  border: 1px solid rgba(30, 64, 175, 0.1);
  transition: var(--transition);
}

.card-pic-item:hover {
  background: rgba(30, 64, 175, 0.12);
  border-color: rgba(30, 64, 175, 0.2);
}

.card-pic-item i {
  font-size: 0.7rem;
}

.card-pic-item.tech {
  color: var(--warning);
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.1);
}

.card-pic-item.tech:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.2);
}

/* Card Room Link → Primary Blue */
.card-room-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(30, 64, 175, 0.06);
  border: 1px solid rgba(30, 64, 175, 0.12);
  text-decoration: none;
  transition: var(--transition);
  margin-left: auto;
}

.card-room-link:hover {
  background: rgba(30, 64, 175, 0.15);
  border-color: rgba(30, 64, 175, 0.3);
  color: var(--primary-dark);
}

.card-room-link i {
  font-size: 0.68rem;
}


/* ========== ROW PIC TAGS (List View) ========== */
.row-pics {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.row-pic-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary-light);
  background: rgba(30, 64, 175, 0.06);
}

.row-pic-tag i {
  font-size: 0.65rem;
}

.row-pic-tag.tech {
  color: var(--warning);
  background: rgba(245, 158, 11, 0.06);
}


/* ========== CARD NOTE ========== */
.card-note {
  margin: 0 14px 10px;
  padding: 8px 10px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, rgba(234, 179, 8, 0.03) 100%);
  border: 1px solid rgba(234, 179, 8, 0.15);
  border-radius: 8px;
  border-left: 3px solid #eab308;
}

.card-note-header {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #eab308;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-note-header i {
  font-size: 0.8rem;
}

.card-note-content {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ========== ROW NOTE (List View) ========== */
.row-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(234, 179, 8, 0.1);
  border-radius: 6px;
  color: #eab308;
  font-size: 0.85rem;
  cursor: help;
  max-width: 300px;
}

.row-note i {
  flex-shrink: 0;
}

.row-note-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}

/* ========== CARD CART ========== */
.card-cart {
  margin: 0 14px 10px;
  padding: 8px 10px;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.08) 0%, rgba(22, 163, 74, 0.03) 100%);
  border: 1px solid rgba(22, 163, 74, 0.12);
  border-radius: 8px;
  border-left: 3px solid var(--success);
}

.card-cart-header {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-cart-header i {
  font-size: 0.8rem;
}

.card-cart-content {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}


/* ========== ROW CART (List View) ========== */
.row-cart {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 5px 10px;
  margin-left: 0;
  background: rgba(22, 163, 74, 0.06);
  border-radius: 5px;
  border-left: 3px solid var(--success);
  color: var(--success);
  font-size: 0.8rem;
  transition: var(--transition);
}

.row-cart i {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 0.72rem;
  transition: var(--transition);
}

.row-cart-text {
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
  word-break: break-word;
}

.row-cart:hover i {
  transform: scale(1.15);
}

.row-cart:hover {
  background: rgba(22, 163, 74, 0.12);
}


/* ========== KEEP LIVE BADGE (Grid View) ========== */
.card-keep-live {
  margin: 0 14px 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(20, 184, 166, 0.05) 100%);
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 10px;
  border-left: 3px solid #0d9488;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.08);
}

.card-keep-live::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 10px,
    rgba(13, 148, 136, 0.02) 10px,
    rgba(13, 148, 136, 0.02) 20px
  );
  pointer-events: none;
}

.card-keep-live-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.3);
}

.card-keep-live-header i {
  font-size: 0.72rem;
  animation: keepLivePulse 2s ease-in-out infinite;
}

.keep-live-position {
  margin-left: auto;
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-weight: 700;
}

.card-keep-live.first .keep-live-position {
  background: rgba(187, 247, 208, 0.3);
  color: #d1fae5;
}

.card-keep-live.last .keep-live-position {
  background: rgba(254, 202, 202, 0.3);
  color: #fecaca;
}

.card-keep-live-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #0f766e;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.keep-live-dot {
  color: rgba(13, 148, 136, 0.45);
  font-weight: 700;
}

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

/* ========== KEEP LIVE (List View) ========== */
.row-keep-live {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: rgba(13, 148, 136, 0.1);
  border-radius: 6px;
  color: #0d9488;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: help;
  white-space: nowrap;
  transition: var(--transition);
  border: 1px solid rgba(13, 148, 136, 0.18);
}

.row-keep-live i {
  font-size: 0.7rem;
  flex-shrink: 0;
}

.row-keep-live-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  letter-spacing: 0.3px;
}

.row-keep-live:hover {
  background: rgba(13, 148, 136, 0.18);
  border-color: rgba(13, 148, 136, 0.3);
}

.row-keep-live.first {
  border-left: 2px solid #22c55e;
}

.row-keep-live.last {
  border-left: 2px solid #ef4444;
}

.row-keep-live.middle {
  border-left: 2px solid #0d9488;
}


/* ========== KEEP LIVE MERGED CARD (Grid View) ========== */
.schedule-card.keep-live-merged {
  border: 2px solid rgba(13, 148, 136, 0.3);
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.04) 0%, var(--card-bg) 40%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.1), 0 1px 4px rgba(13, 148, 136, 0.06);
}

.schedule-card.keep-live-merged::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0d9488, #14b8a6, #2dd4bf, #14b8a6, #0d9488);
  background-size: 200% 100%;
  animation: keepLiveShimmer 3s ease-in-out infinite;
}

@keyframes keepLiveShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.keep-live-merged-header {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 50%, #14b8a6 100%) !important;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

/* Single row: [KEEP LIVE] [ĐANG LIVE] [date marquee] */
.kl-header-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0;
  position: relative;
  z-index: 1;
}

.keep-live-status {
  color: #fff !important;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
  white-space: nowrap;
  padding: 8px 12px !important;
  font-size: 0.65rem !important;
  border-radius: 0 0 10px 0 !important;
  background: rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.keep-live-merged-header .kl-live-badge {
  margin-left: 6px;
  flex-shrink: 0;
}

/* Date inline — fills remaining space, scrolls when overflow */
.kl-header-date {
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: 0.68rem;
  font-weight: 600;
  margin-left: 8px;
  padding-right: 10px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
}

.kl-date-text {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

/* Marquee scroll when date overflows — JS adds this class + sets --kl-marquee-offset */
.kl-header-date.kl-date-overflow .kl-date-text {
  animation: klDateMarquee 5s ease-in-out infinite;
  animation-delay: 1s;
}

@keyframes klDateMarquee {
  0%, 10% { transform: translateX(0); }
  40%, 60% { transform: translateX(var(--kl-marquee-offset, -30px)); }
  90%, 100% { transform: translateX(0); }
}

.kl-header-date i {
  font-size: 0.6rem;
  opacity: 0.75;
  flex-shrink: 0;
}

.keep-live-merged-name {
  font-weight: 700;
  color: #0f766e;
  font-size: 0.85rem;
  margin-bottom: 6px;
  padding: 3px 10px;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.15);
  border-radius: 6px;
  display: inline-block;
}

.keep-live-merged-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.keep-live-merged-count,
.keep-live-merged-hours {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0d9488;
  background: rgba(13, 148, 136, 0.08);
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(13, 148, 136, 0.1);
}

.keep-live-merged-hours {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.06);
  border-color: rgba(15, 118, 110, 0.1);
}

/* ===== KEEP LIVE MERGED: LIVE — Nổi bật khi đang live ===== */

/* Animated gradient border via wrapper */
.schedule-card.keep-live-merged.live {
  border: none;
  background:
    linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    linear-gradient(135deg, #dc2626, #f97316, #ef4444, #ec4899, #dc2626) border-box;
  background-size: 100% 100%, 300% 300%;
  border: 2.5px solid transparent;
  animation: klLiveBorderRotate 4s ease infinite, klLiveBreathing 3s ease-in-out infinite;
  position: relative;
  overflow: visible;
}

/* Glowing aura behind the card */
.schedule-card.keep-live-merged.live::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: calc(var(--card-radius, 12px) + 4px);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(249, 115, 22, 0.1), rgba(236, 72, 153, 0.08));
  filter: blur(8px);
  z-index: -1;
  animation: klLiveAura 3s ease-in-out infinite;
  pointer-events: none;
}

/* Top bar — hidden for live variant, gradient border already indicates live status */
.schedule-card.keep-live-merged.live::before {
  display: none;
}

/* Header — rich gradient with depth */
.schedule-card.keep-live-merged.live .keep-live-merged-header {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 35%, #ef4444 70%, #f97316 100%) !important;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

/* Subtle sparkle sweep on header — use clip-path to contain */
.schedule-card.keep-live-merged.live .keep-live-merged-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  animation: klLiveHeaderSweep 4s ease-in-out infinite;
  pointer-events: none;
  clip-path: inset(0 0 0 0);
  z-index: 0;
}

.schedule-card.keep-live-merged.live .keep-live-status i {
  animation: pulse 1s infinite;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

/* ĐANG LIVE badge — nổi bật riêng */
.kl-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 0;
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
  backdrop-filter: blur(4px);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  animation: klLiveBadgePulse 2s ease-in-out infinite;
}

/* Pulsing live dot (shared) */
.kl-live-dot {
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.kl-live-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  animation: klLiveDotRipple 1.5s ease-out infinite;
}

/* Time row — vivid red */
.schedule-card.keep-live-merged.live .card-time-row .time-start,
.schedule-card.keep-live-merged.live .card-time-row .time-end {
  color: #dc2626;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(220, 38, 38, 0.15);
}

.schedule-card.keep-live-merged.live .card-time-row .time-sep {
  color: #fca5a5;
}

/* Group name — accent */
.schedule-card.keep-live-merged.live .keep-live-merged-name {
  color: #b91c1c;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, rgba(249, 115, 22, 0.05) 100%);
  border-color: rgba(220, 38, 38, 0.2);
}

/* Meta tags */
.schedule-card.keep-live-merged.live .keep-live-merged-count,
.schedule-card.keep-live-merged.live .keep-live-merged-hours {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.15);
}

/* Toggle button */
.schedule-card.keep-live-merged.live .keep-live-merged-toggle {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.06) 0%, rgba(249, 115, 22, 0.03) 100%);
  border-top: 1px dashed rgba(220, 38, 38, 0.2);
  color: #dc2626;
}

.schedule-card.keep-live-merged.live .keep-live-merged-toggle:hover {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.12) 0%, rgba(249, 115, 22, 0.06) 100%);
  color: #b91c1c;
}

/* Children area */
.schedule-card.keep-live-merged.live .keep-live-merged-children {
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.04) 0%, rgba(220, 38, 38, 0.01) 100%);
  border-top-color: rgba(220, 38, 38, 0.12);
}

/* Hover — intensify glow */
.schedule-card.keep-live-merged.live:hover {
  transition: box-shadow 0.3s ease;
}

.schedule-card.keep-live-merged.live:hover::after {
  filter: blur(12px);
  opacity: 1.2;
}

/* ===== Animations ===== */
@keyframes klLiveBorderRotate {
  0% { background-size: 100% 100%, 100% 100%; }
  50% { background-size: 100% 100%, 200% 200%; }
  100% { background-size: 100% 100%, 100% 100%; }
}

@keyframes klLiveBreathing {
  0%, 100% { box-shadow: 0 4px 20px rgba(220, 38, 38, 0.15), 0 0 0 0 rgba(220, 38, 38, 0); }
  50% { box-shadow: 0 4px 32px rgba(220, 38, 38, 0.25), 0 0 20px rgba(220, 38, 38, 0.08); }
}

@keyframes klLiveAura {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

@keyframes klLiveBarFlow {
  0% { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}

@keyframes klLiveHeaderSweep {
  0%, 60% { left: -100%; }
  100% { left: 200%; }
}

@keyframes klLiveBadgePulse {
  0%, 100% { background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.1) 100%); border-color: rgba(255,255,255,0.3); }
  50% { background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.2) 100%); border-color: rgba(255,255,255,0.5); }
}

@keyframes klLiveDotRipple {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* Toggle button to expand/collapse child schedules */
.keep-live-merged-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  margin: 0 -1px -1px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.06) 0%, rgba(20, 184, 166, 0.02) 100%);
  border-top: 1px dashed rgba(13, 148, 136, 0.2);
  color: #0d9488;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 0 0 var(--card-radius) var(--card-radius);
}

.keep-live-merged-toggle:hover {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.12) 0%, rgba(20, 184, 166, 0.06) 100%);
  color: #0f766e;
}

.keep-live-merged-toggle i {
  font-size: 0.7rem;
  transition: transform 0.3s;
}

/* Child schedule cards inside merged card */
.keep-live-merged-children {
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.03) 0%, rgba(13, 148, 136, 0.01) 100%);
  border-top: 1px solid rgba(13, 148, 136, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.keep-live-child-card {
  padding: 10px 14px;
  background: var(--card-bg);
  border-radius: 10px;
  border-left: 3px solid rgba(13, 148, 136, 0.3);
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
}

.keep-live-child-card:hover {
  box-shadow: 0 3px 10px rgba(13, 148, 136, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.keep-live-child-card.live {
  border-left-color: var(--live-color);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.04) 0%, var(--card-bg) 40%);
}

.keep-live-child-card.upcoming {
  border-left-color: #0d9488;
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.04) 0%, var(--card-bg) 40%);
}

.keep-live-child-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.keep-live-child-num {
  font-weight: 800;
  color: #fff;
  font-size: 0.68rem;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(13, 148, 136, 0.3);
}

.keep-live-child-time {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.keep-live-child-body {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-left: 28px;
}

.keep-live-child-host {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.keep-live-child-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(13, 148, 136, 0.2);
}

.keep-live-child-title {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* ========== KEEP LIVE MERGED ROW (List View) ========== */
.schedule-row.keep-live-merged {
  border-left: 3px solid #0d9488;
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.06) 0%, transparent 30%);
  overflow: visible;
}

.row-keep-live-merged-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  flex-wrap: wrap;
  overflow: visible;
}

.keep-live-badge-list {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 0.72rem;
  color: #fff;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  padding: 3px 10px;
  border-radius: 5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25);
  flex-shrink: 0;
}

/* ===== KEEP LIVE MERGED ROW: LIVE — Nổi bật khi đang live ===== */
.schedule-row.keep-live-merged.live {
  border-left: 4px solid #dc2626;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.08) 0%, rgba(249, 115, 22, 0.03) 20%, transparent 50%);
  box-shadow: inset 4px 0 12px rgba(220, 38, 38, 0.06), 0 2px 8px rgba(220, 38, 38, 0.08);
  animation: klLiveRowPulse 3s ease-in-out infinite;
  position: relative;
}

.schedule-row.keep-live-merged.live .keep-live-badge-list {
  background: linear-gradient(135deg, #b91c1c, #dc2626, #f97316);
  background-size: 200% 100%;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.4);
  animation: klLiveListBadgeShift 3s ease infinite;
}

.kl-live-badge-list {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 0.68rem;
  color: #fff !important;
  background: linear-gradient(135deg, #dc2626, #ef4444) !important;
  padding: 3px 10px;
  border-radius: 5px;
  letter-spacing: 0.8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
  animation: klLiveListBadgePulse 2s ease-in-out infinite;
  margin-left: 4px;
  flex-shrink: 0;
}

@keyframes klLiveListBadgePulse {
  0%, 100% { box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3); }
  50% { box-shadow: 0 2px 12px rgba(220, 38, 38, 0.55); }
}

.kl-live-badge-list .kl-live-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.schedule-row.keep-live-merged.live .keep-live-merged-children-list {
  border-left-color: rgba(220, 38, 38, 0.3);
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.04) 0%, rgba(220, 38, 38, 0.01) 100%);
}

@keyframes klLiveRowPulse {
  0%, 100% { box-shadow: inset 4px 0 12px rgba(220, 38, 38, 0.06), 0 2px 8px rgba(220, 38, 38, 0.08); }
  50% { box-shadow: inset 4px 0 16px rgba(220, 38, 38, 0.1), 0 2px 12px rgba(220, 38, 38, 0.12); }
}

@keyframes klLiveListBadgeShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.keep-live-merged-toggle-list {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: #0d9488;
  cursor: pointer;
  transition: var(--transition);
}

.keep-live-merged-toggle-list:hover {
  color: #0f766e;
}

.keep-live-merged-children-list {
  padding: 4px 12px 8px 24px;
  background: rgba(13, 148, 136, 0.03);
  border-left: 3px solid rgba(13, 148, 136, 0.2);
  margin-bottom: 2px;
}

.keep-live-child-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(13, 148, 136, 0.06);
}

.keep-live-child-row:last-child {
  border-bottom: none;
}

.keep-live-child-row .keep-live-child-num {
  font-weight: 800;
  color: #fff;
  min-width: 22px;
  height: 22px;
  font-size: 0.68rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(13, 148, 136, 0.3);
  flex-shrink: 0;
}

.keep-live-child-row .keep-live-child-time {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text-primary);
}

.keep-live-child-host-text {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

/* Live child row trong list — số tròn đỏ */
.keep-live-child-row.live .keep-live-child-num {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.3);
}


/* ========== CARD ACTIONS ========== */
.card-actions {
  margin-top: auto;
  padding: 8px 12px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 6px;
  background: var(--bg-tertiary);
  border-radius: 0 0 16px 16px;
}

.btn-copy,
.btn-images,
.btn-product {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  background: var(--bg-hover);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: var(--transition);
  border: 1px solid var(--border-light);
  position: relative;
  cursor: pointer;
}

/* Badge for image count */
.btn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 10px;
  margin-left: 2px;
}

.btn-images:hover .btn-badge {
  background: white;
  color: var(--primary);
}

.btn-copy:hover,
.btn-images:hover,
.btn-product:hover,
.btn-room-link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-room-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-hover);
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  color: var(--success);
  transition: var(--transition);
  border: 1px solid var(--success);
  text-decoration: none;
  cursor: pointer;
}

.btn-room-link:hover {
  background: var(--success);
  border-color: var(--success);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-success);
}


/* ==========================================
   SCHEDULE LIST VIEW
   ========================================== */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-row {
  display: flex;
  align-items: stretch;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  border-left: 4px solid transparent;
  overflow: hidden;
}

.schedule-row:hover {
  border-color: var(--primary-light);
  background: var(--bg-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* --- Row Left: date, time, status (fixed width) --- */
.row-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  min-width: 120px;
  border-right: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

/* --- Row Center: title + cart (flexible, takes remaining space) --- */
.row-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 10px 14px;
  min-width: 0;
}

/* --- Row Right: host, room, badges, actions (auto width) --- */
.row-right {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-left: 1px solid var(--border-light);
  flex-shrink: 0;
}

/* --- Row Date --- */
.row-date {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.row-date i {
  font-size: 0.7rem;
  color: var(--primary-light);
}


/* --- Row Title Line (copy btn + title) --- */
.row-title-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}

.row-title-line .btn-copy-title {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  font-size: 0.62rem;
  margin-top: 1px;
}

.row-title-text {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.45;
  word-break: break-word;
}


/* --- Row Status Colors --- */

/* LIVE row = Red left border */
.schedule-row.live {
  border-left: 4px solid var(--danger);
}

/* UPCOMING row = Yellow left border */
.schedule-row.upcoming {
  border-left: 4px solid var(--warning);
}

/* PAST row = Gray left border */
.schedule-row.past {
  border-left: 4px solid var(--text-muted);
  opacity: 0.7;
}


/* --- Row Time --- */
.row-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary);
  background: var(--primary-bg);
  padding: 4px 8px;
  border-radius: 6px;
}

.row-time .time-sep {
  font-size: 0.65rem;
  color: var(--text-muted);
}


/* --- Row Host / Room / Platform --- */
.row-host,
.row-room,
.row-platform {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.row-host-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--primary-light);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.row-host-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.row-host i { color: var(--primary-light); font-size: 0.7rem; }
.row-room i { color: var(--warning); font-size: 0.7rem; }
.row-platform i { color: var(--success); font-size: 0.7rem; }


/* --- Row Status Badge --- */
.row-status {
  text-align: center;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-badge.live {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.2);
  animation: pulse 2s infinite;
}

.status-badge.upcoming {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-dark);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.past {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

/* Time remaining trong list view - real-time countdown */
.row-time-remaining {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  margin-top: 3px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;  /* Số không nhảy khi countdown */
}

.row-time-remaining.ending {
  color: var(--danger);
}

.row-time-remaining.starting {
  color: var(--warning-dark);
}


/* --- Row Actions --- */
.row-actions {
  display: flex;
  gap: 8px;
}


/* ==========================================
   LIGHTBOX - Image Preview Overlay
   ========================================== */
/* Avatar/Logo Zoom Overlay */
.avatar-zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: avatarZoomIn 0.2s ease;
}

@keyframes avatarZoomIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.avatar-zoom-container {
  position: relative;
  display: inline-block;
  max-width: 80vw;
  max-height: 80vh;
}

.avatar-zoom-container img {
  max-width: 80vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  object-fit: contain;
  display: block;
}

.avatar-zoom-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: 2px solid rgba(255,255,255,0.8);
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background 0.2s, transform 0.2s;
}

.avatar-zoom-close:hover {
  background: rgba(220,38,38,0.9);
  transform: scale(1.1);
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
}

.lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--border-radius);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-img.loading {
  opacity: 0.3;
}


/* === END PART 3 === */


/* ============================================================================
   ██████╗ ██╗  ██╗ ██████╗ ███╗   ██╗    ██╗  ██╗
   ██╔══██╗██║  ██║██╔═══██╗████╗  ██║    ██║  ██║
   ██████╔╝███████║██║   ██║██╔██╗ ██║    ███████║
   ██╔═══╝ ██╔══██║██║   ██║██║╚██╗██║    ╚════██║
   ██║     ██║  ██║╚██████╔╝██║ ╚████║         ██║
   ╚═╝     ╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═══╝         ╚═╝
   Lightbox Controls + Modals (Announcement, Images, Links)
   ============================================================================ */


/* ==========================================
   LIGHTBOX CONTROLS (Close, Nav, Counter)
   ========================================== */
.lightbox-top-controls {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox-close,
.lightbox-download {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  color: white;
  font-size: 1rem;
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(220, 38, 38, 0.85);
  border-color: rgba(220, 38, 38, 0.9);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.35);
}

.lightbox-download:hover {
  background: rgba(37, 99, 235, 0.85);
  border-color: rgba(37, 99, 235, 0.9);
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.lightbox-download:active,
.lightbox-close:active {
  transform: scale(0.92);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-nav:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
}

.lightbox-prev {
  left: -70px;
}

.lightbox-next {
  right: -70px;
}

.lightbox-counter {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
}


/* ==========================================
   MODAL (ANNOUNCEMENT) - Lower z-index
   ========================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}


/* --- Modal Header --- */
.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
}

.modal-scroll-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.modal-header i.bounce {
  font-size: 1.5rem;
  animation: bounce 1s infinite;
}

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

.modal-header h3 {
  flex: 1;
  font-size: 1.2rem;
  font-weight: 600;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: white;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}


/* --- Modal Body --- */
.modal-body {
  padding: 20px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.modal-body a {
  color: var(--primary-light);
  word-break: break-all;
  transition: color 0.2s ease;
}

.modal-body a:hover {
  color: var(--primary);
}

/* Rich content from TinyMCE in modal body */
.modal-body p {
  margin: 0 0 10px 0;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-body h1, .modal-body h2, .modal-body h3,
.modal-body h4, .modal-body h5, .modal-body h6 {
  margin: 0 0 10px 0;
  line-height: 1.3;
}

.modal-body ul, .modal-body ol {
  margin: 0 0 10px 0;
  padding-left: 24px;
}

.modal-body li {
  margin-bottom: 4px;
}

.modal-body strong, .modal-body b {
  font-weight: 600;
}

.modal-body em, .modal-body i {
  font-style: italic;
}

.modal-body u {
  text-decoration: underline;
}

.modal-body s {
  text-decoration: line-through;
}

.modal-body table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 10px;
}

.modal-body table td,
.modal-body table th {
  border: 1px solid var(--border-color);
  padding: 8px;
}

.modal-body table th {
  background: var(--bg-tertiary);
  font-weight: 600;
}

.modal-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}


/* --- Modal Images Grid --- */
.modal-images {
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Single image: full width, natural aspect ratio */
.modal-images.single-image {
  grid-template-columns: 1fr;
}

.modal-images.single-image .modal-image-wrapper {
  aspect-ratio: auto;
  max-height: 420px;
}

.modal-images.single-image .modal-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.modal-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  background: var(--bg-tertiary);
}

.modal-image-wrapper:hover {
  border-color: var(--primary);
  transform: scale(1.02);
  box-shadow: var(--shadow-primary);
}

.modal-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.modal-image-wrapper:hover img {
  transform: scale(1.05);
}

.modal-image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0) 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.modal-image-wrapper:hover .modal-image-overlay {
  opacity: 1;
}

.modal-image-overlay span {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: rgba(30, 64, 175, 0.85);
  padding: 5px 14px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-image-overlay span i {
  font-size: 0.7rem;
}

/* Legacy fallback - plain img without wrapper */
.modal-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.modal-image:hover {
  transform: scale(1.02);
  border-color: var(--primary);
}

@media (max-width: 480px) {
  .modal-images {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 16px 16px;
  }

  .modal-image-overlay span {
    font-size: 0.72rem;
    padding: 4px 10px;
  }
}


/* --- Modal Links --- */
.modal-links {
  padding: 8px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border: 1px solid var(--border-light);
  text-decoration: none;
}

.modal-link:hover {
  background: rgba(30, 64, 175, 0.06);
  border-color: var(--primary-light);
  text-decoration: none;
  transform: translateX(3px);
}

.modal-link-favicon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--bg-secondary);
  padding: 4px;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}

.modal-link-favicon-fallback {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  font-size: 0.75rem;
}

.modal-link-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-link-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-link:hover .modal-link-title {
  color: var(--primary);
}

.modal-link-domain {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-link-arrow {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s ease;
}

.modal-link:hover .modal-link-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--primary);
}


/* --- Modal Links Badge (Expand/Collapse) --- */
.modal-links-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg-secondary) 35%);
  margin-top: -28px;
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.modal-links-badge-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(30, 64, 175, 0.35);
  transition: all 0.25s ease;
  letter-spacing: 0.2px;
  border: none;
}

.modal-links-badge-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.5);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.modal-links-badge-pill:active {
  transform: translateY(0);
  box-shadow: 0 1px 6px rgba(30, 64, 175, 0.3);
}

.modal-links-badge-pill i:first-child {
  font-size: 0.7rem;
  opacity: 0.9;
}

.modal-links-badge-arrow {
  font-size: 0.6rem !important;
  opacity: 0.8;
  animation: badgeArrowBounce 1.5s ease-in-out infinite;
}

@keyframes badgeArrowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(2px); }
}


/* --- Modal Footer --- */
.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  background: var(--bg-tertiary);
  flex-shrink: 0;
}


/* === END PART 4 === */


/* ============================================================================
   EVENT MODALS - COMPLETE REDESIGN (Professional UI)
   ============================================================================ */

/* ---- Base Modal Structure ---- */
.events-modal,
.event-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.events-modal { z-index: 15000; }
.event-detail-modal { z-index: 16000; }

.events-modal:not(.hidden),
.event-detail-modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

/* ---- Overlays ---- */
.events-modal-overlay,
.event-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.35s ease;
}

/* ---- Modal Boxes ---- */
.events-modal-box {
  position: relative;
  z-index: 1;
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  max-width: 920px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.05),
    0 20px 50px rgba(0, 0, 0, 0.4),
    0 0 80px rgba(30, 64, 175, 0.06);
  animation: eventModalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.event-detail-box {
  position: relative;
  z-index: 1;
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.05),
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(30, 64, 175, 0.06);
  animation: eventModalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes eventModalIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================
   HEADERS
   ============================================ */

.events-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.06) 0%, rgba(30, 64, 175, 0.02) 100%);
  border-bottom: 1px solid var(--border-color);
  border-radius: 20px 20px 0 0;
  flex-shrink: 0;
}

.events-modal-header h2,
.events-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.events-modal-header h2 i,
.events-modal-header h3 i,
.events-modal-header > i {
  color: var(--primary-color);
  font-size: 1.15rem;
}

.event-detail-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 16px;
  background: transparent;
  pointer-events: none;
  gap: 12px;
}

.event-detail-header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   CLOSE & BACK BUTTONS (No ::before - fix X ẩn)
   ============================================ */

/* Close Button - Events Modal (keep original style) */
.events-modal-close {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 38, 38, 0.08);
  border: 1.5px solid rgba(220, 38, 38, 0.2);
  border-radius: 12px;
  color: #dc2626;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.events-modal-close:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.35);
  transform: scale(1.05);
}

.events-modal-close:active {
  transform: scale(0.95);
}

.events-modal-close i {
  font-size: 1rem;
  line-height: 1;
}

/* Close Button - Event Detail (floating glass style) */
.event-detail-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
  pointer-events: all;
}

.event-detail-close:hover {
  background: rgba(220, 38, 38, 0.85);
  border-color: rgba(220, 38, 38, 0.9);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.35);
  transform: scale(1.1);
}

.event-detail-close:active {
  transform: scale(0.92);
}

.event-detail-close i {
  font-size: 0.85rem;
  line-height: 1;
}

/* Back Button - Event Detail (floating glass style) */
.event-detail-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
  pointer-events: all;
}

.event-detail-back:hover {
  background: rgba(37, 99, 235, 0.85);
  border-color: rgba(37, 99, 235, 0.9);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(30, 64, 175, 0.35);
  transform: scale(1.05);
}

.event-detail-back:active {
  transform: scale(0.95);
}

.event-detail-back i {
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.25s ease;
}

.event-detail-back:hover i {
  transform: translateX(-2px);
}

.event-detail-back span {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* ============================================
   MODAL BODIES
   ============================================ */

.events-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px;
  background: var(--bg-primary);
  border-radius: 0 0 20px 20px;
}

.event-detail-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  background: var(--bg-primary);
  border-radius: 20px;
}

/* Scrollbar */
.events-modal-body::-webkit-scrollbar,
.event-detail-body::-webkit-scrollbar {
  width: 6px;
}

.events-modal-body::-webkit-scrollbar-track,
.event-detail-body::-webkit-scrollbar-track {
  background: transparent;
}

.events-modal-body::-webkit-scrollbar-thumb,
.event-detail-body::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.events-modal-body::-webkit-scrollbar-thumb:hover,
.event-detail-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Content Container */
.event-detail-content {
  max-width: 100%;
}

/* Loading State */
.events-modal-body.loading,
.event-detail-body.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.events-modal-body.loading::before,
.event-detail-body.loading::before {
  content: '';
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: eventSpin 0.8s linear infinite;
}

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

/* Empty State */
.events-modal-body.empty,
.event-detail-body.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-secondary);
  text-align: center;
  padding: 40px;
}

.events-modal-body.empty i,
.event-detail-body.empty i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

.events-modal-body.empty p,
.event-detail-body.empty p {
  margin: 0;
  font-size: 0.95rem;
}

/* ============================================
   EVENTS LIST (in events modal)
   ============================================ */

.events-list-modal {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-list-item {
  display: flex;
  gap: 16px;
  padding: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  overflow: hidden;
}

.event-list-item:hover {
  border-color: var(--primary-color);
  background: var(--bg-primary);
  box-shadow: 0 4px 20px rgba(30, 64, 175, 0.12);
  transform: translateY(-2px);
}

.event-list-item:active {
  transform: translateY(0);
}

.event-list-image {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}

.event-list-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-list-image.no-image {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  border-color: transparent;
}

.event-list-image.no-image i {
  font-size: 2rem;
  color: white;
  opacity: 0.8;
}

.event-list-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.event-list-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin: 0;
}

/* Events List - Meta tags (date/time) */
.evlist-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.evlist-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 600;
}

.evlist-date {
  background: rgba(30, 64, 175, 0.1);
  color: #1e40af;
}

.evlist-time {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

/* Events List - Source (Room/Brand) */
.evlist-source {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.evlist-brand {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

.evlist-room {
  background: rgba(6, 182, 212, 0.1);
  color: #0891b2;
}

/* Events List - Bottom (action + calendar) */
.event-list-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

/* Events List - Calendar Buttons */
.evlist-cal-btns {
  display: flex;
  gap: 6px;
}

.evlist-cal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 0.72rem;
  transition: all 0.2s ease;
}

.evlist-cal-ics {
  background: rgba(30, 64, 175, 0.1);
  color: #1e40af;
}

.evlist-cal-ics:hover {
  background: #1e40af;
  color: #fff;
}

.evlist-cal-google {
  background: rgba(234, 67, 53, 0.08);
  color: #ea4335;
}

.evlist-cal-google:hover {
  background: #ea4335;
  color: #fff;
}

/* Events List - Countdown */
.evlist-cd {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 0;
}

.evlist-cd i {
  margin-right: 4px;
  font-size: 0.7rem;
}

.evlist-cd.cd-upcoming {
  color: #2563eb;
}

.evlist-cd.cd-active {
  color: #16a34a;
}

.evlist-cd.cd-ended {
  color: var(--text-secondary);
  opacity: 0.7;
}

.event-list-content {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.event-list-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-top: auto;
}

.event-list-action i {
  font-size: 0.75rem;
  transition: transform 0.25s ease;
}

.event-list-item:hover .event-list-action i {
  transform: translateX(4px);
}

/* ============================================
   EVENT DETAIL CONTENT (Article-style layout)
   ============================================ */

/* Cover Image - Hero style, full-width, no padding */
.event-detail-cover {
  width: 100%;
  max-height: 350px;
  overflow: hidden;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
}

.event-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.event-detail-cover.no-image {
  height: 160px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
}

.event-detail-cover.no-image i {
  font-size: 3rem;
  color: white;
  opacity: 0.5;
}

/* Cover Zoom Button */
.event-cover-zoom {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.95rem;
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
}

.event-detail-cover[data-lightbox-image]:hover .event-cover-zoom {
  opacity: 1;
}

/* Title Area - Padded content section */
/* Sticky top section: title + meta + countdown */
.event-detail-sticky-top {
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--bg-primary);
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.event-detail-title-area {
  padding: 16px 28px 0 28px;
  margin-bottom: 12px;
}

.event-detail-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

/* Meta Tags - Status badges with distinct colors */
.event-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 28px;
  margin-bottom: 12px;
}

.event-detail-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
}

/* Calendar tag - Blue */
.event-detail-meta-tag:has(.fa-calendar-alt) {
  background: rgba(30, 64, 175, 0.1);
  color: #1e40af;
}

.event-detail-meta-tag:has(.fa-calendar-alt) i {
  color: #1e40af;
}

/* Status tag - Green (active/đang diễn ra) */
.event-detail-meta-tag.status-tag,
.event-detail-meta-tag:has(.fa-circle) {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

.event-detail-meta-tag.status-tag i,
.event-detail-meta-tag:has(.fa-circle) i {
  color: #16a34a;
  font-size: 0.5rem;
  animation: statusPulse 2s ease-in-out infinite;
}

/* Status tag - Blue (upcoming/sắp diễn ra) */
.event-detail-meta-tag.status-upcoming {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.event-detail-meta-tag.status-upcoming i {
  color: #2563eb;
  animation: statusPulse 2s ease-in-out infinite;
}

/* Status tag - Gray (ended/đã kết thúc) */
.event-detail-meta-tag.status-ended {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.event-detail-meta-tag.status-ended i {
  color: #6b7280;
  animation: none;
}

/* Date tag - Blue */
.event-detail-meta-tag.date-tag {
  background: rgba(30, 64, 175, 0.1);
  color: #1e40af;
}

.event-detail-meta-tag.date-tag i {
  color: #1e40af;
  font-size: 0.8rem;
}

/* Time tag - Orange */
.event-detail-meta-tag.time-tag {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.event-detail-meta-tag.time-tag i {
  color: #d97706;
  font-size: 0.8rem;
}

/* Brand tag - Purple */
.event-detail-meta-tag.brand-tag {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

.event-detail-meta-tag.brand-tag i {
  color: #7c3aed;
  font-size: 0.8rem;
}

/* Room tag - Cyan */
.event-detail-meta-tag.room-tag {
  background: rgba(6, 182, 212, 0.1);
  color: #0891b2;
}

.event-detail-meta-tag.room-tag i {
  color: #0891b2;
  font-size: 0.8rem;
}

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

/* Fallback for meta tags without :has() support */
.event-detail-meta-tag i {
  font-size: 0.8rem;
  color: var(--primary-color);
}

/* ============================================
   EVENT COUNTDOWN
   ============================================ */
.event-countdown {
  padding: 0 28px;
  margin-bottom: 8px;
}

.event-countdown-inner {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f2942 100%);
  border-radius: 14px;
  padding: 16px 20px;
  text-align: center;
}

.countdown-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 14px;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.countdown-label.countdown-upcoming {
  color: rgba(255, 255, 255, 0.85);
}

.countdown-label.countdown-upcoming i {
  color: #fbbf24;
}

.countdown-label.countdown-active {
  color: #34d399;
  font-size: 0.95rem;
}

.countdown-label.countdown-active i {
  animation: statusPulse 2s ease-in-out infinite;
}

.countdown-label.countdown-ended {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.countdown-boxes {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: flex-start;
}

.countdown-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 8px 8px;
}

.countdown-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-unit {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.countdown-sep {
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 8px;
}

/* Text Content */
.event-detail-text-wrapper {
  padding: 0 28px;
  margin-bottom: 24px;
}

.event-detail-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Rich Content (TinyMCE) */
.event-detail-text.rich-content p {
  margin: 0 0 14px 0;
}

.event-detail-text.rich-content p:last-child {
  margin-bottom: 0;
}

.event-detail-text.rich-content a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid rgba(30, 64, 175, 0.3);
  transition: all 0.2s ease;
}

.event-detail-text.rich-content a:hover {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

.event-detail-text.rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

/* Image wrapper with overlay buttons */
.event-img-wrapper {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 14px auto;
  overflow: hidden;
  border-radius: 12px;
  line-height: 0;
}

.event-img-wrapper img {
  margin: 0 !important;
  border-radius: 0 !important;
  display: block;
  max-width: 100%;
}

.event-img-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
  pointer-events: none;
}

.event-img-wrapper:hover .event-img-overlay {
  opacity: 1;
  pointer-events: all;
}

.event-img-wrapper:hover img {
  filter: brightness(0.92);
}

.event-img-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.event-img-zoom:hover {
  background: rgba(37, 99, 235, 0.85);
  border-color: rgba(37, 99, 235, 0.9);
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.event-img-download:hover {
  background: rgba(22, 163, 74, 0.85);
  border-color: rgba(22, 163, 74, 0.9);
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.35);
}

.event-img-btn:active {
  transform: scale(0.92);
}

.event-detail-text.rich-content ul,
.event-detail-text.rich-content ol {
  margin: 14px 0;
  padding-left: 24px;
}

.event-detail-text.rich-content li {
  margin-bottom: 6px;
}

/* Footer */
/* Add to Calendar Section */
.event-add-calendar {
  padding: 16px 28px 20px;
}

.event-add-calendar-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-add-calendar-label i {
  color: var(--primary-color);
  font-size: 0.95rem;
}

.event-add-calendar-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid;
  cursor: pointer;
  transition: all 0.25s ease;
  flex: 1;
  min-width: 0;
  justify-content: center;
}

.cal-btn i {
  font-size: 1rem;
  flex-shrink: 0;
}

.cal-btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* .ics download button - dark style */
.cal-btn-ics {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.cal-btn-ics:hover {
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
  box-shadow: 0 4px 16px rgba(30, 41, 59, 0.4);
  transform: translateY(-1px);
}

.cal-btn-ics:active {
  transform: translateY(0) scale(0.98);
}

/* Google Calendar button */
.cal-btn-google {
  background: #ffffff;
  border-color: rgba(66, 133, 244, 0.3);
  color: #4285f4;
}

.cal-btn-google:hover {
  background: rgba(66, 133, 244, 0.06);
  border-color: #4285f4;
  box-shadow: 0 4px 16px rgba(66, 133, 244, 0.2);
  transform: translateY(-1px);
}

.cal-btn-google:active {
  transform: translateY(0) scale(0.98);
}

.event-detail-footer {
  padding: 20px 28px;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.04) 0%, rgba(245, 158, 11, 0.01) 100%);
}

.event-detail-footer-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(245, 158, 11, 0.1);
  border: none;
  border-radius: 20px;
  font-size: 0.82rem;
  color: #d97706;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.event-detail-footer-label i {
  color: #f59e0b;
  font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .events-modal,
  .event-detail-modal {
    padding: 12px;
  }

  .events-modal-box,
  .event-detail-box {
    max-height: 95vh;
    border-radius: 16px;
  }

  .events-modal-header {
    padding: 16px 20px;
  }

  .event-detail-header {
    padding: 10px 16px;
  }

  .events-modal-header h2,
  .events-modal-header h3 {
    font-size: 1.1rem;
  }

  .event-detail-header h2 {
    font-size: 1rem;
  }

  .events-modal-body {
    padding: 16px 20px;
  }

  .event-list-item {
    flex-direction: column;
    gap: 12px;
  }

  .event-list-image {
    width: 100%;
    height: 180px;
  }

  .event-detail-cover {
    max-height: 220px;
  }

  .event-detail-title-area {
    padding: 14px 20px 0 20px;
  }

  .event-detail-title {
    font-size: 1.3rem;
  }

  .event-detail-meta {
    padding: 0 20px;
  }

  .event-detail-text-wrapper {
    padding: 0 20px;
  }

  .event-detail-text {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .event-detail-footer {
    padding: 16px 20px;
  }

  .event-add-calendar {
    padding: 14px 20px 18px;
  }

  .event-detail-back span {
    display: none;
  }
}

@media (max-width: 480px) {
  .events-modal,
  .event-detail-modal {
    padding: 8px;
  }

  .events-modal-box,
  .event-detail-box {
    max-height: 98vh;
    border-radius: 14px;
  }

  .events-modal-header {
    padding: 14px 16px;
  }

  .event-detail-header {
    padding: 8px 12px;
  }

  .events-modal-close,
  .event-detail-close,
  .event-detail-back {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .events-modal-close i,
  .event-detail-close i,
  .event-detail-back i {
    font-size: 0.9rem;
  }

  .events-modal-body {
    padding: 12px 16px;
  }

  .event-list-item {
    padding: 12px;
    border-radius: 12px;
  }

  .event-list-image {
    height: 150px;
    border-radius: 8px;
  }

  .event-detail-cover {
    max-height: 180px;
  }

  .event-detail-title-area {
    padding: 12px 16px 0 16px;
  }

  .event-detail-title {
    font-size: 1.15rem;
  }

  .event-detail-meta {
    padding: 0 16px;
    gap: 8px;
  }

  .event-detail-meta-tag {
    padding: 5px 10px;
    font-size: 0.75rem;
  }

  .event-detail-text-wrapper {
    padding: 0 16px;
  }

  .event-detail-text {
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .event-detail-footer {
    padding: 14px 16px;
  }

  .event-detail-footer-label {
    padding: 6px 14px;
    font-size: 0.78rem;
  }

  .event-add-calendar {
    padding: 12px 16px 16px;
  }

  .event-add-calendar-buttons {
    flex-direction: column;
  }

  .cal-btn {
    padding: 10px 14px;
    font-size: 0.82rem;
  }
}

/* ============================================
   ANIMATIONS & POLISH
   ============================================ */

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

.events-modal-body > *,
.event-detail-body > * {
  animation: eventFadeInContent 0.35s ease forwards;
}

.event-list-item {
  animation: eventFadeInContent 0.3s ease forwards;
  opacity: 0;
}

.event-list-item:nth-child(1) { animation-delay: 0.04s; }
.event-list-item:nth-child(2) { animation-delay: 0.08s; }
.event-list-item:nth-child(3) { animation-delay: 0.12s; }
.event-list-item:nth-child(4) { animation-delay: 0.16s; }
.event-list-item:nth-child(5) { animation-delay: 0.2s; }
.event-list-item:nth-child(n+6) { animation-delay: 0.24s; }

.event-list-image img,
.event-detail-cover img {
  animation: eventFadeInContent 0.4s ease;
}

/* Button states */
.events-modal-close,
.event-detail-close,
.event-detail-back {
  user-select: none;
  -webkit-user-select: none;
}

.events-modal-close:focus-visible,
.event-detail-close:focus-visible,
.event-detail-back:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

body.modal-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .events-modal,
  .event-detail-modal,
  .events-modal-box,
  .event-detail-box,
  .event-list-item,
  .event-detail-cover img {
    animation: none !important;
    transition: none !important;
  }

  .events-modal:not(.hidden),
  .event-detail-modal:not(.hidden) {
    opacity: 1;
  }
}

@media print {
  .events-modal-overlay,
  .event-detail-overlay,
  .events-modal-close,
  .event-detail-close,
  .event-detail-back {
    display: none !important;
  }

  .events-modal,
  .event-detail-modal {
    position: static;
    padding: 0;
  }

  .events-modal-box,
  .event-detail-box {
    max-width: 100%;
    max-height: none;
    box-shadow: none;
  }
}


/* ============================================================================
   ██████╗ ██╗  ██╗ ██████╗ ███╗   ██╗    ███████╗
   ██╔══██╗██║  ██║██╔═══██╗████╗  ██║    ██╔════╝
   ██████╔╝███████║██║   ██║██╔██╗ ██║    ███████╗
   ██╔═══╝ ██╔══██║██║   ██║██║╚██╗██║    ╚════██║
   ██║     ██║  ██║╚██████╔╝██║ ╚████║    ███████║
   ╚═╝     ╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═══╝    ╚══════╝
   Buttons + Toasts + Animations + Responsive
   ============================================================================ */


/* ==========================================
   BUTTONS - General
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::after {
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(30, 64, 175, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
  color: white;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
  color: white;
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--primary-light);
  color: var(--primary);
}


/* ==========================================
   KEEP LIVE DETAIL MODAL
   ========================================== */
.kl-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: klModalFadeIn 0.25s ease;
}

@keyframes klModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.kl-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.kl-modal-box {
  position: relative;
  width: 90%;
  max-width: 680px;
  max-height: 85vh;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: klModalSlideUp 0.3s ease;
}

@keyframes klModalSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.kl-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: linear-gradient(135deg, #15803d 0%, #16a34a 50%, #22c55e 100%);
  color: #fff;
  flex-shrink: 0;
}

.kl-modal-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kl-modal-header-left i {
  font-size: 1.2rem;
  opacity: 0.9;
}

.kl-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.kl-modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.2s;
}

.kl-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.kl-modal-summary {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.kl-summary-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.kl-summary-item i {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.kl-summary-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

.kl-summary-name {
  font-size: 1rem;
  font-weight: 700;
  color: #2563eb;
  margin-right: 8px;
}

.kl-modal-body {
  padding: 16px 24px 24px;
  overflow-y: auto;
  flex: 1;
  background: var(--bg-primary);
}

/* Individual child card in modal */
.kl-child-card {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--text-muted);
  margin-bottom: 10px;
  transition: border-color 0.2s, background 0.2s, opacity 0.2s, box-shadow 0.2s;
  position: relative;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.kl-child-card:last-child {
  margin-bottom: 0;
}

.kl-child-card:hover {
  border-color: rgba(22, 163, 74, 0.4);
  background: rgba(22, 163, 74, 0.06);
}

/* LIVE — viền đỏ nổi bật */
.kl-child-card.live {
  border-color: #dc2626;
  border-width: 2px;
  background: rgba(220, 38, 38, 0.08);
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* UPCOMING — viền vàng */
.kl-child-card.upcoming {
  border-color: #d97706;
  background: rgba(245, 158, 11, 0.06);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* PAST — mờ đi */
.kl-child-card.past {
  opacity: 0.45;
  border-color: var(--text-muted);
}

.kl-child-card.past:hover {
  opacity: 0.75;
  border-color: var(--text-secondary);
}

.kl-child-num {
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

.kl-child-card.live .kl-child-num {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.kl-child-card.upcoming .kl-child-num {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.kl-child-card.past .kl-child-num {
  background: linear-gradient(135deg, #475569, #64748b);
}

.kl-child-content {
  flex: 1;
  min-width: 0;
}

.kl-child-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.kl-child-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.kl-child-date i {
  margin-right: 3px;
}

.kl-child-time {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.kl-child-time .time-sep {
  color: var(--text-muted);
  margin: 0 4px;
  font-weight: 400;
}

.kl-child-status {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kl-child-status.live {
  background: rgba(220, 38, 38, 0.15);
  color: #dc2626;
}

.kl-child-status.upcoming {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.kl-child-status.past {
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
}

.kl-child-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.kl-child-host {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
}

.kl-child-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border-color);
}

.kl-child-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.kl-child-tag {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--primary-bg);
  color: var(--primary-light);
  border: 1px solid var(--primary-border);
}

.kl-child-title {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.kl-child-note {
  font-size: 0.78rem;
  color: var(--warning);
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(245, 158, 11, 0.08);
  border-radius: 6px;
  border-left: 3px solid var(--warning);
  line-height: 1.4;
}

.kl-child-note i {
  margin-right: 4px;
}

.kl-child-cart {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 4px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.kl-child-cart i {
  color: var(--success);
  margin-top: 2px;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .kl-modal-box {
    width: 95%;
    max-height: 90vh;
    border-radius: 12px;
  }
  .kl-modal-header {
    padding: 14px 16px;
  }
  .kl-modal-summary {
    padding: 12px 16px;
  }
  .kl-modal-body {
    padding: 12px 16px 16px;
  }
  .kl-child-card {
    padding: 10px 12px;
    gap: 10px;
  }
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 250px;
}

.toast.show {
  transform: translateX(0);
}

.toast i {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Toast - Success (Green) */
.toast.success {
  border-left: 4px solid var(--success);
}

.toast.success i {
  color: var(--success);
}

/* Toast - Error (Red) */
.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.error i {
  color: var(--danger);
}

/* Toast - Warning (Yellow) */
.toast.warning {
  border-left: 4px solid var(--warning);
}

.toast.warning i {
  color: var(--warning);
}

/* Toast - Info (Blue) */
.toast.info {
  border-left: 4px solid var(--primary);
}

.toast.info i {
  color: var(--primary);
}


/* ==========================================
   MOBILE OVERLAY
   ========================================== */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 99;
}


/* ==========================================
   ANIMATIONS
   ========================================== */
.spin {
  animation: spin 2s linear infinite;
}

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

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

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

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Utility animation classes */
.animate-fade-in {
  animation: fadeIn 0.4s ease-out;
}

.animate-slide-left {
  animation: slideInLeft 0.3s ease-out;
}

.animate-slide-right {
  animation: slideInRight 0.3s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.3s ease-out;
}

/* === PART 3: Loading States === */
.widget.loading {
  pointer-events: none;
  opacity: 0.6;
  position: relative;
}

.widget.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 10;
}

/* Skeleton loading for widgets */
.widget-skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 25%,
    var(--bg-hover) 50%,
    var(--bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--border-radius-sm);
  height: 20px;
  margin-bottom: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === PART 3: Utility Classes === */
/* Quick spacing utilities */
.mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0; }
.gap-sm { gap: 8px; }
.gap-md { gap: 12px; }
.gap-lg { gap: 16px; }

/* Text utilities */
.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }


/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* ==========================================
   RESPONSIVE - TABLET (1024px)
   [PART 1 OPTIMIZED] Better mobile sidebar experience
   ========================================== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  }

  .sidebar.open {
    transform: translateX(0);
    z-index: 100;
  }

  .main {
    margin-left: 0;
    width: 100%;
  }

  /* Hide desktop sidebar toggle, show mobile menu button */
  .sidebar-menu-btn {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  /* Show sidebar toggle (☰) inside sidebar on mobile for closing */
  .sidebar-toggle {
    display: flex;
  }

  /* === PART 3: Mobile optimizations === */
  /* Collapse widgets by default on mobile to save space */
  .widget.collapsible.mobile-collapsed {
    margin-bottom: 8px;
  }

  .widget.collapsible.mobile-collapsed .widget-body {
    max-height: 0;
    opacity: 0;
  }

  /* Touch-friendly tap targets */
  .stat-item,
  .filter-chip,
  .widget.collapsible .widget-title {
    min-height: 44px;
  }

  /* Disable hover effects on touch devices */
  @media (hover: none) {
    .widget:hover,
    .stat-item:hover,
    .filter-chip:hover {
      transform: none;
      border-color: initial;
    }
  }

  .schedule-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .schedule-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .row-room,
  .row-platform {
    display: none;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}


/* ==========================================
   RESPONSIVE - MOBILE LARGE (768px)
   [PART 1 OPTIMIZED] Compact sidebar on mobile
   ========================================== */
@media (max-width: 768px) {
  /* Sidebar header - more compact */
  .sidebar-header {
    padding: 12px 16px;
  }

  .logo {
    font-size: 1rem;
    gap: 10px;
  }

  .logo i {
    font-size: 1.2rem;
  }

  .sidebar-toggle {
    width: 32px;
    height: 32px;
  }

  /* Sidebar content - reduced padding */
  .sidebar-content {
    padding: 16px;
    gap: 16px;
  }

  /* Sidebar footer - compact */
  .sidebar-footer {
    padding: 12px 16px;
  }

  .refresh-badge {
    font-size: 0.8rem;
  }

  .last-update {
    font-size: 0.7rem;
  }

  /* === PART 2: Clock Widget Responsive === */
  .clock-widget {
    padding: 14px;
  }

  .clock-time {
    font-size: 1.8rem;
    letter-spacing: -0.5px;
  }

  .clock-date {
    font-size: 0.8rem;
  }

  .clock-greeting {
    font-size: 0.8rem;
    margin-top: 10px;
    padding-top: 10px;
  }

  /* === PART 2: Stats Widget Responsive === */
  .stats-widget {
    gap: 8px;
  }

  .stat-item {
    padding: 10px 12px;
    gap: 10px;
    min-height: 56px;
  }

  .stat-icon {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }

  .stat-value {
    font-size: 1.15rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  /* === PART 2: Filter Chips Responsive === */
  .filter-chips {
    gap: 6px;
  }

  .filter-chip {
    padding: 5px 10px;
    font-size: 0.75rem;
    gap: 5px;
  }

  .filter-chip i {
    font-size: 0.65rem;
  }

  /* Main header */
  .header {
    padding: 0 16px;
    height: 60px;
  }

  .header-right {
    gap: 10px;
  }

  .filter-tabs {
    display: none;
  }

  .page-title h1 {
    font-size: 1.1rem;
  }

  .page-subtitle {
    font-size: 0.8rem;
  }

  .content {
    padding: 16px;
  }

  /* Masonry gallery – tablet */
  .featured-images-gallery {
    padding: 12px;
  }

  .fi-masonry,
  .fi-masonry-col {
    gap: 4px;
  }

  .featured-image-item {
    border-radius: 6px;
  }

  .schedule-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .schedule-card {
    border-radius: var(--border-radius-sm);
  }

  /* Title section responsive */
  .card-title-section {
    padding: 12px;
    gap: 10px;
  }

  .card-title-text {
    font-size: 1rem;
    -webkit-line-clamp: 2;
  }

  .btn-copy-title {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .card-time {
    padding: 12px;
    font-size: 1.2rem;
    gap: 10px;
  }

  .card-host {
    padding: 12px;
    font-size: 1rem;
    gap: 8px;
  }

  .card-meta {
    padding: 0 12px 12px;
    gap: 8px;
  }

  .card-actions {
    padding: 10px 12px;
    gap: 8px;
  }

  .highlight-banners {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Mobile: tất cả highlight card layout dọc */
  .highlight-card {
    flex-direction: column;
    align-items: stretch;
  }

  .highlight-card .highlight-header {
    margin-bottom: 4px;
  }

  .highlight-card .live-badge,
  .highlight-card .highlight-countdown {
    margin-left: 0;
    align-self: flex-start;
  }

  .highlight-card .highlight-countdown {
    text-align: left;
    min-width: auto;
    margin-top: 4px;
  }

  .highlight-time {
    font-size: 1.3rem;
  }

  .countdown-value {
    font-size: 1.5rem;
  }

  .modal {
    padding: 10px;
  }

  .modal-box {
    max-height: 85vh;
  }

  .toast-container {
    bottom: 16px;
    right: 16px;
    left: 16px;
  }

  .toast {
    min-width: auto;
    width: 100%;
  }

  /* List view responsive - stack vertically on tablet */
  .schedule-row {
    flex-direction: column;
  }

  .row-left {
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    min-width: auto;
    justify-content: flex-start;
    padding: 8px 14px;
  }

  .row-right {
    border-left: none;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
    padding: 8px 14px;
  }

  .row-cart {
    margin-left: 0;
  }

  /* Card main row responsive */
  .card-main-row {
    flex-direction: column;
    gap: 6px;
  }

  .card-time-compact {
    align-self: flex-start;
  }
}


/* ==========================================
   RESPONSIVE - MOBILE SMALL (480px)
   ========================================== */
@media (max-width: 480px) {
  .view-toggle {
    display: none;
  }

  .content {
    padding: 12px;
  }

  .schedule-grid {
    gap: 12px;
  }

  /* Card compact on mobile */
  .card-title-section {
    padding: 10px;
    gap: 8px;
  }

  .card-title-text {
    font-size: 0.95rem;
  }

  .btn-copy-title {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .card-time {
    padding: 10px;
    font-size: 1.1rem;
    gap: 8px;
  }

  .card-time .time-sep {
    font-size: 0.85rem;
  }

  .card-host {
    padding: 10px;
    font-size: 0.95rem;
  }

  .card-meta {
    padding: 0 10px 10px;
    gap: 6px;
  }

  .meta-badge {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .card-actions {
    padding: 8px 10px;
    gap: 6px;
    flex-wrap: wrap;
  }

  .btn-images,
  .btn-room-link {
    padding: 6px 8px;
    font-size: 0.7rem;
  }

  /* Row title section - 480px */
  .row-title-section {
    gap: 4px;
  }

  .row-title-text {
    font-size: 0.8rem;
    padding: 2px 5px;
  }

  .row-title-line .btn-copy-title {
    width: 22px;
    height: 22px;
    font-size: 0.6rem;
  }

  /* Justified gallery – mobile */
  .featured-images-gallery {
    padding: 8px;
  }

  .fi-masonry,
  .fi-masonry-col {
    gap: 3px;
  }

  .featured-image-item {
    border-radius: 4px;
  }

  .featured-images-header {
    padding: 16px 16px 12px;
  }

  .featured-images-header span {
    font-size: 1rem;
  }

  .featured-images-header i {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .highlight-banners {
    gap: 12px;
  }

  .highlight-card {
    padding: 14px;
  }

  .highlight-label {
    font-size: 0.75rem;
  }

  .highlight-time {
    font-size: 1.2rem;
  }

  .countdown-value {
    font-size: 1.3rem;
  }

  /* Stats widget */
  .stats-widget {
    gap: 8px;
  }

  .stat-item {
    padding: 10px;
  }

  .stat-value {
    font-size: 1.3rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }
}


/* ==========================================
   SCROLLBAR CUSTOM (Webkit)
   ========================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

/* Modal scrollbar */
.modal-scroll-content::-webkit-scrollbar {
  width: 5px;
}

.modal-scroll-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}


/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
  .sidebar,
  .header,
  .mobile-overlay,
  .lightbox,
  .modal,
  .toast-container {
    display: none !important;
  }

  .main {
    margin-left: 0;
  }

  .content {
    padding: 0;
  }

  .schedule-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}


/* === END PART 5 === */
/* ============================================================================
   ✅ HOÀN THÀNH REDESIGN - 5/5 PHẦN
   4 Màu chủ đạo: Xanh dương đậm | Đỏ | Vàng | Xanh lá
   ============================================================================ */
