/* ==============================================================================
   LMS EDU PRO V2 — ENTERPRISE UI COMPONENTS & HARMONIOUS RESPONSIVE SYSTEM
   Multi-tier Responsive Architecture: 320px -> 480px -> 768px -> 992px -> 1200px -> 1400px -> 4K
   ============================================================================== */

/* Global Invisible Smooth Scrollbar & Taskbar Safe Padding */
html, body, * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

::-webkit-scrollbar {
  display: none !important;
  width: 0px !important;
  height: 0px !important;
  background: transparent !important;
}

body {
  padding-bottom: calc(var(--taskbar-height, 56px) + 24px) !important;
}

@media (max-width: 1023.98px) {
  body {
    padding-bottom: 96px !important;
  }
}

/* 1. APP HEADER & TOP NAVIGATION */
.app-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-h);
  background: rgba(10, 14, 26, 0.82);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(12px, 2vw, 28px);
  gap: clamp(8px, 1.5vw, 16px);
  transition: var(--transition-smooth);
}

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

.btn-sidebar-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--glass-border);
  color: #fff;
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-sidebar-toggle:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--primary-glow);
  color: var(--primary-glow);
}

/* Universal 1:1 Circular Avatar Classes */
.avatar-xs { width: 24px !important; height: 24px !important; aspect-ratio: 1/1 !important; border-radius: 50% !important; object-fit: cover !important; object-position: center !important; }
.avatar-sm { width: 32px !important; height: 32px !important; aspect-ratio: 1/1 !important; border-radius: 50% !important; object-fit: cover !important; object-position: center !important; }
.avatar-md { width: 44px !important; height: 44px !important; aspect-ratio: 1/1 !important; border-radius: 50% !important; object-fit: cover !important; object-position: center !important; }
.avatar-lg { width: 64px !important; height: 64px !important; aspect-ratio: 1/1 !important; border-radius: 50% !important; object-fit: cover !important; object-position: center !important; }
.avatar-xl { width: 96px !important; height: 96px !important; aspect-ratio: 1/1 !important; border-radius: 50% !important; object-fit: cover !important; object-position: center !important; }
.avatar-2xl { width: 128px !important; height: 128px !important; aspect-ratio: 1/1 !important; border-radius: 50% !important; object-fit: cover !important; object-position: center !important; }

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  letter-spacing: -0.5px;
}

.brand-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-glow) 0%, var(--accent-purple) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.5);
  font-size: 22px;
  flex-shrink: 0;
}

/* Omnibar Quick Search Trigger (Ctrl + K) */
.omnibar-trigger-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  color: var(--text-sub);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-fast);
  min-width: 260px;
}

.omnibar-trigger-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--primary-glow);
  color: #fff;
}

.kbd-badge {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-family: monospace;
  color: var(--primary-glow);
}

/* User Menu & Streak Badge */
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.streak-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 107, 0, 0.15);
  border: 1px solid rgba(255, 107, 0, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  color: #ff9800;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 0 15px rgba(255, 152, 0, 0.2);
  white-space: nowrap;
}

/* 2. DYNAMIC ROLE-BASED SIDEBAR & MAIN LAYOUT (Sidebar removed in favor of Windows Taskbar & Start Menu) */
.app-sidebar,
.btn-sidebar-toggle-icon,
.sidebar-backdrop {
  display: none !important;
}

/* App Main Content Wrapper (100% Full-Width Screen Real Estate) */
.app-main-layout {
  margin-top: var(--navbar-h);
  margin-left: 0 !important;
  padding: var(--fluid-pad);
  padding-bottom: calc(var(--taskbar-height) + 24px) !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: calc(100vh - var(--navbar-h));
  box-sizing: border-box;
  transition: padding 0.3s;
}

/* 3. MOODLE-STYLE SYLLABUS TREE & ACTIVITY PROGRESS */
.syllabus-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chapter-card {
  background: var(--bg-glass-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-fast);
}

.chapter-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.02);
}

.chapter-header:hover {
  background: rgba(0, 242, 254, 0.05);
}

.chapter-body {
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lesson-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--text-sub);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lesson-item-row:hover {
  background: rgba(79, 172, 254, 0.12);
  border-color: rgba(0, 242, 254, 0.3);
  color: #fff;
}

.lesson-item-row.is-completed {
  border-left: 3px solid var(--accent-emerald);
}

.lesson-item-row.is-locked {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 4. AZOTA-STYLE SPLIT-SCREEN EXAM LAYOUT */
.azota-exam-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  min-height: calc(100vh - 120px);
}

.question-nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.question-nav-bubble {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-sub);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.question-nav-bubble:hover {
  border-color: var(--primary-glow);
  background: rgba(0, 242, 254, 0.15);
  color: #fff;
}

.question-nav-bubble.answered {
  background: var(--primary-accent);
  border-color: var(--primary-glow);
  color: #030812;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
}

.question-nav-bubble.flagged {
  border-color: var(--accent-amber);
  background: rgba(255, 179, 0, 0.2);
  color: #ffd54f;
}

.question-nav-bubble.active {
  border-color: #fff;
  transform: scale(1.08);
}

/* Exam Timer & YouTube BGM Player */
.exam-timer-box {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  text-align: center;
}

.timer-countdown-digits {
  font-size: 34px;
  font-weight: 800;
  font-family: monospace;
  letter-spacing: 2px;
  color: var(--primary-glow);
  text-shadow: 0 0 15px rgba(0, 242, 254, 0.6);
}

.timer-countdown-digits.warning {
  color: var(--secondary-glow);
  text-shadow: 0 0 20px rgba(255, 8, 68, 0.8);
  animation: pulse-subtle 1s infinite;
}

/* 5. FLOATING SUPER ROLE SWITCHER (POSITIONED BESIDE CHAT WIDGET) */
.super-role-switcher {
  position: fixed;
  bottom: 28px;
  right: 98px;
  z-index: 1990;
}

.role-switcher-toggle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 25px rgba(225, 0, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: var(--transition-bounce);
}

.role-switcher-toggle:hover {
  transform: scale(1.1) rotate(15deg);
}

.role-switcher-menu {
  position: absolute;
  bottom: 60px;
  right: 0;
  min-width: 220px;
  padding: 10px;
  background: var(--bg-glass-modal);
  backdrop-filter: var(--glass-blur-heavy);
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  gap: 6px;
}

.role-switcher-menu.show {
  display: flex;
  animation: scale-up-bounce 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.role-switcher-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  background: transparent;
  border: 1px solid transparent;
}

.role-switcher-item:hover {
  background: rgba(0, 242, 254, 0.12);
  color: #fff;
  border-color: rgba(0, 242, 254, 0.3);
}

.role-switcher-item.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2) 0%, rgba(127, 0, 255, 0.15) 100%);
  color: var(--primary-glow);
  border-color: var(--primary-glow);
}

/* 6. TOAST NOTIFICATIONS & WATERMARK */
.toast-container-liquid {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast-liquid {
  min-width: 320px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-glass-modal);
  backdrop-filter: var(--glass-blur-heavy);
  border: 1px solid var(--glass-border-hover);
  box-shadow: var(--shadow-md);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  animation: slide-in-right 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.watermark-overlay-secure {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9998;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(6, 1fr);
  opacity: 0.07;
  user-select: none;
}

.watermark-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-25deg);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

/* EXAM SPLIT ENGINE (AZOTA DESKTOP & MOBILE RESPONSIVE) */
.exam-split-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

.exam-questions-panel {
  min-width: 0;
}

.exam-sheet-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.exam-timer-display {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 900;
  text-align: center;
  color: var(--primary-glow);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 20px;
  box-shadow: inset 0 0 15px rgba(0, 242, 254, 0.2);
}

/* ==============================================================================
   7. MULTI-TIER ULTRA-RESPONSIVE SYSTEM (320px -> 480px -> 768px -> 992px -> 1200px -> 1920px -> 4K)
   100% Fluid Elastic CSS Variable Grid Engine for Screen-Agnostic Layouts
   ============================================================================== */

/* --- TIER 1: 4K & Ultra-Wide Displays (> 1920px) --- */
@media (min-width: 1920px) {
  :root {
    --sidebar-w: 280px;
    --navbar-h: 76px;
    --fluid-pad: 40px;
    --fluid-gap: 28px;
  }
  .app-main-layout {
    max-width: 1760px;
    margin-right: auto;
  }
  .azota-exam-layout {
    grid-template-columns: 1fr 420px;
    gap: 32px;
  }
  .question-nav-grid {
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
  }
  .glass-panel {
    padding: 32px;
  }
}

/* --- TIER 2: Large Desktops & Widescreen (1140px to 1919.98px) --- */
@media (max-width: 1919.98px) and (min-width: 1140px) {
  :root {
    --sidebar-w: 250px;
    --navbar-h: 70px;
    --fluid-pad: 28px;
    --fluid-gap: 20px;
  }
  .app-sidebar {
    width: 250px;
  }
  .azota-exam-layout {
    grid-template-columns: 1fr 340px;
    gap: 24px;
  }
  .omnibar-trigger-btn {
    min-width: 240px;
  }
}

/* --- TIER 3: Compact Laptops, Tablets & iPads (768px to 1139.98px — RESOLVES 992px SQUISHING) --- */
@media (max-width: 1139.98px) {
  :root {
    --sidebar-w: 0px;
    --navbar-h: 66px;
    --fluid-pad: 22px;
    --fluid-gap: 16px;
  }

  #btnToggleSidebar,
  .btn-sidebar-toggle-icon,
  .btn-sidebar-toggle {
    display: inline-flex !important;
  }
  
  .app-sidebar {
    transform: translateX(-100%);
    box-shadow: 15px 0 50px rgba(0, 0, 0, 0.85);
    z-index: 1040;
    width: 280px;
    top: var(--navbar-h);
    height: calc(100vh - var(--navbar-h));
  }
  
  .app-sidebar.show {
    transform: translateX(0);
  }

  .omnibar-trigger-btn {
    min-width: 180px;
  }

  .azota-exam-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .question-nav-grid {
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 8px;
  }

  /* Fluid auto wrapping for 4-column metric cards */
  .dashboard-metrics-grid .col-lg-3 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}

/* --- TIER 4: Phablets & Large Mobiles (480px to 767.98px) --- */
@media (max-width: 767.98px) {
  :root {
    --sidebar-w: 0px;
    --navbar-h: 64px;
    --fluid-pad: 16px;
    --fluid-gap: 12px;
  }

  .app-navbar {
    padding: 0 16px;
    height: var(--navbar-h);
  }

  .app-sidebar {
    top: var(--navbar-h);
    height: calc(100vh - var(--navbar-h));
    width: 280px;
  }

  .streak-pill {
    padding: 4px 10px;
    font-size: 12px;
  }

  .brand-logo span {
    font-size: 16px;
  }

  .brand-logo-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 17px;
  }

  .question-nav-grid {
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
    gap: 6px;
  }

  .timer-countdown-digits {
    font-size: 28px;
  }

  .toast-container-v2 {
    top: 12px;
    right: 12px;
    left: 12px;
  }

  .toast-v2 {
    min-width: auto;
    width: 100%;
  }

  .super-role-switcher {
    bottom: 16px;
    right: 76px;
  }

  .role-switcher-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    font-size: 18px;
  }

  .table-responsive {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
  }

  .table-responsive table {
    min-width: 620px;
  }

  .modal-dialog {
    max-width: calc(100vw - 24px);
    margin: 12px auto;
  }
}

/* --- TIER 5: Standard Compact Phones (360px to 479.98px) --- */
@media (max-width: 479.98px) {
  :root {
    --sidebar-w: 0px;
    --navbar-h: 58px;
    --fluid-pad: 12px;
    --fluid-gap: 10px;
  }

  .app-navbar {
    padding: 0 12px;
    height: var(--navbar-h);
  }

  .app-sidebar {
    top: var(--navbar-h);
    height: calc(100vh - var(--navbar-h));
    width: calc(100vw - 50px);
    max-width: 290px;
  }

  .glass-panel {
    padding: 14px !important;
    border-radius: var(--radius-md);
  }

  /* Keep table and inline button widths natural */
  .btn-liquid.btn-block-mobile,
  .w-sm-100 {
    width: 100% !important;
    display: flex;
    justify-content: center;
  }

  /* Prevent iOS auto-zoom on input focus */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important;
  }

  .question-nav-grid {
    grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
    gap: 6px;
  }

  .question-nav-bubble {
    font-size: 12.5px;
    border-radius: 8px;
  }

  .modal-dialog {
    max-width: calc(100vw - 16px);
    margin: 8px auto;
  }

  .modal-content {
    border-radius: var(--radius-md) !important;
  }

  .modal-header, .modal-footer {
    padding: 12px 14px !important;
  }

  .modal-body {
    padding: 14px 12px !important;
    max-height: calc(100vh - 130px) !important;
  }

  .table thead th, .table tbody td {
    padding: 8px 10px !important;
    font-size: 12.5px !important;
  }

  .table-responsive table {
    min-width: 580px;
  }
}

/* --- TIER 6: Ultra-Compact Devices (<= 359.98px: Galaxy Fold Cover, iPhone SE 1st) --- */
@media (max-width: 359.98px) {
  :root {
    --sidebar-w: 0px;
    --navbar-h: 54px;
    --fluid-pad: 8px;
    --fluid-gap: 8px;
  }

  .brand-logo span {
    display: none; /* Show icon only on ultra-narrow screens */
  }

  .app-navbar {
    padding: 0 8px;
    height: var(--navbar-h);
  }

  .question-nav-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .timer-countdown-digits {
    font-size: 22px;
  }

  .super-role-switcher {
    bottom: 14px;
    right: 68px;
  }
  
  .role-switcher-toggle {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    font-size: 16px;
  }
}

/* ==============================================================================
   WINDOWS 11 GLOBAL TASKBAR & START MENU SYSTEM
   ============================================================================== */
:root {
  --taskbar-height: 52px;
}

body.has-windows-taskbar {
  padding-bottom: calc(var(--taskbar-height) + 12px) !important;
}

.windows-taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--taskbar-height, 54px);
  background: rgba(12, 17, 34, 0.88);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

.taskbar-left-zone {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
}

.taskbar-right-tray {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
  justify-content: flex-end;
}

.taskbar-center-dock {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.taskbar-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-decoration: none;
  margin: 0;
  transform: none;
}

.taskbar-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  color: #00f2fe;
}

.taskbar-btn.active {
  background: rgba(0, 242, 254, 0.18);
  border-color: rgba(0, 242, 254, 0.4);
  color: #00f2fe;
}

.taskbar-btn.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 16px;
  height: 3px;
  background: #00f2fe;
  border-radius: 3px;
  box-shadow: 0 0 8px #00f2fe;
}

.mobile-tab-center-btn,
.taskbar-start-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0078d4 0%, #00f2fe 100%);
  box-shadow: 0 0 15px rgba(0, 120, 212, 0.4);
  border-radius: 14px !important;
  width: 44px !important;
  height: 44px !important;
  font-size: 20px !important;
  color: #00f2fe !important;
  border: 1px solid rgba(0, 242, 254, 0.3) !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
}

.taskbar-start-btn i,
.mobile-tab-center-btn i {
  display: inline-block !important;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.25s ease !important;
}

.mobile-tab-center-btn:hover,
.taskbar-start-btn:hover {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.25) 0%, rgba(79, 172, 254, 0.35) 100%) !important;
  border-color: #00f2fe !important;
  box-shadow: 0 0 22px rgba(0, 242, 254, 0.7), inset 0 0 10px rgba(0, 242, 254, 0.35) !important;
  transform: translateY(-2px) scale(1.08) !important;
  color: #fff !important;
}

.mobile-tab-center-btn:hover i,
.taskbar-start-btn:hover i {
  transform: scale(1.18) !important;
  color: #ffffff !important;
  filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.9)) !important;
}

.mobile-tab-center-btn:active,
.taskbar-start-btn:active {
  transform: translateY(0px) scale(0.92) !important;
  transition-duration: 0.08s !important;
}

/* KHI NÚT START ĐANG Ở TRẠNG THÁI ACTIVE (Menu đang mở) */
.mobile-tab-center-btn.active,
.taskbar-start-btn.active {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%) !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.95), 0 0 45px rgba(0, 120, 212, 0.6), inset 0 1px 2px #fff !important;
  color: #070b14 !important;
  transform: translateY(-1px) scale(1.06) !important;
}

.mobile-tab-center-btn.active i,
.taskbar-start-btn.active i {
  transform: rotate(90deg) scale(1.15) !important;
  color: #070b14 !important;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.4)) !important;
}

/* Start Button Notification Indicator Dot (Chấm đỏ báo tin nhắn mới) */
.taskbar-notification-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 9px;
  height: 9px;
  background: #ff0844;
  border: 1.5px solid #070b14;
  border-radius: 50%;
  box-shadow: 0 0 8px #ff0844;
  animation: pulse-notification-dot 1.8s infinite;
  pointer-events: none;
}

@keyframes pulse-notification-dot {
  0%, 100% { transform: scale(1); box-shadow: 0 0 6px #ff0844; }
  50% { transform: scale(1.35); box-shadow: 0 0 12px #ff0844; }
}

/* ==========================================================================
   LIQUID 3D NOTIFICATION BELL & GLOWING BADGE (Chuông Thông Báo & Chấm Đỏ Đếm Số)
   ========================================================================== */
.lms-notif-bell-btn {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
  font-size: 16px !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

.lms-notif-bell-btn:hover {
  background: rgba(0, 242, 254, 0.15) !important;
  border-color: rgba(0, 242, 254, 0.5) !important;
  color: #00f2fe !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.35) !important;
}

/* Hiệu ứng rung chuông sinh động khi có thông báo mới */
.bell-ringing i {
  display: inline-block;
  animation: bell-ring-anim 2.5s infinite ease-in-out;
  color: #ffb703 !important;
  filter: drop-shadow(0 0 6px rgba(255, 183, 3, 0.8));
}

@keyframes bell-ring-anim {
  0%, 100% { transform: rotate(0); }
  5% { transform: rotate(16deg); }
  10% { transform: rotate(-14deg); }
  15% { transform: rotate(12deg); }
  20% { transform: rotate(-10deg); }
  25% { transform: rotate(6deg); }
  30% { transform: rotate(0); }
}

/* Huy hiệu chấm đỏ phát sáng hiển thị số lượng thông báo chưa đọc */
.lms-notif-badge {
  position: absolute !important;
  top: -4px !important;
  right: -5px !important;
  min-width: 19px !important;
  height: 19px !important;
  padding: 0 5px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #ff0844 0%, #ff4e50 100%) !important;
  color: #ffffff !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  line-height: 17px !important;
  text-align: center !important;
  border: 1.5px solid #070b14 !important;
  box-shadow: 0 0 10px rgba(255, 8, 68, 0.9), 0 2px 4px rgba(0,0,0,0.5) !important;
  animation: badge-pulse-anim 2.2s infinite ease-in-out !important;
  pointer-events: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 5 !important;
}

@keyframes badge-pulse-anim {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(255, 8, 68, 0.7); }
  50% { transform: scale(1.18); box-shadow: 0 0 16px rgba(255, 8, 68, 1); }
}

/* Notification Dropdown Flyout Panel */
.notif-flyout-menu {
  width: min(380px, 94vw) !important;
  background: rgba(14, 18, 36, 0.96) !important;
  backdrop-filter: blur(35px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(35px) saturate(180%) !important;
  border: 1px solid rgba(0, 242, 254, 0.25) !important;
  border-radius: 20px !important;
  padding: 14px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 242, 254, 0.15) !important;
}

.notif-quick-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.notif-quick-item:hover {
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.3);
  transform: translateX(3px);
}

.btn-xs {
  padding: 2px 8px !important;
  font-size: 10.5px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
}

.mobile-tab-label {
  display: none !important;
}

/* Ẩn nút Role Switcher bóng trôi nổi để không che góc Taskbar */
.role-switcher-toggle {
  display: none !important;
}

.start-menu-popup {
  position: fixed !important;
  bottom: calc(var(--taskbar-height, 54px) + 12px) !important;
  left: 50% !important;
  width: min(520px, 92vw) !important;
  max-height: 80vh !important;
  display: flex !important;
  flex-direction: column !important;
  background: rgba(14, 18, 36, 0.96) !important;
  backdrop-filter: blur(40px) saturate(170%) !important;
  -webkit-backdrop-filter: blur(40px) saturate(170%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-top: 1px solid rgba(0, 242, 254, 0.4) !important;
  border-radius: 24px !important;
  padding: 20px 22px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 242, 254, 0.2) !important;
  z-index: 1060 !important;
  
  /* Smooth Fluent Animation Lifecycle */
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(-50%) translateY(28px) scale(0.92) !important;
  transform-origin: bottom center !important;
  transition: opacity 0.26s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.26s !important;
  will-change: transform, opacity, visibility !important;
}

.start-menu-popup.show {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateX(-50%) translateY(0) scale(1) !important;
}

/* Staggered Pop-in Effect for Pinned Apps */
.start-menu-popup.show .start-pinned-item {
  animation: start-item-pop 0.32s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes start-item-pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.start-search-box {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 13px;
  color: #fff;
  width: 100%;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.start-search-box:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: #00f2fe;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

#startMenuPinnedList,
#globalStartPinnedList {
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: none !important;
}

#startMenuPinnedList::-webkit-scrollbar,
#globalStartPinnedList::-webkit-scrollbar {
  display: none !important;
}

.start-pinned-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
  will-change: transform;
}

.start-pinned-item:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #00f2fe;
  transform: translateX(4px);
}

.start-pinned-item:active {
  transform: scale(0.96);
}

.start-pinned-item .os-app-icon-box {
  width: 34px !important;
  height: 34px !important;
  font-size: 17px !important;
  border-radius: 10px !important;
  margin-bottom: 0 !important;
}

.start-pinned-item span {
  font-size: 12.5px !important;
  font-weight: 500 !important;
}

/* ==============================================================================
   OS HERO PANEL (Global Welcome Header - LiquidGlass Soft Aurora)
   ============================================================================== */
@keyframes osHeaderEntrance {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.os-hero-panel {
  background: rgba(16, 23, 48, 0.68) !important;
  backdrop-filter: blur(28px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 24px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  animation: osHeaderEntrance 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Tán xạ ánh sáng Aurora đa sắc phía sau nhẹ nhàng, không gây chói mắt */
.os-hero-panel::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -40px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.12) 0%, rgba(79, 172, 254, 0.05) 50%, transparent 70%);
  filter: blur(45px);
  pointer-events: none;
}

.os-hero-panel::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -30px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(248, 87, 166, 0.09) 0%, rgba(142, 84, 233, 0.04) 50%, transparent 70%);
  filter: blur(45px);
  pointer-events: none;
}

/* ==============================================================================
   PERSISTENT FIXED HOME INDICATOR (Luôn cố định sát đáy màn hình Mobile/Tablet)
   ============================================================================== */
.ios-home-indicator-fixed {
  display: none;
  position: fixed !important;
  bottom: 6px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 134px !important;
  height: 5px !important;
  background: rgba(255, 255, 255, 0.65) !important;
  border-radius: 100px !important;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.6) !important;
  z-index: 1070 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.ios-home-indicator-fixed:hover,
.ios-home-indicator-fixed.active {
  background: #00f2fe !important;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.9) !important;
  transform: translateX(-50%) scale(1.1) !important;
}

@media (max-width: 1023.98px) {
  .ios-home-indicator-fixed {
    display: block !important;
  }

  /* Smart Auto-Hide Transition for Mobile & Tablet Dock */
  .windows-taskbar {
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease !important;
    will-change: transform, opacity !important;
  }

  .windows-taskbar.dock-hidden {
    transform: translateY(140%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .windows-taskbar.dock-visible {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}

/* ==============================================================================
   TRI-TIER SPECIALIZED RESPONSIVE OS ARCHITECTURE:
   1. DESKTOP / LAPTOP (>= 1024px)
   2. TABLET / iPAD (768px - 1023.98px)
   3. MOBILE PHONE (320px - 767.98px)
   ============================================================================== */

/* --- TIER 1: TABLET / iPAD (768px - 1023.98px) --- */
@media (min-width: 768px) and (max-width: 1023.98px) {
  :root {
    --taskbar-height: 64px;
    --app-icon-size: 66px;
  }

  body.has-windows-taskbar {
    padding-bottom: 90px !important;
  }

  /* Compact Balanced Hero Header on Tablet */
  .os-hero-panel {
    padding: 16px 20px !important;
    border-radius: 22px !important;
    margin-bottom: 20px !important;
    background: rgba(16, 23, 48, 0.68) !important;
    backdrop-filter: blur(28px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
  }

  .os-hero-panel #userAvatarImg {
    width: 52px !important;
    height: 52px !important;
  }

  .os-hero-panel h3#userGreetingName {
    font-size: 17px !important;
    font-weight: 700 !important;
    margin-bottom: 2px !important;
  }

  .os-hero-panel #userRoleBadge {
    font-size: 11px !important;
    padding: 3px 10px !important;
  }

  .os-hero-panel p#userBioText {
    font-size: 12px !important;
    max-width: 380px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
  }

  .os-hero-panel #btnOpenRoleModalTop,
  .os-hero-panel a[href="index.html"] {
    padding: 7px 14px !important;
    font-size: 12px !important;
    border-radius: 100px !important;
  }

  /* iPadOS Floating Translucent Smart Dock (Thuần Túy 5 Ứng Dụng Chuẩn iPadOS) */
  .windows-taskbar {
    bottom: 14px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(380px, 90vw) !important;
    height: 64px !important;
    min-height: 64px !important;
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
    background: rgba(16, 22, 46, 0.82) !important;
    backdrop-filter: blur(35px) saturate(170%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(170%) !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    padding: 0 12px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .windows-taskbar.dock-hidden {
    transform: translateX(-50%) translateY(140%) !important;
  }

  .windows-taskbar.dock-visible {
    transform: translateX(-50%) translateY(0) !important;
  }

  /* Ẩn các icon hệ thống dư thừa trên Tablet để vừa vặn 100% */
  .taskbar-left-zone, .taskbar-right-tray {
    display: none !important;
  }

  .taskbar-center-dock {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-evenly !important;
    width: 100% !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .taskbar-btn {
    width: 46px !important;
    height: 46px !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    align-self: center !important;
  }

  .taskbar-btn i {
    font-size: 20px !important;
    line-height: 1 !important;
  }

  .mobile-tab-center-btn {
    position: static !important;
    transform: none !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 50%, #7f00ff 100%) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 4px 14px rgba(0, 114, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    margin: 0 !important;
    align-self: center !important;
  }

  .mobile-tab-center-btn i {
    font-size: 20px !important;
  }

  .mobile-tab-label {
    display: none !important;
  }

  /* Tablet 5-Column Grid */
  .app-icon-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 20px 14px !important;
  }

  .os-app-icon-box {
    width: 66px !important;
    height: 66px !important;
    font-size: 28px !important;
    border-radius: 19px !important;
  }

  .os-widgets-row {
    margin-top: 20px !important;
  }

  /* 2-column tablet widgets */
  .os-widgets-row .col-md-4:nth-child(1),
  .os-widgets-row .col-md-4:nth-child(2) {
    width: 50% !important;
  }
  .os-widgets-row .col-md-4:nth-child(3) {
    width: 100% !important;
    margin-top: 14px;
  }
}

/* --- TIER 2: MOBILE PHONE (<= 767.98px) — CLEAN NATIVE MOBILE EXPERIENCE --- */
@media (max-width: 767.98px) {
  :root {
    --taskbar-height: 84px;
    --app-icon-size: 58px;
  }

  body.has-windows-taskbar {
    padding-bottom: 110px !important;
  }

  /* ==============================================================================
     COMPACT MOBILE HERO PROFILE HEADER (Chuẩn Mobile App Tinh Gọn & Đẹp Mắt)
     ============================================================================== */
  .os-hero-panel {
    padding: 12px 16px !important;
    border-radius: 20px !important;
    margin-bottom: 16px !important;
    background: rgba(16, 23, 48, 0.68) !important;
    backdrop-filter: blur(28px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
  }

  .os-hero-panel > .d-flex {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .os-hero-panel #userAvatarImg {
    width: 42px !important;
    height: 42px !important;
    border-width: 1.5px !important;
  }

  .os-hero-panel h3#userGreetingName {
    font-size: 14px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 130px !important;
    margin-bottom: 2px !important;
  }

  .os-hero-panel #userRoleBadge {
    font-size: 9px !important;
    padding: 2px 6px !important;
    border-radius: 20px !important;
  }

  .os-hero-panel p#userBioText {
    display: none !important; /* Hide long bio on small mobile screens */
  }

  /* Compact Action Buttons on Mobile */
  .os-hero-panel #btnOpenRoleModalTop {
    padding: 6px 10px !important;
    font-size: 11px !important;
    border-radius: 100px !important;
    white-space: nowrap !important;
  }

  .os-hero-panel a[href="index.html"] {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    font-size: 13px !important;
  }

  /* Hide "Trang Chủ" text label on mobile button, keep clean icon */
  .os-hero-panel a[href="index.html"] span,
  .os-hero-panel a[href="index.html"] {
    font-size: 0 !important;
  }

  .os-hero-panel a[href="index.html"] i {
    font-size: 14px !important;
    margin: 0 !important;
  }

  /* iOS 4-Column Continuous Squircle Icon Grid (Canh Đều Tuyệt Đối) */
  .app-icon-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px 8px !important;
    margin-top: 16px !important;
    justify-items: center !important;
    align-items: start !important;
    width: 100% !important;
  }

  .os-app-card {
    width: 100% !important;
    max-width: 76px !important;
    margin: 0 auto !important;
    padding: 4px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: center !important;
  }

  .os-app-icon-box {
    width: 58px !important;
    height: 58px !important;
    font-size: 26px !important;
    border-radius: 17px !important; /* Apple Superellipse continuous corner curve */
    margin: 0 auto 6px auto !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), inset 0 1.5px 0 rgba(255, 255, 255, 0.35) !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .os-app-card:active .os-app-icon-box {
    transform: scale(0.9) !important;
  }

  .os-app-card span.app-title {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Plus Jakarta Sans", sans-serif !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: -0.2px !important;
    line-height: 1.2 !important;
    width: 100% !important;
    max-width: 72px !important;
    text-align: center !important;
    display: block !important;
    margin: 0 auto !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
  }

  /* iOS FLOATING FROSTED GLASS DOCK (Canh Đều & Ngang Hàng 100%) */
  .windows-taskbar {
    position: fixed !important;
    bottom: 12px !important;
    left: 16px !important;
    right: 16px !important;
    transform: none !important;
    width: auto !important;
    height: 72px !important;
    min-height: 72px !important;
    border-radius: 28px !important;
    background: rgba(16, 22, 46, 0.78) !important;
    backdrop-filter: blur(35px) saturate(170%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(170%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    padding: 0 8px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1050 !important;
  }

  .taskbar-center-dock {
    width: 100% !important;
    height: 100% !important;
    position: static !important;
    transform: none !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-evenly !important;
    align-items: center !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .taskbar-btn {
    width: 50px !important;
    height: 50px !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    align-self: center !important;
  }

  .taskbar-btn i {
    font-size: 22px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .taskbar-btn.active {
    background: rgba(0, 242, 254, 0.18) !important;
    border-color: rgba(0, 242, 254, 0.4) !important;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.25) !important;
  }

  /* Center Action Button (Ngang hàng tuyệt đối với 4 nút còn lại) */
  .mobile-tab-center-btn {
    position: static !important;
    transform: none !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 50%, #7f00ff 100%) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 4px 14px rgba(0, 114, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    margin: 0 !important;
    align-self: center !important;
  }

  .mobile-tab-center-btn i {
    font-size: 22px !important;
    color: #fff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
  }

  .mobile-tab-center-btn:active {
    transform: scale(0.92) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
  }

  .mobile-tab-label {
    display: none !important; /* Authentic iOS Home Screen Dock has clean app icons without text labels */
  }

  /* iOS Home Bar Gesture Indicator (Tương tác bấm/chạm) */
  .ios-home-indicator {
    display: block !important;
    width: 134px !important;
    height: 5px !important;
    background: rgba(255, 255, 255, 0.55) !important;
    border-radius: 100px !important;
    margin: 8px auto 0 auto !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  }

  .ios-home-indicator:hover {
    background: #00f2fe !important;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.5) !important;
  }

  .ios-home-indicator:active {
    transform: scale(0.9) !important;
  }

  .taskbar-left-zone, .taskbar-right-tray {
    display: none !important;
  }

  /* iOS Control Center / App Library Drawer Sheet */
  .start-menu-popup {
    bottom: 92px !important;
    width: min(390px, 94vw) !important;
    max-height: 72vh !important;
    padding: 16px !important;
    border-radius: 24px !important;
    background: rgba(14, 18, 36, 0.96) !important;
    backdrop-filter: blur(40px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85) !important;
  }

  /* 2x2 Square iOS Widgets on Mobile */
  .os-widgets-row {
    margin-top: 18px !important;
  }

  .os-widget-card {
    padding: 16px !important;
    border-radius: 22px !important;
    background: rgba(16, 24, 48, 0.6) !important;
    backdrop-filter: blur(25px) saturate(150%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
  }

  .clock-time {
    font-size: 32px !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif !important;
  }
}

/* ==============================================================================
   STICKY MOBILE CTA BAR (CONVERSION OPTIMIZATION FOR SMARTPHONES)
   ============================================================================== */
.sticky-mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid rgba(0, 242, 254, 0.3);
  padding: 10px 14px;
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 242, 254, 0.15);
}

@media (max-width: 767.98px) {
  .sticky-mobile-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
}

/* ==============================================================================
   PUBLIC WEBSITE GUEST NAVIGATION (WHEN LOGGED OUT)
   ============================================================================== */
.nav-public-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  gap: 10px;
}

.nav-public-mobile-trigger {
  display: none;
}

@media (max-width: 1139.98px) {
  .nav-public-menu {
    display: none !important;
  }
  .nav-public-mobile-trigger {
    display: block !important;
  }
}

.btn-public-menu-trigger,
.nav-public-mobile-trigger .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  line-height: 1 !important;
  border-radius: 50% !important;
}

.btn-public-menu-trigger i,
.nav-public-mobile-trigger .btn i {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  font-size: 22px !important;
  margin: 0 !important;
  transform: translateY(-0.5px);
}

.nav-public-link {
  color: #94a3b8 !important;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none !important;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nav-public-link:hover,
.nav-public-link.active {
  color: #00F2FE !important;
  background: rgba(0, 242, 254, 0.09);
  text-shadow: 0 0 12px rgba(0, 242, 254, 0.45);
  box-shadow: inset 0 0 10px rgba(0, 242, 254, 0.1);
}

.public-mobile-drawer {
  background: rgba(14, 20, 38, 0.98) !important;
  backdrop-filter: blur(30px) !important;
  border-bottom: 1px solid rgba(0, 242, 254, 0.25) !important;
}

/* ==============================================================================
   HIGH-CONTRAST CRISP GLASS DROPDOWN MENU SYSTEM
   ============================================================================== */
.dropdown-menu.glass-panel,
.dropdown-menu-dark.glass-panel,
.nav-public-mobile-trigger .dropdown-menu {
  background: rgba(11, 17, 34, 0.97) !important;
  backdrop-filter: blur(25px) !important;
  -webkit-backdrop-filter: blur(25px) !important;
  border: 1px solid rgba(0, 242, 254, 0.35) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 242, 254, 0.2) !important;
  border-radius: 16px !important;
  min-width: 220px !important;
  padding: 8px !important;
  z-index: 1060 !important;
}

.dropdown-menu.glass-panel .dropdown-item,
.dropdown-menu-dark.glass-panel .dropdown-item,
.nav-public-mobile-trigger .dropdown-item {
  color: #f1f5f9 !important;
  font-weight: 600 !important;
  font-size: 14.5px !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
}

.dropdown-menu.glass-panel .dropdown-item:hover,
.dropdown-menu.glass-panel .dropdown-item:focus,
.nav-public-mobile-trigger .dropdown-item:hover,
.nav-public-mobile-trigger .dropdown-item:focus {
  background: rgba(0, 242, 254, 0.15) !important;
  color: #00F2FE !important;
  transform: translateX(4px) !important;
}

.dropdown-menu.glass-panel .dropdown-item i,
.nav-public-mobile-trigger .dropdown-item i {
  font-size: 17px !important;
  margin-right: 10px !important;
}

.dropdown-menu.glass-panel .dropdown-divider {
  border-color: rgba(255, 255, 255, 0.12) !important;
  margin: 6px 0 !important;
}





