/* ==========================================================================

   ACADEMIC MODERN DESIGN SYSTEM (custom.css)

   SMK Muhammadiyah Majenang - E-Learning 2.0

   Inspired by Modern Dashboard Design (Langgam Theme)

   Clean White Topbar, Midnight Navy Sidebar, Elevated Cards, & Clean DataTables

   ========================================================================== */



/* Note: Fonts (Plus Jakarta Sans, Inter, Amiri) are preconnected and loaded asynchronously via HTML <link> in <head> for zero render-blocking */



:root {

  --sidebar-bg: #ffffff;

  --sidebar-active: #f59e0b;

  --sidebar-active-bg: rgba(245, 158, 11, 0.12);

  --topbar-bg: #ffffff;

  --bg-canvas: #f8fafc;

  --card-bg: #ffffff;

  --border-subtle: #e2e8f0;

  --border-light: #f1f5f9;

  --text-dark: #0f172a;

  --text-primary: #1e293b;

  --text-secondary: #64748b;

  --text-muted: #94a3b8;

  --primary-navy: #0c192c;

  --primary-blue: #2563eb;

  --accent-gold: #f59e0b;

  --accent-emerald: #059669;

  --radius-lg: 14px;

  --radius-md: 10px;

  --radius-sm: 8px;

  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.04);

  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);

  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08);

}



/* Scoped density: Font-size density scaling without CSS zoom (prevents right-edge viewport clipping) */
@media (min-width: 992px) {
  html {
    font-size: 90%;
    -webkit-text-size-adjust: 100%;
  }
}

@media (max-width: 991px) {
  html {
    zoom: 100%;
    -webkit-text-size-adjust: 100%;
    font-size: 15.5px;
    touch-action: manipulation;
  }
}



body {

  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;

  background-color: var(--bg-canvas) !important;

  color: var(--text-primary);

  -webkit-font-smoothing: antialiased;

  -moz-osx-font-smoothing: grayscale;

}



/* ==========================================================================

   TOPBAR - Clean White, Elevated, Dark Typography (Matching Image 1)

   ========================================================================== */

.topbar,

.topbar.bg-danger {

  background: var(--topbar-bg) !important;

  border-bottom: 1px solid var(--border-subtle) !important;

  box-shadow: 0 1px 4px 0 rgba(15, 23, 42, 0.03) !important;

  min-height: 64px;

  padding: 0 24px !important;

}



.topbar .topbar-btn {

  color: var(--text-secondary) !important;

  border-radius: 50%;

  width: 38px;

  height: 38px;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  transition: all 0.2s ease;

  background: transparent;

}



.topbar .topbar-btn:hover {

  background: #f1f5f9 !important;

  color: var(--text-dark) !important;

}



.topbar-circle-btn {

  width: 38px !important;

  height: 38px !important;

  min-width: 38px !important;

  min-height: 38px !important;

  border-radius: 50% !important;

  border: 1px solid #dce4ec !important;

  display: inline-flex !important;

  align-items: center !important;

  justify-content: center !important;

  color: #64748b !important;

  background: #ffffff !important;

  transition: all 0.2s ease !important;

  cursor: pointer !important;

  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;

  position: relative !important;

  line-height: 1 !important;

  text-decoration: none !important;

}



.topbar-circle-btn:hover {

  background: #f8fafc !important;

  color: #0f172a !important;

  border-color: #cbd5e1 !important;

  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08) !important;

}



.topbar-circle-btn i {

  font-size: 16px !important;

  line-height: 1 !important;

  color: inherit !important;

  display: inline-flex !important;

  align-items: center !important;

  justify-content: center !important;

}



.topbar-btns {

  display: flex !important;

  align-items: center !important;

  margin-bottom: 0 !important;

  gap: 4px;

}



.topbar-btns > li {

  display: inline-flex !important;

  align-items: center !important;

}



.topbar-page-title {

  font-size: 18px;

  font-weight: 800;

  color: var(--text-dark);

  letter-spacing: -0.02em;

  margin: 0;

  display: inline-flex;

  align-items: center;

}



.topbar-badge {

  background: #f1f5f9;

  color: #475569;

  font-weight: 600;

  font-size: 11.5px;

  padding: 4px 12px;

  border-radius: 20px;

  margin-left: 12px;

  border: none !important;

}



.topbar .avatar {

  border: 1.5px solid #dce4ec !important;

  border-radius: 50% !important;

  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;

  width: 36px !important;

  height: 36px !important;

  min-width: 36px !important;

  min-height: 36px !important;

  object-fit: cover !important;

  display: inline-block !important;

}



/* ==========================================================================

   SIDEBAR - Deep Midnight Navy, Gold Accents (Matching Image 1)

   ========================================================================== */

.sidebar {

  background-color: var(--sidebar-bg) !important;

  border-right: 1px solid rgba(255, 255, 255, 0.05) !important;

  box-shadow: var(--shadow-md) !important;

  display: flex;

  flex-direction: column;

}



/* ==========================================================================

   SIDEBAR HEADER - Matching Exact Screenshots (media_1792991501443_b08e6ee2.png & media_1792991518576_4fc26daf.png)

   Expanded: Royal Blue #1c519d, School Brand Image on left, hollow circle toggle in middle, sun emblem on right

   Folded: Midnight Navy #081b29, sun emblem precisely centered

   ========================================================================== */

.sidebar .sidebar-header,

.sidebar .sidebar-header.bg-primary,

.sidebar-header {

  background: #ffffff !important;

  border-bottom: 1px solid #e2e8f0 !important;

  height: 52px !important;

  min-height: 52px !important;

  max-height: 52px !important;

  padding: 0 12px !important;

  display: flex !important;

  align-items: center !important;

  justify-content: space-between !important;

  overflow: hidden !important;

  box-sizing: border-box !important;

  position: relative !important;

  z-index: 10 !important;

}



/* 1. Left: School Brand Image (Image 1) */

.sidebar-header .logo {

  display: flex !important;

  align-items: center !important;

  flex: 0 0 auto !important;

  max-width: 135px !important;

  overflow: hidden !important;

  margin: 0 !important;

  padding: 0 !important;

  order: 1 !important;

}



.sidebar-header .logo a,

.sidebar-header .logo .sidebar-brand-link {

  display: inline-flex !important;

  align-items: center !important;

  text-decoration: none !important;

}



.sidebar-header .logo img,

.sidebar-header .logo .sidebar-logo-img {

  max-height: 26px !important;

  max-width: 130px !important;

  width: auto !important;

  height: auto !important;

  object-fit: contain !important;

  display: block !important;

}



/* 2. Middle: Circle Toggle Button (Hollow White Ring like Image 1) */

.sidebar-header .sidebar-toggle-fold {

  display: inline-flex !important;

  align-items: center !important;

  justify-content: center !important;

  width: 24px !important;

  height: 24px !important;

  margin: 0 auto !important;

  padding: 0 !important;

  cursor: pointer !important;

  flex: 0 0 24px !important;

  order: 2 !important;

}



.sidebar-header .sidebar-toggle-fold::before {

  content: '' !important;

  display: inline-block !important;

  width: 12px !important;

  height: 12px !important;

  border: 2px solid #2563eb !important;

  border-radius: 50% !important;

  background-color: #2563eb !important;

  box-shadow: 0 0 0 2px #dbeafe !important;

  box-sizing: border-box !important;

  transition: all 0.2s ease !important;

}



.sidebar-header .sidebar-toggle-fold:hover::before {

  background-color: #ffffff !important;

  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6) !important;

}



/* 3. Right: Emblem Icon (Muhammadiyah Sun like Image 1) */

.sidebar-header .logo-icon {

  display: inline-flex !important;

  align-items: center !important;

  justify-content: center !important;

  width: 32px !important;

  height: 32px !important;

  min-width: 32px !important;

  max-width: 32px !important;

  min-height: 32px !important;

  max-height: 32px !important;

  flex: 0 0 32px !important;

  flex-basis: 32px !important;

  margin: 0 !important;

  padding: 0 !important;

  overflow: hidden !important;

  order: 3 !important;

}



.sidebar-header .logo-icon img,

.sidebar-header .sidebar-logo-icon {

  width: 28px !important;

  height: 28px !important;

  max-width: 28px !important;

  max-height: 28px !important;

  object-fit: contain !important;

  display: block !important;

  margin: auto !important;

}



/* ==========================================================================

   SIDEBAR ARCHITECTURE - SMK MUHAMMADIYAH MAJENANG

   Two Clean, Distinct, Perfectly Responsive States:

   1. EXPANDED (Default): 260px Width, Royal Blue #1c519d Header (Image 1)

   2. FOLDED: 80px Compact Icon Bar, Midnight Navy #081b29 Header (Image 2)

   Controlled by `body.sidebar-folded` toggle (no mouse-trap hover flickers!)

   ========================================================================== */



/* Universal Sidebar Structure */

.sidebar {

  background-color: var(--sidebar-bg) !important;

  border-right: 1px solid rgba(255, 255, 255, 0.05) !important;

  box-shadow: var(--shadow-md) !important;

  display: flex !important;

  flex-direction: column !important;

  top: 0 !important;

  bottom: 0 !important;

  left: 0 !important;

  z-index: 1040 !important;

  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;

}



.sidebar-navigation {

  overflow-y: auto !important;

  overflow-x: hidden !important;

  flex: 1 1 auto !important;

  -webkit-overflow-scrolling: touch;

  scrollbar-width: none !important;

  -ms-overflow-style: none !important;

}



.sidebar-navigation::-webkit-scrollbar {

  display: none !important;

  width: 0 !important;

  height: 0 !important;

}



/* Ensure Topbar Hamburger Toggler is ALWAYS Visible & Clickable */

.topbar .sidebar-toggler,

.sidebar-expand-lg ~ .topbar .sidebar-toggler,

.sidebar-expand ~ .topbar .sidebar-toggler {

  display: inline-flex !important;

  visibility: visible !important;

  opacity: 1 !important;

  cursor: pointer !important;

}



/* ==========================================================================
   DESKTOP SIDEBAR STATES (>= 992px)
   ========================================================================== */
@media (min-width: 992px) {
/* --------------------------------------------------------------------------

   STATE 1: EXPANDED SIDEBAR (body:not(.sidebar-folded)) - Matching Image 1

   -------------------------------------------------------------------------- */

body:not(.sidebar-folded) .sidebar {

  width: 260px !important;

  min-width: 260px !important;

  max-width: 260px !important;

  left: 0 !important;

}



body:not(.sidebar-folded) .topbar,
body:not(.sidebar-folded) main,
body:not(.sidebar-folded) .main-container {
  margin-left: 260px !important;
  margin-right: 0 !important;
  width: auto !important;
  max-width: none !important;
  right: 0 !important;
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}



/* Header in Expanded Mode: Royal Blue #1c519d */

body:not(.sidebar-folded) .sidebar-header {

  width: 260px !important;

  height: 54px !important;

  min-height: 54px !important;

  max-height: 54px !important;

  background: #ffffff !important;

  border-bottom: 1px solid #e2e8f0 !important;

  display: flex !important;

  align-items: center !important;

  justify-content: space-between !important;

  padding: 0 14px !important;

  box-sizing: border-box !important;

}



/* 1. Brand Logo Left */

body:not(.sidebar-folded) .sidebar-header .logo {

  display: flex !important;

  align-items: center !important;

  max-width: 135px !important;

  order: 1 !important;

}



body:not(.sidebar-folded) .sidebar-header .logo img {

  max-height: 26px !important;

  max-width: 130px !important;

  object-fit: contain !important;

}



/* 2. Circle Toggle Fold Button Middle */

body:not(.sidebar-folded) .sidebar-header .sidebar-toggle-fold {

  display: inline-flex !important;

  align-items: center !important;

  justify-content: center !important;

  width: 24px !important;

  height: 24px !important;

  cursor: pointer !important;

  order: 2 !important;

}



body:not(.sidebar-folded) .sidebar-header .sidebar-toggle-fold::before {

  content: '' !important;

  display: inline-block !important;

  width: 12px !important;

  height: 12px !important;

  border: 2px solid #2563eb !important;

  border-radius: 50% !important;

  background-color: #2563eb !important;

  box-shadow: 0 0 0 2px #dbeafe !important;

  box-sizing: border-box !important;

  transition: all 0.2s ease !important;

}



body:not(.sidebar-folded) .sidebar-header .sidebar-toggle-fold:hover::before {

  border-color: #1d4ed8 !important;

  background-color: #1d4ed8 !important;

  box-shadow: 0 0 0 3px #bfdbfe !important;

}



/* 3. Muhammadiyah Sun Logo Right */

body:not(.sidebar-folded) .sidebar-header .logo-icon {

  display: inline-flex !important;

  align-items: center !important;

  justify-content: center !important;

  width: 32px !important;

  height: 32px !important;

  order: 3 !important;

}



body:not(.sidebar-folded) .sidebar-header .logo-icon img {

  width: 28px !important;

  height: 28px !important;

  object-fit: contain !important;

}



/* Expanded Menu Elements */

body:not(.sidebar-folded) .menu-category {

  display: block !important;

  padding: 1rem 1.25rem 0.5rem !important;

  font-size: 10px !important;

  font-weight: 800 !important;

  text-transform: uppercase !important;

  letter-spacing: 0.1em !important;

  color: #64748b !important;

}



body:not(.sidebar-folded) .menu-link {

  display: flex !important;

  align-items: center !important;

  justify-content: flex-start !important;

  padding: 0.7rem 1.25rem !important;

  width: 100% !important;

}



body:not(.sidebar-folded) .menu-link .icon {

  margin-right: 12px !important;

  margin-left: 0 !important;

}



body:not(.sidebar-folded) .menu-link .title {

  display: inline-block !important;

  visibility: visible !important;

  width: auto !important;

  opacity: 1 !important;

}



body:not(.sidebar-folded) .menu-link .arrow {

  display: inline-block !important;

  margin-left: auto !important;

}



body:not(.sidebar-folded) .sidebar-profile-card {

  display: flex !important;

  padding: 10px 14px !important;

  margin: 12px 14px !important;

  background: rgba(255, 255, 255, 0.05) !important;

  border: 1px solid rgba(255, 255, 255, 0.1) !important;

  border-radius: 16px !important;

}



body:not(.sidebar-folded) .sidebar-profile-card .profile-meta,

body:not(.sidebar-folded) .sidebar-profile-card .sidebar-profile-logout {

  display: flex !important;

}



/* --------------------------------------------------------------------------

   STATE 2: FOLDED SIDEBAR (body.sidebar-folded) - 80px Compact (Image 2)

   -------------------------------------------------------------------------- */

body.sidebar-folded .sidebar {

  width: 80px !important;

  min-width: 80px !important;

  max-width: 80px !important;

  left: 0 !important;

}



body.sidebar-folded .topbar,
body.sidebar-folded main,
body.sidebar-folded .main-container {
  margin-left: 80px !important;
  margin-right: 0 !important;
  width: auto !important;
  max-width: none !important;
  right: 0 !important;
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}



/* Header in Folded Mode: Midnight Navy #081b29, Sun Logo Exactly Centered */

body.sidebar-folded .sidebar-header {

  width: 80px !important;

  min-width: 80px !important;

  max-width: 80px !important;

  height: 54px !important;

  background: #ffffff !important;

  border-bottom: 1px solid #e2e8f0 !important;

  border-right: 1px solid #e2e8f0 !important;

  display: flex !important;

  align-items: center !important;

  justify-content: center !important;

  padding: 0 !important;

  margin: 0 !important;

  cursor: pointer !important;

}



body.sidebar-folded .sidebar-header .logo,

body.sidebar-folded .sidebar-header span.sidebar-toggle-fold {

  display: none !important;

  visibility: hidden !important;

  width: 0 !important;

  height: 0 !important;

}



body.sidebar-folded .sidebar-header .logo-icon {

  width: 44px !important;

  height: 44px !important;

  min-width: 44px !important;

  max-width: 44px !important;

  margin: 0 auto !important;

  display: flex !important;

  align-items: center !important;

  justify-content: center !important;

  cursor: pointer !important;

}



body.sidebar-folded .sidebar-header .logo-icon img {

  width: 28px !important;

  height: 28px !important;

  max-width: 28px !important;

  max-height: 28px !important;

  object-fit: contain !important;

  margin: auto !important;

  display: block !important;

}



/* Hide Categories, Titles, Submenus in Folded Mode */

body.sidebar-folded .menu-category {

  display: none !important;

  visibility: hidden !important;

  height: 0 !important;

  padding: 0 !important;

  margin: 0 !important;

  overflow: hidden !important;

}



body.sidebar-folded .menu-link .title,

body.sidebar-folded .menu-link .arrow,

body.sidebar-folded .menu-submenu {

  display: none !important;

  visibility: hidden !important;

  width: 0 !important;

  height: 0 !important;

  margin: 0 !important;

  padding: 0 !important;

  opacity: 0 !important;

  pointer-events: none !important;

}



/* Icons Centered Horizontally in 80px Column */

body.sidebar-folded .menu-link {

  width: 80px !important;

  min-width: 80px !important;

  max-width: 80px !important;

  height: 48px !important;

  padding: 0 !important;

  margin: 4px 0 !important;

  display: flex !important;

  align-items: center !important;

  justify-content: center !important;

  background: transparent !important;

  border: none !important;

  border-radius: 0 !important;

}



body.sidebar-folded .menu-link .icon {

  width: 44px !important;

  height: 44px !important;

  min-width: 44px !important;

  max-width: 44px !important;

  margin: 0 auto !important;

  display: inline-flex !important;

  align-items: center !important;

  justify-content: center !important;

  text-align: center !important;

  border-radius: 12px !important;

  font-size: 17px !important;

  color: #94a3b8 !important;

  background-color: transparent !important;

  border: 1px solid transparent !important;

  transition: all 0.2s ease !important;

}



body.sidebar-folded .menu-item.active > .menu-link .icon {

  color: #ffb81d !important;

  background-color: rgba(255, 184, 29, 0.15) !important;

  border: 1.5px solid rgba(255, 184, 29, 0.4) !important;

}



body.sidebar-folded .menu-link:hover .icon {

  color: #ffffff !important;

  background-color: rgba(255, 255, 255, 0.08) !important;

}



/* Folded Profile Footer */

body.sidebar-folded .sidebar-profile-card {

  width: 80px !important;

  padding: 8px 0 !important;

  margin: 10px 0 !important;

  display: flex !important;

  justify-content: center !important;

  align-items: center !important;

  border: none !important;

  background: transparent !important;

}



body.sidebar-folded .sidebar-profile-card .sidebar-profile-badge {

  margin: 0 auto !important;

}



body.sidebar-folded .sidebar-profile-card .profile-meta,

body.sidebar-folded .sidebar-profile-card .sidebar-profile-logout {

  display: none !important;

  visibility: hidden !important;

  width: 0 !important;

  height: 0 !important;

}
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE SYSTEM (< 992px)
   Touch-Friendly Navigation Drawer & Edge-to-Edge Fluid Content
   ========================================================================== */
@media (max-width: 991.98px) {
  /* 1. Mobile Native Scale (Fixes squished viewport) */
  html {
    zoom: 100% !important;
    -webkit-text-size-adjust: 100% !important;
    font-size: 100% !important;
  }

  body {
    overflow-x: clip !important;
    overflow-y: visible !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative !important;
  }

  /* 2. Topbar, Main Container & Content take 100% FULL WIDTH */
  .topbar,
  main,
  .main-container,
  .main-content,
  body .topbar,
  body main,
  body .main-container,
  body:not(.sidebar-folded) .topbar,
  body:not(.sidebar-folded) main,
  body:not(.sidebar-folded) .main-container,
  body.sidebar-folded .topbar,
  body.sidebar-folded main,
  body.sidebar-folded .main-container {
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    transition: none !important;
  }

  .main-content {
    padding: 6px 10px 85px !important;
  }

  /* 3. Off-Canvas Sidebar Drawer (Hardware-Accelerated Transform) */
  .sidebar,
  body .sidebar,
  body:not(.sidebar-folded) .sidebar,
  body.sidebar-folded .sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    transform: translate3d(-100%, 0, 0) !important;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 84vw !important;
    height: 100% !important;
    z-index: 1060 !important;
    background-color: #0b1f3a !important;
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.28s ease !important;
    box-shadow: none !important;
    will-change: transform;
    -webkit-overflow-scrolling: touch !important;
  }

  /* 4. Drawer Active State (Smooth slide-in) */
  body.sidebar-open .sidebar,
  body.sidebar-open.sidebar-folded .sidebar,
  body.sidebar-open:not(.sidebar-folded) .sidebar,
  .sidebar.sidebar-open {
    transform: translate3d(0, 0, 0) !important;
    left: 0 !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.6) !important;
    visibility: visible !important;
    display: flex !important;
    z-index: 1060 !important;
  }
  body.sidebar-open {
    overflow: hidden !important;
  }

  /* 5. Backdrop Dimmer Overlay */
  .backdrop-sidebar,
  .app-backdrop {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 1055 !important;
    cursor: pointer !important;
  }

  /* 6. Mobile Drawer Header */
  .sidebar .sidebar-header,
  body .sidebar-header,
  body:not(.sidebar-folded) .sidebar-header,
  body.sidebar-folded .sidebar-header {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 54px !important;
    min-height: 54px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 14px !important;
    box-sizing: border-box !important;
  }

  .sidebar-header .logo,
  body .sidebar-header .logo {
    display: flex !important;
    visibility: visible !important;
    align-items: center !important;
    max-width: 135px !important;
    width: auto !important;
    height: auto !important;
  }

  .sidebar-header .logo img,
  body .sidebar-header .logo img {
    max-height: 26px !important;
    max-width: 130px !important;
    display: block !important;
  }

  .sidebar-header .logo-icon,
  body .sidebar-header .logo-icon {
    display: inline-flex !important;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
  }

  .sidebar-header .sidebar-toggle-fold,
  span.sidebar-toggle-fold {
    display: none !important;
  }

  .mobile-sidebar-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 7. Mobile Menu Links */
  .sidebar .menu-category {
    display: block !important;
    padding: 0.85rem 1.15rem 0.4rem !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: #64748b !important;
  }

  .sidebar .menu-link {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
    padding: 0.65rem 1rem !important;
    margin: 2px 8px !important;
    height: auto !important;
  }

  .sidebar .menu-link .icon {
    width: 24px !important;
    height: 24px !important;
    margin-right: 12px !important;
    margin-left: 0 !important;
  }

  .sidebar .menu-link .title {
    display: inline-block !important;
    visibility: visible !important;
    width: auto !important;
    opacity: 1 !important;
    font-size: 13px !important;
  }

  .sidebar .menu-link .arrow {
    display: inline-block !important;
    visibility: visible !important;
    margin-left: auto !important;
    width: auto !important;
  }

  .sidebar .sidebar-profile-card {
    display: flex !important;
    width: auto !important;
    margin: 10px 12px !important;
    padding: 10px 12px !important;
  }

  .sidebar .sidebar-profile-card .profile-meta,
  .sidebar .sidebar-profile-card .sidebar-profile-logout {
    display: flex !important;
    visibility: visible !important;
    width: auto !important;
    height: auto !important;
  }

  /* 8. Topbar on Mobile */
  .topbar {
    min-height: 54px !important;
    height: 54px !important;
    padding: 0 12px !important;
  }

  .topbar .sidebar-toggler {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer !important;
  }

  .topbar-page-title {
    font-size: 15px !important;
  }

  /* 9. Welcome Card on Mobile */
  .card.card-inverse.bg-img {
    margin-bottom: 12px !important;
    border-radius: 16px !important;
  }

  .card.card-inverse.bg-img .card-body {
    padding: 20px 14px !important;
  }

  .card.card-inverse.bg-img .avatar {
    width: 68px !important;
    height: 68px !important;
  }

  .card.card-inverse.bg-img h4 {
    font-size: 15px !important;
    line-height: 1.3 !important;
    margin-top: 8px !important;
  }

  .card.card-inverse.bg-img span {
    font-size: 11px !important;
  }

  /* 10. Marquee on Mobile */
  marquee.bg-yellow {
    font-size: 11.5px !important;
    padding: 7px 10px !important;
    border-radius: 8px !important;
  }

  /* 11. Tables & Datatables Horizontal Scroll */
  .table-responsive,
  div.dataTables_wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 12. Mobile Floating Bottom Navigation Dock */
  .mobile-bottom-nav {
    display: flex !important;
    height: 60px !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06) !important;
  }

  .mobile-bottom-nav .mobile-nav-item {
    flex: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .mobile-bottom-nav .mobile-nav-item:active {
    transform: scale(0.92) !important;
  }

  @supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-bottom-nav {
      height: calc(60px + env(safe-area-inset-bottom)) !important;
      padding-bottom: env(safe-area-inset-bottom) !important;
    }
  }

  /* 13. Mobile Touch Feedback & Modals */
  * {
    -webkit-tap-highlight-color: transparent;
  }

  .btn:active,
  button:active,
  a:active {
    transition: transform 0.1s ease !important;
  }

  .modal-dialog {
    margin: 16px auto !important;
    width: 94% !important;
    max-width: 94% !important;
  }

  .modal-content {
    border-radius: 20px !important;
    overflow: hidden !important;
  }

  /* 14. DataTables Responsive on Mobile */
  table.dataTable thead th,
  table.dataTable tbody td {
    padding: 10px 12px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  div.dataTables_wrapper div.dataTables_length,
  div.dataTables_wrapper div.dataTables_filter {
    float: none !important;
    text-align: left !important;
    margin-bottom: 8px !important;
  }

  div.dataTables_wrapper div.dataTables_filter input {
    width: 100% !important;
    margin-left: 0 !important;
    margin-top: 4px !important;
  }
}


/* ==========================================================================

   CARDS - Clean White, Rounded 14px, Soft Borders (Matching Image 1)

   ========================================================================== */

.card:not(.card-welcome-hero):not(.card-inverse) {

  background: var(--card-bg) !important;

  border-radius: var(--radius-lg) !important;

  border: none !important;

  box-shadow: var(--shadow-sm) !important;

  margin-bottom: 24px;

}



.card-header {

  background-color: transparent !important;

  border-bottom: 1px solid var(--border-light) !important;

  padding: 20px 24px !important;

}



.card-header .card-title,

.card-title {

  font-weight: 800 !important;

  font-size: 19px !important;

  color: var(--text-dark) !important;

  letter-spacing: -0.02em;

  margin-bottom: 4px;

}



.card-subtitle {

  font-size: 13.5px;

  color: var(--text-secondary);

  margin-bottom: 18px;

  font-weight: 400;

}



.card-body {

  padding: 24px !important;

}



/* Action Toolbar Buttons Matching Active Theme */
.btn-action-primary,
.btn-primary-dark {
  background: var(--t-primary, #2563eb) !important;
  border: 1px solid var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
  border-radius: 9px !important;
  padding: 7px 16px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1), 0 2px 4px var(--t-primary-soft, rgba(37, 99, 235, 0.2)) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  line-height: 1.4 !important;
  cursor: pointer;
  text-decoration: none !important;
}

.btn-action-primary:hover,
.btn-primary-dark:hover,
.btn-action-primary:focus,
.btn-primary-dark:focus {
  background: var(--t-primary-hover, #1d4ed8) !important;
  border-color: var(--t-primary-hover, #1d4ed8) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--t-primary-soft, rgba(37, 99, 235, 0.35)) !important;
}

.show > .btn-action-primary.dropdown-toggle,
.show > .btn-primary-dark.dropdown-toggle,
.btn-action-primary:active,
.btn-primary-dark:active {
  background: var(--t-primary-hover, #1d4ed8) !important;
  border-color: var(--t-primary-hover, #1d4ed8) !important;
  color: #ffffff !important;
}

/* Export Action Button (Theme-tinted Soft Companion to Primary Button) */
.btn-action-export {
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.09)) !important;
  color: var(--t-primary, #2563eb) !important;
  border: 1px solid rgba(37, 99, 235, 0.25) !important;
  border-radius: 9px !important;
  padding: 7px 16px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  line-height: 1.4 !important;
  cursor: pointer;
  text-decoration: none !important;
}

.btn-action-export:hover,
.btn-action-export:focus {
  background: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
  border-color: var(--t-primary, #2563eb) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--t-primary-soft, rgba(37, 99, 235, 0.3)) !important;
}

.show > .btn-action-export.dropdown-toggle,
.btn-action-export:active {
  background: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
  border-color: var(--t-primary, #2563eb) !important;
}

/* Caret styling for both dropdowns */
.btn-action-primary.dropdown-toggle::after,
.btn-primary-dark.dropdown-toggle::after,
.btn-action-export.dropdown-toggle::after {
  margin-left: 6px !important;
  vertical-align: middle !important;
  transition: transform 0.2s ease;
}

.show > .btn-action-primary.dropdown-toggle::after,
.show > .btn-primary-dark.dropdown-toggle::after,
.show > .btn-action-export.dropdown-toggle::after {
  transform: rotate(180deg);
}

/* Header Action Dropdown Menus */
.header-action-dropdown {
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  background-color: #ffffff !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08) !important;
  padding: 6px !important;
  min-width: 175px !important;
  margin-top: 6px !important;
  z-index: 1060 !important;
  animation: dropdownFadeIn 0.15s ease-out;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-action-dropdown .dropdown-item {
  border-radius: 8px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  transition: all 0.15s ease !important;
  cursor: pointer;
}

.header-action-dropdown .dropdown-item:hover,
.header-action-dropdown .dropdown-item:focus {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

.header-action-dropdown .dropdown-item i {
  font-size: 14px !important;
  width: 18px !important;
  text-align: center !important;
}

.header-action-dropdown .dropdown-divider {
  margin: 4px 0 !important;
  border-top: 1px solid #f1f5f9 !important;
}

/* Dark Mode Support for Action Dropdowns */
html[data-mode="dark"] .btn-action-export {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: var(--t-primary, #60a5fa) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}
html[data-mode="dark"] .btn-action-export:hover,
html[data-mode="dark"] .btn-action-export:focus,
html[data-mode="dark"] .show > .btn-action-export.dropdown-toggle {
  background: var(--t-primary, #2563eb) !important;
  border-color: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .header-action-dropdown {
  background: var(--t-surface, #1e293b) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}
html[data-mode="dark"] .header-action-dropdown .dropdown-item {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .header-action-dropdown .dropdown-item:hover,
html[data-mode="dark"] .header-action-dropdown .dropdown-item:focus {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .header-action-dropdown .dropdown-divider {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* Responsive Action Toolbar Rules */
@media (max-width: 767px) {
  .btn-action-export,
  .btn-primary-dark {
    font-size: 12px !important;
    padding: 6px 12px !important;
    gap: 5px !important;
  }
}

@media (max-width: 767px) {
  .card-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .card-header > div:first-child {
    width: 100% !important;
  }
  .card-header-actions,
  .module-header-actions {
    width: 100% !important;
    margin-top: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .card-header-actions .table-view-switcher,
  .module-header-actions .table-view-switcher {
    width: 100% !important;
    display: flex !important;
    margin: 0 !important;
    border-radius: 10px !important;
    padding: 3px !important;
    gap: 4px !important;
    box-sizing: border-box !important;
  }
  .card-header-actions .table-view-switcher .btn-table-mode,
  .module-header-actions .table-view-switcher .btn-table-mode {
    flex: 1 1 0 !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
  }
  .card-header-actions .btn-toolbar-group,
  .module-header-actions .btn-toolbar-group {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
  }
  .card-header-actions .btn-toolbar-group .dropdown,
  .card-header-actions .btn-toolbar-group > a,
  .card-header-actions .btn-toolbar-group > button,
  .module-header-actions .btn-toolbar-group .dropdown,
  .module-header-actions .btn-toolbar-group > a,
  .module-header-actions .btn-toolbar-group > button {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    display: block !important;
  }
  .card-header-actions .btn-toolbar-group .dropdown .btn,
  .card-header-actions .btn-toolbar-group > a.btn,
  .card-header-actions .btn-toolbar-group > button.btn,
  .module-header-actions .btn-toolbar-group .dropdown .btn,
  .module-header-actions .btn-toolbar-group > a.btn,
  .module-header-actions .btn-toolbar-group > button.btn {
    width: 100% !important;
    justify-content: center !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    border-radius: 8px !important;
  }
  .card-header-actions .btn-toolbar-group .dropdown:first-child .header-action-dropdown,
  .module-header-actions .btn-toolbar-group .dropdown:first-child .header-action-dropdown {
    left: 0 !important;
    right: auto !important;
    min-width: 180px !important;
  }
  .card-header-actions .btn-toolbar-group .dropdown:last-child .header-action-dropdown,
  .module-header-actions .btn-toolbar-group .dropdown:last-child .header-action-dropdown {
    left: auto !important;
    right: 0 !important;
    min-width: 180px !important;
  }
}



/* ==========================================================================

   DATATABLES & TABLE SYSTEM (Matching Image 1 Exactly)

   ========================================================================== */

/* Hide DataTables scrollY cloned header completely */

div.dataTables_scrollBody thead tr,

div.dataTables_scrollBody thead th,

div.dataTables_scrollBody thead td {

  height: 0 !important;

  padding: 0 !important;

  margin: 0 !important;

  border: none !important;

  line-height: 0 !important;

  font-size: 0 !important;

  visibility: hidden !important;

}



div.dataTables_scrollBody thead th::before,

div.dataTables_scrollBody thead th::after,

div.dataTables_scrollBody thead td::before,

div.dataTables_scrollBody thead td::after {

  display: none !important;

  content: "" !important;

  opacity: 0 !important;

  visibility: hidden !important;

}



/* Toolbar Controls */

.dataTables_wrapper {

  padding: 0 !important;

}



div.dataTables_wrapper div.dataTables_length {

  margin-bottom: 16px;

}



div.dataTables_wrapper div.dataTables_length label {

  font-size: 13px;

  color: var(--text-secondary);

  font-weight: 500;

  display: inline-flex;

  align-items: center;

  gap: 6px;

}



div.dataTables_wrapper div.dataTables_length select {

  border-radius: var(--radius-sm);

  border: none !important;

  background: #ffffff;

  padding: 6px 12px;

  font-size: 13px;

  font-weight: 600;

  color: var(--text-primary);

  outline: none;

}



div.dataTables_wrapper div.dataTables_filter {

  margin-bottom: 16px;

}



div.dataTables_wrapper div.dataTables_filter label {

  font-size: 13px;

  color: var(--text-secondary);

  font-weight: 500;

  display: inline-flex;

  align-items: center;

  gap: 8px;

}



div.dataTables_wrapper div.dataTables_filter input {

  border-radius: var(--radius-sm);

  border: none !important;

  background: #f8fafc;

  padding: 7px 14px;

  font-size: 13px;

  min-width: 220px;

  color: var(--text-dark);

  transition: all 0.2s ease;

}



div.dataTables_wrapper div.dataTables_filter input:focus {

  background: #ffffff;

  border-color: var(--primary-blue);

  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);

  outline: none;

}



/* Export Buttons (EXCEL, PDF, PRINT Pills) */

.dt-buttons,

.table-export-toolbar {

  display: inline-flex;

  gap: 6px;

  margin-left: 12px;

  vertical-align: middle;

}



.dt-buttons .btn,

.dt-button,

.btn-export-pill {

  border-radius: var(--radius-sm) !important;

  border: none !important;

  background: #ffffff !important;

  color: var(--text-secondary) !important;

  font-size: 11px !important;

  font-weight: 700 !important;

  text-transform: uppercase !important;

  letter-spacing: 0.04em !important;

  padding: 6px 14px !important;

  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;

  transition: all 0.2s ease;

}



.dt-buttons .btn:hover,

.dt-button:hover,

.btn-export-pill:hover {

  background: #f8fafc !important;

  border-color: #cbd5e1 !important;

  color: var(--text-dark) !important;

}



/* Table Header (Clean Light Gray) */

table.dataTable thead th,

.table thead th {

  background-color: #f8fafc !important;

  color: var(--text-secondary) !important;

  font-size: 11px !important;

  font-weight: 700 !important;

  text-transform: uppercase !important;

  letter-spacing: 0.05em !important;

  border-bottom: 1.5px solid var(--border-subtle) !important;

  border-top: none !important;

  padding: 12px 16px !important;

  vertical-align: middle !important;

}



/* Table Rows */

table.dataTable tbody td,

.table tbody td {

  padding: 14px 16px !important;

  border-bottom: 1px solid var(--border-light) !important;

  font-size: 13.5px !important;

  color: var(--text-primary);

  vertical-align: middle !important;

}



html:not([data-mode="dark"]) table.dataTable tbody tr:hover,

html:not([data-mode="dark"]) .table-hover tbody tr:hover {

  background-color: #f8fafc !important;

}



/* Primary Cell Text Hierarchy (Name + Subtext/ID) */

.cell-primary-title {

  font-weight: 700;

  font-size: 13.5px;

  color: var(--text-dark);

  display: block;

}



.cell-subtitle {

  font-size: 11.5px;

  color: var(--text-muted);

  display: block;

  margin-top: 1px;

}



/* Status Badges */

td .btn-success,

.badge-status-active {

  background: #dcfce7 !important;

  color: #15803d !important;

  border: 1px solid #bbf7d0 !important;

  border-radius: 20px !important;

  font-size: 11.5px !important;

  font-weight: 600 !important;

  padding: 4px 12px !important;

  box-shadow: none !important;

  text-decoration: none !important;

  display: inline-block;

}



td .btn-danger,

.badge-status-inactive {

  background: #fee2e2 !important;

  color: #b91c1c !important;

  border: 1px solid #fecaca !important;

  border-radius: 20px !important;

  font-size: 11.5px !important;

  font-weight: 600 !important;

  padding: 4px 12px !important;

  box-shadow: none !important;

  text-decoration: none !important;

  display: inline-block;

}



/* Action Icon Buttons */

td .dropdown a.text-lighter,

.btn-table-action {

  border: none !important;

  border-radius: 6px !important;

  padding: 5px 8px !important;

  background: #ffffff !important;

  color: var(--text-secondary) !important;

  display: inline-flex !important;

  align-items: center !important;

  justify-content: center !important;

  transition: all 0.2s ease !important;

}



html:not([data-mode="dark"]) td .dropdown a.text-lighter:hover,

html:not([data-mode="dark"]) .btn-table-action:hover {

  background: #f8fafc !important;

  border-color: #cbd5e1 !important;

  color: var(--text-dark) !important;

}



/* DataTables Sorting Arrows */

table.dataTable thead > tr > th.sorting,

table.dataTable thead > tr > th.sorting_asc,

table.dataTable thead > tr > th.sorting_desc {

  position: relative;

  vertical-align: middle !important;

  padding-right: 28px !important;

}



table.dataTable thead .sorting::before,

table.dataTable thead .sorting_asc::before,

table.dataTable thead .sorting_desc::before {

  top: 50% !important;

  bottom: auto !important;

  transform: translateY(-50%) !important;

  right: 1.1em !important;

  line-height: 1 !important;

  opacity: 0.35 !important;

}



table.dataTable thead .sorting::after,

table.dataTable thead .sorting_asc::after,

table.dataTable thead .sorting_desc::after {

  top: 50% !important;

  bottom: auto !important;

  transform: translateY(-50%) !important;

  right: 0.5em !important;

  line-height: 1 !important;

  opacity: 0.35 !important;

}



table.dataTable thead .sorting_asc::before,

table.dataTable thead .sorting_desc::after {

  opacity: 1 !important;

  color: var(--text-dark) !important;

}



/* Table Footer & Pagination */

div.dataTables_wrapper div.dataTables_info {

  color: var(--text-secondary) !important;

  font-size: 13px !important;

  font-weight: 500 !important;

  padding-top: 16px !important;

}



div.dataTables_wrapper div.dataTables_paginate {

  padding-top: 12px !important;

}



div.dataTables_wrapper div.dataTables_paginate ul.pagination {

  margin: 0 !important;

  gap: 4px;

}



div.dataTables_wrapper div.dataTables_paginate ul.pagination li.active a,

div.dataTables_wrapper div.dataTables_paginate .paginate_button.current {

  background: var(--primary-navy) !important;

  border-color: var(--primary-navy) !important;

  color: #ffffff !important;

  border-radius: var(--radius-sm) !important;

  font-weight: 700 !important;

  min-width: 32px !important;

  height: 32px !important;

  line-height: 32px !important;

  padding: 0 !important;

  text-align: center !important;

}



div.dataTables_wrapper div.dataTables_paginate ul.pagination li a,

div.dataTables_wrapper div.dataTables_paginate .paginate_button {

  border-radius: var(--radius-sm) !important;

  border: 1px solid transparent !important;

  color: var(--text-secondary) !important;

  font-weight: 600 !important;

  min-width: 32px !important;

  height: 32px !important;

  line-height: 32px !important;

  padding: 0 8px !important;

  text-align: center !important;

  background: transparent !important;

}



div.dataTables_wrapper div.dataTables_paginate ul.pagination li a:hover,

div.dataTables_wrapper div.dataTables_paginate .paginate_button:hover {

  background: #f1f5f9 !important;

  color: var(--text-dark) !important;

}



/* Width synchronization for DataTables scroll */

div.dataTables_scrollHeadInner,

div.dataTables_scrollHeadInner table.dataTable {

  width: 100% !important;

}



div.dataTables_scrollBody table.dataTable {

  width: 100% !important;

  margin-top: 0 !important;

  border-top: none !important;

}



/* ==========================================================================

   DASHBOARD HOME & QUICK ACTION TILES

   ========================================================================== */

.card-welcome-academic {

  background: linear-gradient(135deg, #081b29 0%, #0c192c 60%, #172554 100%) !important;

  border-radius: var(--radius-lg) !important;

  color: #ffffff !important;

  position: relative;

  overflow: hidden;

  border: none !important;

  box-shadow: 0 10px 25px -5px rgba(8, 27, 41, 0.4) !important;

  padding: 32px 24px !important;

  margin-bottom: 24px;

}



.welcome-title {

  color: #ffffff;

  font-weight: 800;

  font-size: 24px;

  margin-top: 14px;

  margin-bottom: 6px;

  letter-spacing: -0.02em;

}



.welcome-badge {

  background: rgba(255, 255, 255, 0.12);

  backdrop-filter: blur(8px);

  border: 1px solid rgba(255, 255, 255, 0.2);

  color: #e2e8f0;

  font-size: 13px;

  font-weight: 600;

  padding: 6px 16px;

  border-radius: 30px;

  display: inline-block;

}



.academic-notice-card {

  background: #ffffff;

  border: 1px solid #fed7aa;

  border-left: 5px solid #f97316;

  border-radius: var(--radius-md);

  padding: 14px 20px;

  display: flex;

  align-items: center;

  box-shadow: var(--shadow-sm);

  margin-bottom: 24px;

}



.academic-notice-badge {

  background: #fff7ed;

  color: #c2410c;

  font-weight: 700;

  font-size: 11px;

  padding: 5px 12px;

  border-radius: 20px;

  text-transform: uppercase;

  letter-spacing: 0.05em;

  display: inline-flex;

  align-items: center;

  margin-right: 16px;

  flex-shrink: 0;

  border: 1px solid #ffedd5;

}



.quick-action-grid {

  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 16px;

  margin-bottom: 24px;

}



.quick-action-card {

  background: #ffffff;

  border: none !important;

  border-radius: var(--radius-md);

  padding: 20px 14px;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  text-decoration: none !important;

  color: var(--text-primary) !important;

  box-shadow: var(--shadow-sm);

  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  min-height: 115px;

}



.quick-action-card:hover {

  transform: translateY(-4px);

  box-shadow: var(--shadow-md);

  border-color: #cbd5e1;

}



.quick-action-icon {

  width: 52px;

  height: 52px;

  border-radius: 14px;

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 22px;

  margin-bottom: 12px;

  color: #ffffff;

}



.icon-blue { background: linear-gradient(135deg, #2563eb, #1d4ed8); }

.icon-indigo { background: linear-gradient(135deg, #4f46e5, #4338ca); }

.icon-emerald { background: linear-gradient(135deg, #059669, #047857); }

.icon-amber { background: linear-gradient(135deg, #d97706, #b45309); }

.icon-rose { background: linear-gradient(135deg, #e11d48, #be123c); }

.icon-purple { background: linear-gradient(135deg, #7c3aed, #6d28d9); }

.icon-sky { background: linear-gradient(135deg, #0284c7, #0369a1); }

.icon-slate { background: linear-gradient(135deg, #475569, #334155); }



.quick-action-title {

  font-size: 13.5px;

  font-weight: 700;

  color: var(--text-secondary);

  text-align: center;

  letter-spacing: -0.01em;

}



/* ==========================================================================

   MOBILE RESPONSIVENESS (Touch-friendly, No Overflow)

   ========================================================================== */

@media (max-width: 768px) {
  /* Fast tap response & no 300ms delay */
  button, a, input, select, textarea, .btn, .card, .mobile-nav-item, .quick-action-card {
    touch-action: manipulation;
  }

  /* Compact Topbar on Smartphone */
  .topbar {
    min-height: 54px !important;
    height: 54px !important;
    padding: 0 12px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03) !important;
  }
  
  .topbar-page-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    max-width: 50vw !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  
  .topbar-badge {
    display: none !important;
  }

  .card-body {
    padding: 14px !important;
  }
  
  /* CRITICAL: Safe-bottom padding so Floating Dock never obscures content */
  .main-content {
    padding: 6px 14px calc(76px + env(safe-area-inset-bottom, 12px)) !important;
  }
  
  /* Modern 4 x 2 Action Grid System (4 columns, 2 rows) */
  .quick-action-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }
  
  .quick-action-card {
    padding: 10px 4px !important;
    min-height: 74px !important;
    border-radius: 14px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    transition: transform 0.12s ease, background-color 0.15s ease !important;
  }

  .quick-action-card:active {
    transform: scale(0.93) !important;
    background-color: #f1f5f9 !important;
  }

  .quick-action-card .w-11 {
    width: 32px !important;
    height: 32px !important;
    margin-bottom: 4px !important;
    border-radius: 9px !important;
  }

  .quick-action-card .w-11 svg,
  .quick-action-card .w-11 i {
    width: 16px !important;
    height: 16px !important;
  }

  .quick-action-card span {
    font-size: 10px !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* Lightweight Card Elevation on Mobile (Zero GPU lag) */
  .card, .shadow-soft, .shadow-floating {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    border: none !important;
  }

  /* DataTables Mobile Polish */
  .dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0;
  }

  .dt-buttons .dt-button,
  .dt-buttons .btn {
    padding: 0.3rem 0.65rem !important;
    font-size: 0.7rem !important;
  }
  
  div.dataTables_wrapper div.dataTables_filter {
    width: 100% !important;
    margin-bottom: 8px !important;
  }

  div.dataTables_wrapper div.dataTables_filter label {
    width: 100% !important;
    margin: 0 !important;
  }

  div.dataTables_wrapper div.dataTables_filter input {
    width: 100% !important;
    min-width: 100% !important;
    margin: 4px 0 !important;
    height: 38px !important;
    border-radius: 10px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
  }
  
  div.dataTables_wrapper div.dataTables_paginate {
    text-align: center !important;
    margin-top: 10px !important;
  }

  div.dataTables_wrapper div.dataTables_paginate .paginate_button {
    padding: 4px 8px !important;
    font-size: 11px !important;
    min-width: 30px !important;
    height: 30px !important;
  }
  
  .table-responsive {
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e8f0;
    margin-bottom: 12px;
  }

  table.dataTable thead th,
  table.dataTable tbody td {
    padding: 8px 10px !important;
    font-size: 11.5px !important;
  }
}



/* ==========================================================================

   COMPACT & ACADEMIC DENSITY SYSTEM (Font & Content Scale Down)

   ========================================================================== */



/* Headings scale down */

h1, .h1 { font-size: 1.35rem !important; }

h2, .h2 { font-size: 1.2rem !important; }

h3, .h3 { font-size: 1.05rem !important; }

h4, .h4 { font-size: 0.95rem !important; }

h5, .h5 { font-size: 0.85rem !important; }

h6, .h6 { font-size: 0.78rem !important; }



/* Topbar Typography */

.topbar-page-title {

  font-size: 15px !important;

  font-weight: 700 !important;

}



.topbar-badge {

  font-size: 10.5px !important;

  padding: 2px 9px !important;

}



/* Sidebar Typography & Compact Items */

.sidebar-navigation .menu-category {

  font-size: 9.5px !important;

  padding: 12px 16px 4px 16px !important;

}



.sidebar-navigation .menu-link {

  font-size: 12.5px !important;

  padding: 8px 12px !important;

  margin: 1px 8px !important;

}



.sidebar-navigation .menu-link .icon {

  font-size: 15px !important;

}



.sidebar-navigation .menu-submenu .menu-link {

  font-size: 11.5px !important;

  padding: 6px 12px !important;

}



/* Content Cards & Padding */

.card-body {

  padding: 18px !important;

}



.card-title {

  font-size: 14px !important;

}



.card-subtitle {

  font-size: 12px !important;

  margin-bottom: 12px !important;

}



/* Welcome Academic Banner */

.card-welcome-academic {

  padding: 20px 20px !important;

  margin-bottom: 18px !important;

}



.welcome-title {

  font-size: 18px !important;

  margin-top: 8px !important;

  margin-bottom: 4px !important;

}



.welcome-badge {

  font-size: 11.5px !important;

  padding: 4px 12px !important;

}



/* Academic Notice Alert */

.academic-notice-card {

  padding: 10px 16px !important;

  margin-bottom: 18px !important;

}



.academic-notice-badge {

  font-size: 10px !important;

  padding: 3px 9px !important;

}



.academic-notice-card .fs-13 {

  font-size: 11.5px !important;

}



/* Quick Action Tiles (Grid) */

.quick-action-grid {

  gap: 12px !important;

  margin-bottom: 18px !important;

}



.quick-action-card {

  padding: 12px 8px !important;

  min-height: 85px !important;

}



.quick-action-icon {

  width: 40px !important;

  height: 40px !important;

  border-radius: 10px !important;

  font-size: 17px !important;

  margin-bottom: 6px !important;

}



.quick-action-title {

  font-size: 11.5px !important;

  font-weight: 600 !important;

}



/* Table Compact Hierarchy */

table.dataTable thead th,

.table thead th {

  font-size: 10px !important;

  padding: 8px 12px !important;

  letter-spacing: 0.04em !important;

}



table.dataTable tbody td,

.table tbody td {

  padding: 9px 12px !important;

  font-size: 12px !important;

}



.cell-primary-title {

  font-size: 12px !important;

}



.cell-subtitle {

  font-size: 10.5px !important;

}



/* Form Controls & Inputs */

.form-control,

input.form-control,

select.form-control,

textarea.form-control {

  font-size: 12px !important;

  padding: 6px 10px !important;

  height: auto !important;

}



div.dataTables_wrapper div.dataTables_length label,

div.dataTables_wrapper div.dataTables_filter label {

  font-size: 11.5px !important;

}



div.dataTables_wrapper div.dataTables_length select {

  font-size: 11.5px !important;

  padding: 4px 8px !important;

}



div.dataTables_wrapper div.dataTables_filter input {

  font-size: 11.5px !important;

  padding: 5px 10px !important;

  min-width: 180px !important;

}



.dt-buttons .btn,

.dt-button,

.btn-export-pill {

  font-size: 10px !important;

  padding: 4px 10px !important;

}



.btn-primary-dark,
.btn-action-export {

  font-size: 11.5px !important;

  padding: 6px 14px !important;

}



.badge-status-active,

.badge-status-inactive,

td .btn-success,

td .btn-danger {

  font-size: 10px !important;

  padding: 2px 8px !important;

}



div.dataTables_wrapper div.dataTables_info,

div.dataTables_wrapper div.dataTables_paginate {

  font-size: 11px !important;

}



div.dataTables_wrapper div.dataTables_paginate .paginate_button {

  padding: 3px 8px !important;

  font-size: 11px !important;

}



/* General Buttons */

.btn {

  font-size: 12px !important;

}



.btn-sm {

  font-size: 10.5px !important;

  padding: 3px 8px !important;

}



/* Discussion Forum Area */

.publisher-input {

  font-size: 12px !important;

}



.media-body p {

  font-size: 12px !important;

}





/* ==========================================================================

   LANGGAM INVEST TAILWIND & COMPONENT STYLING

   ========================================================================== */

.shadow-soft {

  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 20px 25px -5px rgba(0, 0, 0, 0.02) !important;

}



.shadow-floating {

  box-shadow: 0 20px 40px -15px rgba(0, 43, 78, 0.25) !important;

}



::-webkit-scrollbar {

  width: 6px;

  height: 6px;

}

::-webkit-scrollbar-thumb {

  background: #cbd5e1;

  border-radius: 6px;

}

::-webkit-scrollbar-track {

  background: transparent;

}



/* Langgam Invest Sidebar Profile Card */

.sidebar-profile-card {

  padding: 10px 14px !important;

  margin: 12px 14px 16px !important;

  background: rgba(255, 255, 255, 0.05) !important;

  border: 1px solid rgba(255, 255, 255, 0.1) !important;

  border-radius: 16px !important;

  display: flex !important;

  align-items: center !important;

  justify-content: space-between !important;

  transition: all 0.2s ease !important;

}



.sidebar-profile-badge {

  width: 34px !important;

  height: 34px !important;

  min-width: 34px !important;

  border-radius: 50% !important;

  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #081b29 !important;
  font-weight: 800 !important;
  border-radius: 10px !important;

  color: #ffffff !important;

  display: flex !important;

  align-items: center !important;

  justify-content: center !important;

  font-weight: 700 !important;

  font-size: 13px !important;

}



.sidebar-profile-logout {

  color: #94a3b8 !important;

  transition: color 0.2s ease !important;

  padding: 4px !important;

  border-radius: 8px !important;

  display: flex !important;

  align-items: center !important;

}



.sidebar-profile-logout:hover {

  color: #ef4444 !important;

}



.sidebar-folded .sidebar-profile-card {

  padding: 8px 4px !important;

  margin: 10px 4px !important;

  justify-content: center !important;

}



.sidebar-folded .sidebar-profile-card .profile-meta,

.sidebar-folded .sidebar-profile-card .sidebar-profile-logout {

  display: none !important;

}



/* Langgam Invest Active Menu Styling (NO Vertical Indicator Bar) */

.sidebar-navigation .menu-item.active > .menu-link,

.sidebar .menu-item.active > .menu-link {

  background: rgba(255, 184, 29, 0.12) !important;

  border-left: none !important;

  border: none !important;

  border-radius: 12px !important;

  color: #ffb81d !important;

}



.sidebar .menu-link::before,

.sidebar .menu-item::before,

.sidebar .menu-link::after,

.sidebar .menu-item::after {

  display: none !important;

  content: none !important;

  border: none !important;

}



.sidebar-navigation .menu-item.active > .menu-link .icon,

.sidebar-navigation .menu-item.active > .menu-link i,

.sidebar-navigation .menu-item.active > .menu-link svg {

  color: #ffb81d !important;

}



body.sidebar-folded .sidebar-navigation .menu-item.active > .menu-link {

  background: transparent !important;

  border: none !important;

  border-left: none !important;

}



/* DataTables styling matching Langgam Invest template */

.dataTables_wrapper {

  width: 100%;

  font-family: 'Plus Jakarta Sans', sans-serif;

  color: #475569;

}

.dataTables_wrapper .dataTables_length,

.dataTables_wrapper .dataTables_filter,

.dataTables_wrapper .dataTables_info,

.dataTables_wrapper .dataTables_paginate {

  float: none;

  text-align: inherit;

  color: #64748b;

}

.dataTables_wrapper .dataTables_length select {

  border: 1px solid #e2e8f0 !important;

  border-radius: 0.5rem !important;

  padding: 0.3rem 1.5rem 0.3rem 0.75rem !important;

  outline: none !important;

  background-color: #f8fafc !important;

  color: #0f172a !important;

  font-weight: 600 !important;

  font-size: 0.8rem !important;

  margin: 0 0.5rem !important;

}

.dataTables_wrapper .dataTables_filter input {

  border: 1px solid #e2e8f0 !important;

  border-radius: 0.5rem !important;

  padding: 0.35rem 0.85rem !important;

  outline: none !important;

  background-color: #f8fafc !important;

  color: #0f172a !important;

  font-weight: 600 !important;

  font-size: 0.8rem !important;

  margin-left: 0.5rem !important;

  transition: all 0.2s !important;

}

.dataTables_wrapper .dataTables_paginate .paginate_button {

  padding: 0.3rem 0.75rem !important;

  margin-left: 0.25rem !important;

  border-radius: 0.5rem !important;

  border: 1px solid transparent !important;

  background: transparent !important;

  color: #64748b !important;

  font-weight: 600 !important;

  cursor: pointer !important;

  transition: all 0.2s !important;

}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {

  background: #f1f5f9 !important;

  color: #002b4e !important;

}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,

.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {

  background: #002b4e !important;

  color: #fff !important;

  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;

}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {

  opacity: 0.4 !important;

  cursor: not-allowed !important;

}

table.dataTable {

  border-collapse: collapse !important;

  margin: 0 !important;

  width: 100% !important;

}

table.dataTable thead th {

  border-bottom: 1px solid #e2e8f0 !important;

  color: #64748b !important;

  font-weight: 700 !important;

  padding: 0.75rem 1.25rem !important;

  text-transform: uppercase !important;

  font-size: 11px !important;

  letter-spacing: 0.05em !important;

  background: #f8fafc !important;

  vertical-align: middle !important;

}

table.dataTable.no-footer {

  border-bottom: 1px solid #e2e8f0 !important;

}

table.dataTable tbody td {

  padding: 0.75rem 1.25rem !important;

  border-bottom: 1px solid #f1f5f9 !important;

  vertical-align: middle !important;

}

.dataTables_scrollHeadInner {

  width: 100% !important;

}

.dataTables_scrollHeadInner table {

  width: 100% !important;

}

select.dt-column-filter {

  cursor: pointer;

}

select.dt-column-filter:hover {

  border-color: #ffb81d !important;

}

.dt-buttons {

  display: flex !important;

  gap: 0.5rem !important;

  flex-wrap: wrap !important;

  margin-left: 1rem !important;

}

.dt-buttons .dt-button,

.dt-buttons .btn {

  background: #f8fafc !important;

  border: 1px solid #e2e8f0 !important;

  border-radius: 0.5rem !important;

  color: #475569 !important;

  font-weight: 700 !important;

  font-size: 0.75rem !important;

  text-transform: uppercase !important;

  letter-spacing: 0.05em !important;

  padding: 0.35rem 0.85rem !important;

  transition: all 0.2s !important;

}

.dt-buttons .dt-button:hover,

.dt-buttons .btn:hover {

  background: #002b4e !important;

  color: #fff !important;

  border-color: #002b4e !important;

}





.card.bg-img,

.card.card-inverse.bg-img {

  background-color: transparent !important;

  background-size: cover !important;

  background-position: center center !important;

  overflow: hidden !important;

  border-radius: 14px !important;

}



/* ==========================================================================
   GLOBAL AJAX PROGRESS BAR & SKELETON PERFORMANCE SYSTEM
   ========================================================================== */
#ajax-progress-bar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, #ffb81d, #f59e0b, #10b981) !important;
  z-index: 99999 !important;
  transition: width 0.25s ease, opacity 0.3s ease !important;
  pointer-events: none !important;
  box-shadow: 0 0 10px rgba(255, 184, 29, 0.8) !important;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-shimmer {
  background: linear-gradient(90deg, rgba(241,245,249,0.8) 25%, rgba(226,232,240,0.6) 50%, rgba(241,245,249,0.8) 75%) !important;
  background-size: 200% 100% !important;
  animation: shimmer 1.5s infinite !important;
}


/* Welcome Card Hero Banner (Royal Sapphire & Aurora - Eye-Catching & Prestigious) */
.card-welcome-hero,
.card.card-inverse.bg-img,
.card.card-inverse {
  background: linear-gradient(135deg, #020c1e 0%, #061e3d 40%, #0a305e 75%, #031229 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 14px 35px -8px rgba(2, 13, 34, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

.card-welcome-hero h1,
.card-welcome-hero h2,
.card-welcome-hero h3,
.card-welcome-hero h4,
.card-welcome-hero p {
  color: #ffffff !important;
}

/* Allow gradient text, gold accents, badges, and icons to shine vibrantly! */
.card-welcome-hero .text-amber-200,
.card-welcome-hero .text-amber-300,
.card-welcome-hero .text-amber-400 {
  color: #fbbf24 !important;
}

.card-welcome-hero .text-sky-200,
.card-welcome-hero .text-sky-300 {
  color: #7dd3fc !important;
}

.card-welcome-hero .bg-clip-text {
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}


/* ==========================================================================
   CLEAN BORDERLESS DESIGN SYSTEM - Smooth elevated cards, 0px border
   ========================================================================== */
.card,
.quick-action-card,
.shadow-soft,
.shadow-floating,
.card-welcome-hero,
.broadcast-marquee-card {
  border: none !important;
  outline: none !important;
}

.quick-action-card {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.035), 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  border: none !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}

.quick-action-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07) !important;
  transform: translateY(-2px) !important;
}

.quick-action-card:active {
  transform: scale(0.96) !important;
}

.card:not(.card-welcome-hero) {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03) !important;
  border: none !important;
}


/* Pull Main Content Closer to Topbar */
.main-content {
  padding-top: 10px !important;
}


/* ==========================================================================
   MODERN ACADEMIC DISCUSSION FEED SYSTEM (custom.css?v=39.4)
   Semi-Glassy Frosted Design for Forum Container & Discussion Composer Form
   ========================================================================== */

.diskusi-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.diskusi-composer-card,
.diskusi-post-card,
.diskusi-feed-container {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* 1. Forum Diskusi Outer Container Card (Light Mode Glassy) */
html:not([data-mode="dark"]) .diskusi-section-card,
html:not([data-mode="dark"]) #forum-diskusi,
html:not([data-mode="dark"]) div.diskusi-section-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(246, 250, 255, 0.70) 55%, rgba(255, 251, 242, 0.72) 100%) !important;
  background-color: rgba(255, 255, 255, 0.75) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 8px 32px -4px rgba(28, 81, 157, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* 2. Modern Discussion Composer Form Card ("Mulai Diskusi Baru") */
html:not([data-mode="dark"]) .diskusi-composer-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(248, 250, 252, 0.55) 100%) !important;
  background-color: rgba(255, 255, 255, 0.60) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(226, 232, 240, 0.80) !important;
  box-shadow: 0 4px 16px -2px rgba(28, 81, 157, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

/* Composer Header Badge */
html:not([data-mode="dark"]) .diskusi-composer-card span.bg-white,
html:not([data-mode="dark"]) .diskusi-composer-card .border-slate-200\/80 {
  background: rgba(255, 255, 255, 0.75) !important;
  /* backdrop-filter optimized */
  border-color: rgba(226, 232, 240, 0.85) !important;
}

/* 3. Textarea Form inside Composer */
html:not([data-mode="dark"]) .diskusi-composer-textarea,
html:not([data-mode="dark"]) textarea.diskusi-composer-textarea {
  background: rgba(255, 255, 255, 0.75) !important;
  background-color: rgba(255, 255, 255, 0.75) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(203, 213, 225, 0.85) !important;
  transition: all 0.2s ease !important;
}

html:not([data-mode="dark"]) .diskusi-composer-textarea:focus,
html:not([data-mode="dark"]) textarea.diskusi-composer-textarea:focus {
  background: rgba(255, 255, 255, 0.95) !important;
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* 4. Glassy Discussion Post Cards */
html:not([data-mode="dark"]) .diskusi-post-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.80) 0%, rgba(248, 250, 255, 0.72) 100%) !important;
  background-color: rgba(255, 255, 255, 0.75) !important;
  /* backdrop-filter optimized */
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 4px 18px -2px rgba(28, 81, 157, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

html:not([data-mode="dark"]) .diskusi-post-card:hover {
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: 0 8px 24px -4px rgba(28, 81, 157, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.02) !important;
}

/* Threaded comments & reply capsule inside post */
html:not([data-mode="dark"]) .diskusi-comments-wrapper div[id^="comment-item-"] {
  background: rgba(248, 250, 252, 0.65) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(226, 232, 240, 0.60) !important;
}

html:not([data-mode="dark"]) .diskusi-reply-capsule {
  background: rgba(255, 255, 255, 0.75) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(203, 213, 225, 0.80) !important;
}

/* Post Images: Tampil Apa Adanya (Natural Aspect Ratio, Zero Cropping, Full Original View) */
.diskusi-post-body img,
.diskusi-feed-container img.diskusi-post-img,
.diskusi-comment-body img,
.card-body .lead img {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  display: block !important;
  border-radius: 12px !important;
  margin: 12px 0 8px !important;
  cursor: pointer !important;
}

@media (max-width: 640px) {
  .diskusi-post-body img,
  .diskusi-feed-container img.diskusi-post-img,
  .diskusi-comment-body img,
  .card-body .lead img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    border-radius: 10px !important;
    margin: 10px 0 6px !important;
  }
}

.diskusi-post-body img:hover {
  filter: brightness(1.02) !important;
  transform: scale(1.004) !important;
}

/* Action Buttons (Likes, Comments, Share) */
.btn-action-diskusi {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  border-radius: 9999px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-decoration: none !important;
  cursor: pointer !important;
  border: none !important;
  outline: none !important;
  user-select: none !important;
}

.btn-action-diskusi:hover {
  transform: translateY(-1px) !important;
}

.btn-action-diskusi:active {
  transform: scale(0.95) !important;
}

/* Like Heart Pulse Animation */
@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.sukai.liked i,
.sukai .text-info,
.sukai .text-rose-600 {
  animation: heartPulse 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* Modern Reply Capsule Input */
.diskusi-reply-capsule {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 9999px !important;
  padding: 4px 6px 4px 14px !important;
  transition: all 0.2s ease !important;
}

.diskusi-reply-capsule:focus-within {
  background: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.diskusi-reply-capsule input {
  flex: 1 !important;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  font-size: 12px !important;
  color: #0f172a !important;
  padding: 4px 0 !important;
}

.diskusi-reply-capsule button {
  width: 28px !important;
  height: 28px !important;
  border-radius: 9999px !important;
  background: #0c192c !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
}

.diskusi-reply-capsule button:hover {
  background: #2563eb !important;
  transform: scale(1.05) !important;
}

.diskusi-reply-capsule button:active {
  transform: scale(0.92) !important;
}


/* ==========================================================================
   ULTRA-RESPONSIVE MOBILE DATATABLES SYSTEM (custom.css?v=4.5)
   Clean, finger-friendly, smooth horizontal swipe, perfectly aligned controls
   ========================================================================== */

/* 1. Global Table Scroll Container with Lea Verou Scroll Shadows */
.table-responsive {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border-radius: 0 !important;
  border: 1px solid #f1f5f9;
  margin-bottom: 14px !important;
  background-color: #ffffff;
  position: relative !important;
}
html[data-mode="dark"] .table-responsive,
html[data-mode="dark"] .card-body.table-responsive,
html[data-mode="dark"] .module-data-card .card-body {
  background-color: transparent !important;
  background-image: none !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
}

/* Ensure wrapper does not create conflicting double scrollbar */
div.dataTables_wrapper {
  overflow-x: visible !important;
  width: 100% !important;
  position: relative !important;
}

/* 2. Desktop Controls (>= 768px) */
@media (min-width: 768px) {
  div.dataTables_wrapper div.dataTables_length {
    float: left !important;
    margin-bottom: 14px !important;
  }
  div.dataTables_wrapper div.dataTables_filter {
    float: right !important;
    text-align: right !important;
    margin-bottom: 14px !important;
  }
  div.dataTables_wrapper div.dataTables_filter input {
    width: 220px !important;
    margin-left: 8px !important;
  }
  div.dataTables_wrapper div.dataTables_info {
    float: left !important;
    margin-top: 10px !important;
  }
  div.dataTables_wrapper div.dataTables_paginate {
    float: right !important;
    margin-top: 10px !important;
  }
}

/* 3. Mobile Responsive Controls (< 768px) */
@media (max-width: 767px) {
  /* Optimize Card Padding on Phones */
  .card .card-body {
    padding: 12px 14px !important;
  }
  .card .card-title,
  .card > .card-title {
    padding: 14px 14px 4px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 8px !important;
  }

  /* Toolbar: Full-width Ergonomic Stacked Mobile Layout */
  div.dataTables_wrapper > .row:first-child,
  div.dataTables_wrapper .row:first-child {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  div.dataTables_wrapper > .row:first-child > [class*="col-"],
  div.dataTables_wrapper .row:first-child > [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
    float: none !important;
  }

  div.dataTables_wrapper div.dataTables_filter {
    float: none !important;
    text-align: left !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    display: block !important;
  }

  div.dataTables_wrapper div.dataTables_filter label {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    width: 100% !important;
    position: relative !important;
    font-size: 0 !important;
    color: transparent !important;
  }

  div.dataTables_wrapper div.dataTables_filter input {
    height: 36px !important;
    border-radius: 8px !important;
    border: 1.5px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #1e293b !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    box-sizing: border-box !important;
  }

  div.dataTables_wrapper div.dataTables_filter label::before,
  div.dataTables_wrapper .dataTables_filter label::before,
  .dataTables_wrapper .dataTables_filter label::before,
  .dataTables_filter label::before,
  .dataTables_filter::before {
    display: none !important;
    content: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
  }

  div.dataTables_wrapper div.dataTables_length {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
  }

  div.dataTables_wrapper div.dataTables_length label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    font-size: 12px !important;
    color: #64748b !important;
    font-weight: 500 !important;
  }

  div.dataTables_wrapper div.dataTables_length select {
    height: 30px !important;
    padding: 2px 8px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    background-color: #f8fafc !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    margin: 0 !important;
  }

  div.dataTables_wrapper div.dataTables_filter input:focus {
    border-color: #2563eb !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
  }

  /* Table: Enforce minimum width so columns NEVER cram or clip in standard table view */
  .table-responsive:not(.mode-card-view) table.dataTable,
  .table-responsive.mode-table-view table.dataTable {
    min-width: 480px !important;
    width: 100% !important;
  }
  .table-responsive.mode-card-view table.dataTable {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .table-responsive:not(.mode-card-view) table.dataTable thead th,
  .table-responsive:not(.mode-card-view) table.dataTable tbody td,
  .table-responsive.mode-table-view table.dataTable thead th,
  .table-responsive.mode-table-view table.dataTable tbody td {
    padding: 10px 12px !important;
    font-size: 11.5px !important;
    white-space: nowrap !important;
  }

  /* Make the 3-dots action dropdown comfortably accessible in standard table view */
  .table-responsive:not(.mode-card-view) table.dataTable thead th:last-child,
  .table-responsive:not(.mode-card-view) table.dataTable tbody td:last-child,
  .table-responsive.mode-table-view table.dataTable thead th:last-child,
  .table-responsive.mode-table-view table.dataTable tbody td:last-child {
    text-align: center !important;
    min-width: 52px !important;
    padding-right: 14px !important;
  }

  /* Bottom Pagination & Info */
  div.dataTables_wrapper div.dataTables_info {
    text-align: center !important;
    float: none !important;
    font-size: 11.5px !important;
    color: #94a3b8 !important;
    margin: 8px 0 4px !important;
  }

  div.dataTables_wrapper div.dataTables_paginate {
    text-align: center !important;
    float: none !important;
    margin-top: 6px !important;
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
  }

  div.dataTables_wrapper div.dataTables_paginate .paginate_button {
    padding: 5px 10px !important;
    border-radius: 8px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    min-width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* 4. Action Dropdown Button (3-dots) Styling across all tables */
table.dataTable td .dropdown a.text-lighter,
table.dataTable td .dropdown > a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
  transition: all 0.15s ease !important;
}

table.dataTable td .dropdown a.text-lighter:hover,
table.dataTable td .dropdown > a:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

/* 5. Floating Action Button (FAB) Completely Suppressed */
.fab,
.fab-fixed,
.fab.fab-fixed,
.btn-float,
.btn-float-container,
.fab-buttons {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  z-index: -9999 !important;
}


/* ==========================================================================
   CLEAN & MINIMALIST SIDEBAR UPGRADE
   - Unified Midnight Navy Header (#081b29)
   - Zero dashed lines on categories
   - Floating unboxed icons with modern pill active state
   - Clean profile metadata vertical stacking
   - Warm golden amber profile badge
   ========================================================================== */
.sidebar,
.sidebar-navigation,
body .sidebar {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

.sidebar-header,
.sidebar .sidebar-header,
body:not(.sidebar-folded) .sidebar-header,
body.sidebar-folded .sidebar-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

/* Hide ugly dotted / dashed category lines completely */
.menu-category::after,
.sidebar .menu-category::after,
.menu-category::before,
.sidebar .menu-category::before {
  display: none !important;
  content: none !important;
  border: none !important;
  height: 0 !important;
  width: 0 !important;
}

.menu-category,
.sidebar .menu-category {
  color: #64748b !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  padding: 16px 20px 6px !important;
  margin: 0 !important;
  position: relative !important;
}

/* Floating clean icons (unboxed) with modern active pill states */
.sidebar:not(.sidebar-folded) .menu-link {
  border-radius: 12px !important;
  margin: 2px 10px !important;
  padding: 8px 14px !important;
  color: #94a3b8 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sidebar:not(.sidebar-folded) .menu-link:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
}

.sidebar:not(.sidebar-folded) .menu-item.active > .menu-link,
.sidebar:not(.sidebar-folded) .menu-item.open > .menu-link {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(59, 130, 246, 0.12) 100%) !important;
  color: #1c519d !important;
  font-weight: 600 !important;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.25) !important;
}

.sidebar .menu-link .icon {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  color: inherit !important;
}

/* Clean stacked profile card meta */
.sidebar .sidebar-profile-card .profile-meta,
.sidebar-profile-card .profile-meta {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 2px !important;
  overflow: hidden !important;
}

.sidebar-profile-card {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 14px !important;
}

.sidebar-profile-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #081b29 !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
}


/* ==========================================================================
   GLASSMORPHISM HERO BANNER (Fuse Style)
   - Cosmic Midnight Base Canvas
   - Organic Multi-Color Blurred Neon Blobs (Cyan, Magenta, Amber)
   - Frosted Glass Sheen with Specular Highlights
   - Desktop 2-Column Showcase & Centered Mobile Layout
   ========================================================================== */
.card-welcome-hero,
.card.card-welcome-hero {
  background: radial-gradient(circle at 12% 18%, rgba(2, 132, 199, 0.28) 0%, transparent 48%), radial-gradient(circle at 88% 85%, rgba(245, 158, 11, 0.18) 0%, transparent 48%), linear-gradient(135deg, #081b29 0%, #0a2744 45%, #0c3359 80%, #081b29 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 28px -6px rgba(8, 27, 41, 0.35) !important;
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate !important;
}

@media (min-width: 640px) {
  .card-welcome-hero,
  .card.card-welcome-hero {
    border-radius: 16px !important;
  }
}

.card-welcome-hero .bg-clip-text {
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}


/* ==========================================================================
   MODERN RESPONSIVE WIZARD & FORM STEPPER SYSTEM
   - Prevents step wrapping on all screens (iPhone 393px, Pixel 7, tablets, etc.)
   - Precision horizontal progress connector aligned through circle centers
   - Refined Academic Modern step states: Active, Completed, Inactive
   - Responsive form alignment, consistent input heights, and touch-friendly buttons
   ========================================================================== */

/* 1. Stepper Container & Layout */
div[data-provide="wizard"] {
  position: relative;
  width: 100%;
}

.nav-process,
ul.nav-process,
.nav-process-circle,
ul.nav.nav-process.nav-process-circle {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important; /* CRITICAL: Never wrap into multiple lines */
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  margin: 0 0 24px 0 !important;
  padding: 8px 0 20px 0 !important;
  list-style: none !important;
  position: relative !important;
  border-bottom: 1px solid #f1f5f9 !important;
  overflow: visible !important;
}

/* 2. Individual Step Item */
.nav-process-circle .nav-item,
.nav-process .nav-item {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: 1 1 0% !important;
  min-width: 0 !important; /* Allows flex shrinking without overflowing */
  padding: 0 2px !important;
  text-align: center !important;
  cursor: pointer !important;
}

/* 3. Step Title (Above Circle) */
.nav-process .nav-title,
.nav-process-circle .nav-title {
  display: block !important;
  width: 100% !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  margin-bottom: 8px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: center !important;
  letter-spacing: -0.01em !important;
  line-height: 1.25 !important;
  transition: color 0.2s ease, font-weight 0.2s ease !important;
}

/* 4. Step Circle Base */
.nav-process-circle .nav-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  max-height: 28px !important;
  border-radius: 50% !important;
  background-color: #ffffff !important;
  border: 2px solid #cbd5e1 !important;
  margin: 0 auto !important;
  position: relative !important;
  z-index: 2 !important;
  padding: 0 !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
  cursor: pointer !important;
}

/* 5. Precision Horizontal Connector Line */
.nav-process-circle .nav-link::before {
  display: none !important;
}

.nav-process-circle .nav-item::before {
  content: '' !important;
  position: absolute !important;
  left: calc(-50% + 14px) !important;
  right: calc(50% + 14px) !important;
  top: 36px !important;
  height: 2.5px !important;
  background-color: #e2e8f0 !important;
  z-index: 1 !important;
  cursor: default !important;
  transition: background-color 0.3s ease !important;
}

.nav-process-circle .nav-item:first-child::before {
  display: none !important;
}

.nav-process-circle .nav-item.complete::before,
.nav-process-circle .nav-item.processing::before {
  background-color: #2563eb !important;
}

/* 6. Step States & Indicators */
/* --- ACTIVE STEP (.processing) --- */
.nav-process-circle .nav-item.processing .nav-title {
  color: #2563eb !important;
  font-weight: 700 !important;
}

.nav-process-circle .nav-item.processing .nav-link {
  background-color: #eff6ff !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.16) !important;
}

.nav-process-circle .nav-item.processing .nav-link::after {
  content: '' !important;
  display: block !important;
  width: 9px !important;
  height: 9px !important;
  border-radius: 50% !important;
  background-color: #2563eb !important;
  margin: 0 auto !important;
  position: static !important;
  transform: none !important;
}

/* --- COMPLETED STEP (.complete) --- */
.nav-process-circle .nav-item.complete .nav-title {
  color: #0f172a !important;
  font-weight: 600 !important;
}

.nav-process-circle .nav-item.complete .nav-link {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25) !important;
}

.nav-process-circle .nav-item.complete .nav-link::after {
  content: "\e64c" !important;
  font-family: 'themify' !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  margin: 0 !important;
  position: static !important;
  transform: none !important;
}

/* --- INACTIVE / UPCOMING STEP --- */
.nav-process-circle .nav-item:not(.complete):not(.processing) .nav-link::after {
  content: '' !important;
  display: block !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background-color: #cbd5e1 !important;
  margin: 0 auto !important;
  position: static !important;
  transform: none !important;
}

.nav-process-circle .nav-item:not(.complete):not(.processing):hover .nav-title {
  color: #334155 !important;
}

.nav-process-circle .nav-item:not(.complete):not(.processing):hover .nav-link {
  border-color: #94a3b8 !important;
}

/* 7. Wizard Content & Form Polishing */
.card-body div[data-provide="wizard"] .tab-content {
  padding-top: 6px !important;
}

.card-body .form-group.row {
  margin-bottom: 16px !important;
  align-items: center !important;
}

.card-body .col-form-label {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

.card-body .col-form-label.require::after,
.card-body label.require::after {
  content: ' *' !important;
  color: #ef4444 !important;
  font-weight: 700 !important;
}

/* Form Input & Select Controls */
.card-body .form-control:not(textarea):not(.bootstrap-select),
.card-body input.form-control,
.card-body select.form-control {
  height: 38px !important;
  line-height: 1.4 !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.card-body textarea.form-control,
textarea.form-control:not(.diskusi-composer-textarea) {
  height: auto !important;
  min-height: 88px !important;
  line-height: 1.55 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
  resize: vertical !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.card-body .form-control:focus,
.card-body input.form-control:focus,
.card-body select.form-control:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
  outline: none !important;
}

.card-body .form-control[readonly],
.card-body input.form-control[readonly] {
  background-color: #f8fafc !important;
  color: #475569 !important;
  cursor: default !important;
}

/* Bootstrap Selectpicker Wrapper Reset (Eliminates double border & offset nested box) */
.card-body .bootstrap-select,
.card-body .bootstrap-select.form-control,
.bootstrap-select.form-control,
.bootstrap-select {
  border: none !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  height: auto !important;
  min-height: 0 !important;
  width: 100% !important;
}

/* Bootstrap Selectpicker Toggle Button */
.card-body .bootstrap-select > .dropdown-toggle,
.bootstrap-select > .dropdown-toggle {
  width: 100% !important;
  height: 38px !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  padding: 6px 12px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
  outline: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.card-body .bootstrap-select > .dropdown-toggle:focus,
.card-body .bootstrap-select.show > .dropdown-toggle,
.bootstrap-select > .dropdown-toggle:focus,
.bootstrap-select.show > .dropdown-toggle {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
  background-color: #ffffff !important;
}

.card-body .bootstrap-select > .dropdown-toggle .filter-option,
.bootstrap-select > .dropdown-toggle .filter-option {
  flex: 1 1 auto !important;
  text-align: left !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  padding-right: 8px !important;
}

.card-body .bootstrap-select > .dropdown-toggle .bs-caret,
.card-body .bootstrap-select > .dropdown-toggle .caret,
.bootstrap-select > .dropdown-toggle .bs-caret,
.bootstrap-select > .dropdown-toggle .caret {
  flex: 0 0 auto !important;
  margin-left: auto !important;
  color: #64748b !important;
}

/* Bootstrap Select Dropdown Menu */
.bootstrap-select .dropdown-menu {
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.1) !important;
  padding: 6px !important;
  font-size: 12.5px !important;
}

.bootstrap-select .dropdown-menu .bs-searchbox {
  padding: 6px !important;
}

.bootstrap-select .dropdown-menu .bs-searchbox .form-control {
  height: 34px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  border: 1px solid #cbd5e1 !important;
  padding: 4px 10px !important;
}

.bootstrap-select .dropdown-menu .actions-btn {
  font-size: 11px !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
}

.bootstrap-select .dropdown-menu li a {
  border-radius: 6px !important;
  padding: 6px 10px !important;
  font-size: 12.5px !important;
  color: #1e293b !important;
}

.bootstrap-select .dropdown-menu li a:hover,
.bootstrap-select .dropdown-menu li.active a,
.bootstrap-select .dropdown-menu li.selected a {
  background-color: #f1f5f9 !important;
  color: #2563eb !important;
}

/* Dark Mode Support for Bootstrap Select */
html[data-mode="dark"] .card-body .bootstrap-select > .dropdown-toggle,
html[data-mode="dark"] .bootstrap-select > .dropdown-toggle {
  background-color: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #f1f5f9 !important;
}

html[data-mode="dark"] .card-body .bootstrap-select > .dropdown-toggle .filter-option,
html[data-mode="dark"] .bootstrap-select > .dropdown-toggle .filter-option {
  color: #f1f5f9 !important;
}

html[data-mode="dark"] .bootstrap-select .dropdown-menu {
  background-color: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-mode="dark"] .bootstrap-select .dropdown-menu li a {
  color: #e2e8f0 !important;
}

html[data-mode="dark"] .bootstrap-select .dropdown-menu li a:hover,
html[data-mode="dark"] .bootstrap-select .dropdown-menu li.active a {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #60a5fa !important;
}

/* 8. Wizard Navigation Bottom Buttons */
.card-body .flexbox {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-top: 20px !important;
  padding-top: 14px !important;
}

.card-body [data-wizard="prev"],
.card-body [data-wizard="next"],
.card-body [data-wizard="finish"] {
  min-height: 38px !important;
  padding: 7px 22px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
}

.card-body [data-wizard="prev"] {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
}

.card-body [data-wizard="prev"]:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

.card-body [data-wizard="next"] {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25) !important;
}

.card-body [data-wizard="next"]:hover {
  background-color: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
}

.card-body [data-wizard="finish"] {
  background-color: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25) !important;
}

.card-body [data-wizard="finish"]:hover {
  background-color: #047857 !important;
  border-color: #047857 !important;
}

/* 9. Mobile Responsive Specifics (< 768px) */
@media (max-width: 767px) {
  .nav-process,
  ul.nav-process,
  .nav-process-circle,
  ul.nav.nav-process.nav-process-circle {
    padding: 4px 0 14px 0 !important;
    margin-bottom: 18px !important;
  }

  .nav-process .nav-title,
  .nav-process-circle .nav-title {
    font-size: 10px !important;
    margin-bottom: 5px !important;
    letter-spacing: -0.02em !important;
  }

  .nav-process-circle .nav-link {
    width: 24px !important;
    height: 24px !important;
    max-height: 24px !important;
  }

  .nav-process-circle .nav-item::before {
    top: 29px !important;
    left: calc(-50% + 12px) !important;
    right: calc(50% + 12px) !important;
    height: 2px !important;
  }

  .nav-process-circle .nav-item.processing .nav-link::after {
    width: 7px !important;
    height: 7px !important;
  }

  .nav-process-circle .nav-item.complete .nav-link::after {
    font-size: 10px !important;
  }

  .nav-process-circle .nav-item:not(.complete):not(.processing) .nav-link::after {
    width: 5px !important;
    height: 5px !important;
  }

  .card-body .form-group.row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    margin-bottom: 13px !important;
  }

  .card-body .col-form-label {
    width: 100% !important;
    max-width: 100% !important;
    padding-bottom: 4px !important;
    padding-top: 0 !important;
    font-size: 12px !important;
  }

  .card-body [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Keep toggle switch rows inline (label left, switch right) on mobile */
  .card-body .form-group.row.form-group-switch {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 0 !important;
    margin-bottom: 4px !important;
    border-bottom: 1px solid #f1f5f9 !important;
  }
  .card-body .form-group.row.form-group-switch .col-form-label {
    width: auto !important;
    max-width: 75% !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 12.5px !important;
  }
  .card-body .form-group.row.form-group-switch [class*="col-"]:not(.col-form-label) {
    width: auto !important;
    max-width: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }
  .card-body .form-group.row.form-group-switch .switch {
    margin-bottom: 0 !important;
  }

  .card-body .form-control.w-100px,
  .card-body input.w-100px {
    width: 100% !important;
    max-width: 100% !important;
  }
}


/* ==========================================================================
   TIGHT HERO & HEADER INTEGRATION
   Eliminate empty white gap between Topbar (Header) and Main / Hero Banner
   ========================================================================== */
.topbar,
body .topbar,
header.topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 990 !important;
}

body > .topbar + main,
body > .topbar ~ main,
body main,
main {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.main-content {
  padding-top: 12px !important;
}

@media (min-width: 640px) {
  .main-content {
    padding-top: 16px !important;
  }
}

@media (min-width: 992px) {
  .main-content {
    padding-top: 20px !important;
  }
}

.card-welcome-hero {
  margin-top: 16px !important;
}
@media (max-width: 767px) {
  .card-welcome-hero {
    margin-top: 12px !important;
  }
}


/* ==========================================================================
   ULTRA-CLEAN & MINIMALIST SAAS SIDEBAR (custom.css?v=5.3)
   - Unified Midnight Navy Canvas (#081b29)
   - Zero dashed lines or divider artifacts
   - Floating unboxed icons with smooth pill hover & active indicators
   - Modern indented submenus (replaces muddy #455160 with sleek glass inset)
   - Refined micro-typography for categories and items
   - Stacked profile metadata with warm amber initial badge
   - Sleek minimalist custom scrollbar
   ========================================================================== */

/* 1. Base Sidebar Canvas & Header */
.sidebar,
.sidebar-navigation,
body .sidebar,
body.sidebar-open .sidebar {
  background-color: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.sidebar-header,
.sidebar .sidebar-header,
body:not(.sidebar-folded) .sidebar-header,
body.sidebar-folded .sidebar-header,
body .sidebar-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  height: 54px !important;
  min-height: 54px !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

/* 2. Remove all dashed lines, dividers & pseudo elements */
.menu-category::after,
.sidebar .menu-category::after,
.sidebar-navigation .menu-category::after,
.menu-category::before,
.sidebar .menu-category::before,
.sidebar-navigation .menu-category::before,
.sidebar .menu-link::before,
.sidebar .menu-link::after,
.sidebar .menu-item::before,
.sidebar .menu-item::after {
  display: none !important;
  content: none !important;
  border: none !important;
  height: 0 !important;
  width: 0 !important;
}

/* 3. Category Titles */
.menu-category,
.sidebar .menu-category,
.sidebar-navigation .menu-category {
  color: #64748b !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.12em !important;
  padding: 18px 20px 6px !important;
  margin: 0 !important;
  position: relative !important;
  border: none !important;
}

.sidebar .menu-category:first-child,
.sidebar-navigation .menu-category:first-child {
  padding-top: 14px !important;
}

/* 4. Menu Links & Floating Unboxed Icons */
.sidebar:not(.sidebar-folded) .menu-link,
.sidebar-navigation .menu-link,
.sidebar .menu-link {
  height: auto !important;
  min-height: 40px !important;
  padding: 8px 14px !important;
  margin: 2px 10px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  color: #94a3b8 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
  background: transparent !important;
  border: none !important;
}

.sidebar:not(.sidebar-folded) .menu-link:hover,
.sidebar-navigation .menu-link:hover,
.sidebar .menu-link:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  transform: translateX(2px) !important;
}

/* Active State: Clean Royal Blue Flat Accent (No glow, no cyan) */
.sidebar:not(.sidebar-folded) .menu-item.active > .menu-link,
.sidebar:not(.sidebar-folded) .menu-item.open > .menu-link,
.sidebar-navigation .menu-item.active > .menu-link,
.sidebar .menu-item.active > .menu-link {
  background: #eff6ff !important;
  color: #1c519d !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  border: none !important;
  border-left: 3px solid #1c519d !important;
  border-radius: 0 8px 8px 0 !important;
}

/* Completely remove boxed squares from icons */
.sidebar .sidebar-icons-boxed .menu-link .icon,
.sidebar-icons-boxed .menu-link .icon,
.sidebar .menu-link .icon,
.sidebar-navigation .menu-link .icon {
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  margin-right: 12px !important;
  margin-left: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  color: #64748b !important;
  transition: color 0.18s ease !important;
}

.sidebar .menu-link:hover .icon,
.sidebar-navigation .menu-link:hover .icon {
  color: #ffffff !important;
}

.sidebar .menu-item.active > .menu-link .icon,
.sidebar-navigation .menu-item.active > .menu-link .icon {
  color: #1c519d !important;
}

.sidebar .menu-link .title,
.sidebar-navigation .menu-link .title {
  color: inherit !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

/* Caret Arrows */
.sidebar .menu-link .arrow,
.sidebar-navigation .menu-link .arrow {
  margin-left: auto !important;
  width: auto !important;
  opacity: 0.5 !important;
  transition: transform 0.2s ease, opacity 0.2s ease !important;
}

.sidebar .menu-link:hover .arrow {
  opacity: 1 !important;
}

.sidebar .menu-item.open > .menu-link .arrow,
.sidebar-navigation .menu-item.open > .menu-link .arrow {
  transform: rotate(90deg) !important;
  opacity: 1 !important;
}

/* 5. Submenus (Eliminating muddy #455160) */
.sidebar .menu-submenu,
.sidebar-navigation .menu-submenu {
  background: rgba(0, 0, 0, 0.22) !important;
  border-left: 2px solid rgba(255, 255, 255, 0.08) !important;
  margin: 4px 10px 6px 26px !important;
  padding: 4px 0 !important;
  border-radius: 0 10px 10px 0 !important;
  list-style: none !important;
}

.sidebar .menu-submenu .menu-link,
.sidebar-navigation .menu-submenu .menu-link {
  padding: 6px 12px !important;
  margin: 1px 4px !important;
  font-size: 12px !important;
  min-height: 32px !important;
  color: #94a3b8 !important;
  border-radius: 8px !important;
}

.sidebar .menu-submenu .menu-link:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  transform: translateX(2px) !important;
}

.sidebar .menu-submenu .menu-item.active > .menu-link {
  color: #1c519d !important;
  background: rgba(56, 189, 248, 0.12) !important;
  font-weight: 600 !important;
}

.sidebar .menu-submenu .menu-link .dot {
  width: 5px !important;
  height: 5px !important;
  min-width: 5px !important;
  border-radius: 50% !important;
  background: #475569 !important;
  margin-right: 10px !important;
  display: inline-block !important;
}

.sidebar .menu-submenu .menu-item.active > .menu-link .dot,
.sidebar .menu-submenu .menu-link:hover .dot {
  background: #38bdf8 !important;
  box-shadow: none !important;
}

/* 6. Profile Footer Card */
.sidebar-profile-card,
.sidebar .sidebar-profile-card {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 10px 12px !important;
  margin: 12px 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.sidebar-profile-badge,
.sidebar .sidebar-profile-badge {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #081b29 !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35) !important;
}

.sidebar-profile-card .profile-meta,
.sidebar .sidebar-profile-card .profile-meta {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 2px !important;
  margin-left: 10px !important;
  overflow: hidden !important;
  text-align: left !important;
}

.sidebar-profile-card .sidebar-profile-logout {
  color: #64748b !important;
  padding: 6px !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
}

.sidebar-profile-card .sidebar-profile-logout:hover {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.1) !important;
}

/* 7. Minimal Custom Scrollbar */
.sidebar-navigation::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 4px !important;
}
.sidebar-navigation::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
  background: transparent !important;
}
.sidebar-navigation::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 9999px !important;
}
.sidebar-navigation::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}


/* ==========================================================================
   AL-QUR'AN DIGITAL - ROYAL NAVY & SURYA GOLD THEME
   ========================================================================== */
.quran-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4px 30px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Reset any inherited ugly list / ol styling */
.quran-container ol, 
.quran-container ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  columns: auto !important;
}

/* 1. Hero Banner */
.quran-hero-card {
  background: linear-gradient(135deg, #081b29 0%, #0f2b48 55%, #1c519d 100%);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 20px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(8, 27, 41, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.quran-hero-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.16) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.quran-hero-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 2;
}
@media (min-width: 768px) {
  .quran-hero-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
.quran-hero-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.quran-hero-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  font-size: 24px;
  flex-shrink: 0;
}
.quran-hero-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}
.quran-hero-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}
.quran-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.quran-badge-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
}
.quran-badge-stat i {
  color: #fbbf24;
}
.quran-hero-calligraphy {
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: 36px;
  font-weight: 700;
  color: #fbbf24;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  text-align: right;
  line-height: 1.2;
}

/* 2. Toolbar & Search */
.quran-toolbar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.05);
}
.quran-search-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 640px) {
  .quran-search-row {
    flex-direction: row;
    align-items: center;
  }
}
.quran-search-input-wrap {
  position: relative;
  flex: 1;
}
.quran-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 15px;
  pointer-events: none;
}
.quran-search-input {
  width: 100%;
  height: 44px;
  padding: 8px 38px 8px 40px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.quran-search-input:focus {
  outline: none;
  background: #ffffff;
  border-color: #1c519d;
  box-shadow: 0 0 0 3px rgba(28, 81, 157, 0.12);
}
.quran-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s ease;
}
.quran-search-clear:hover {
  color: #ef4444;
}
.quran-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1c519d;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* Quick Filter Chips - Fluid Horizontal Touch & Drag Scroll */
.quran-chips-container {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x !important;
  overscroll-behavior-x: contain !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding: 12px 2px 6px 2px !important;
  margin-top: 14px !important;
  border-top: 1px solid #f1f5f9 !important;
}
.quran-chips-container::-webkit-scrollbar {
  display: none !important;
  height: 0 !important;
  width: 0 !important;
}
.quran-chip-label {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: #64748b !important;
  white-space: nowrap !important;
  margin-right: 2px !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
}
.quran-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 6px 13px !important;
  border-radius: 20px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  transition: all 0.15s ease !important;
}
.quran-chip:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}
.quran-chip.active {
  background: #1c519d;
  border-color: #1c519d;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(28, 81, 157, 0.25);
}
.quran-chip.active i {
  color: #fbbf24;
}

/* 3. Surah Grid */
.quran-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px) {
  .quran-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}
@media (min-width: 1024px) {
  .quran-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

/* Surah Card */
.quran-surah-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 15px 18px;
  text-decoration: none !important;
  color: inherit !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.quran-surah-card.quran-card-hidden {
  display: none !important;
}
.quran-surah-card:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
  box-shadow: 0 10px 24px -4px rgba(28, 81, 157, 0.12);
  background: #ffffff;
}
.quran-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.quran-num-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #081b29 0%, #1c519d 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 2px 6px rgba(8, 27, 41, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.quran-surah-card:hover .quran-num-badge {
  transform: scale(1.06);
  border-color: #f59e0b;
  color: #fbbf24;
}
.quran-card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.quran-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}
.quran-surah-card:hover .quran-card-name {
  color: #1c519d;
}
.quran-card-arti {
  font-size: 12.5px;
  color: #64748b;
  margin: 1px 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quran-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.quran-card-ayat-count {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 500;
  color: #94a3b8;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
html[data-mode="dark"] .quran-card-ayat-count {
  color: #64748b !important;
  background: transparent !important;
}
.quran-card-right {
  text-align: right;
  padding-left: 10px;
  flex-shrink: 0;
}
.quran-card-arabic {
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: 22px;
  font-weight: 700;
  color: #1c519d;
  line-height: 1.2;
  transition: color 0.15s ease;
}
.quran-surah-card:hover .quran-card-arabic {
  color: #d97706;
}

/* Empty State */
.quran-empty-state {
  text-align: center;
  padding: 48px 20px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px dashed #cbd5e1;
  margin-top: 10px;
}
.quran-empty-icon {
  font-size: 44px;
  color: #94a3b8;
  margin-bottom: 12px;
}
.quran-empty-title {
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}
.quran-empty-desc {
  font-size: 13.5px;
  color: #64748b;
  margin-bottom: 16px;
}

/* 4. Quran Reader View */
.quran-reader-wrapper {
  max-width: 960px;
  margin: 0 auto;
}
.quran-reader-toolbar {
  position: sticky;
  top: 60px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 16px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.quran-toolbar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}
.quran-reader-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.quran-reader-nav-back:hover {
  background: #1c519d;
  border-color: #1c519d;
  color: #ffffff !important;
}
.quran-select-wrapper {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 320px;
}
.quran-select-surah {
  width: 100%;
  height: 36px;
  padding: 4px 12px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.quran-select-surah:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.quran-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.quran-resizer-box {
  display: inline-flex;
  align-items: center;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  overflow: hidden;
  background: #f8fafc;
  flex-shrink: 0;
}
.quran-resizer-btn {
  background: transparent;
  border: none;
  padding: 0 10px;
  height: 100%;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.quran-resizer-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.quran-resizer-val {
  padding: 0 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  line-height: 32px;
  min-width: 42px;
  text-align: center;
}
.quran-toggles-box {
  display: flex;
  align-items: center;
  gap: 6px;
}
.quran-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.quran-toggle-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b;
}
.quran-toggle-btn.active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1c519d;
  box-shadow: 0 1px 2px rgba(28, 81, 157, 0.08);
}
/* Dark Mode Support for Toolbar */
html[data-mode="dark"] .quran-reader-toolbar {
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: #334155 !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.45) !important;
}
html[data-mode="dark"] .quran-reader-nav-back {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .quran-reader-nav-back:hover {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .quran-select-surah {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}
html[data-mode="dark"] .quran-resizer-box {
  background: #0f172a !important;
  border-color: #334155 !important;
}
html[data-mode="dark"] .quran-resizer-btn {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .quran-resizer-btn:hover {
  background: #334155 !important;
  color: #f1f5f9 !important;
}
html[data-mode="dark"] .quran-resizer-val {
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}
html[data-mode="dark"] .quran-toggle-btn {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}
html[data-mode="dark"] .quran-toggle-btn:hover {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}
html[data-mode="dark"] .quran-toggle-btn.active {
  background: rgba(37, 99, 235, 0.22) !important;
  border-color: #3b82f6 !important;
  color: #60a5fa !important;
}

@media (max-width: 767px) {
  .quran-reader-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px;
    gap: 8px;
    top: 58px;
    margin-bottom: 16px;
    border-radius: 12px;
  }
  .quran-toolbar-nav {
    width: 100%;
    gap: 8px;
  }
  .quran-reader-nav-back {
    padding: 6px 10px;
    font-size: 12px;
  }
  .quran-select-wrapper {
    flex: 1;
    max-width: none;
    min-width: 0;
  }
  .quran-select-surah {
    height: 34px;
    font-size: 12px;
    padding: 4px 8px;
  }
  .quran-toolbar-controls {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
  }
  html[data-mode="dark"] .quran-toolbar-controls {
    border-top-color: #334155 !important;
  }
  .quran-resizer-box {
    height: 32px;
    flex-shrink: 0;
  }
  .quran-resizer-btn {
    padding: 0 7px;
    font-size: 11px;
  }
  .quran-resizer-val {
    min-width: 36px;
    padding: 0 4px;
    font-size: 11px;
    line-height: 30px;
  }
  .quran-toggles-box {
    display: flex;
    flex: 1;
    min-width: 0;
    gap: 5px;
    justify-content: flex-end;
  }
  .quran-toggle-btn {
    flex: 1;
    min-width: 0;
    height: 32px;
    padding: 0 6px;
    font-size: 11.5px;
    gap: 4px;
  }
}
@media (max-width: 380px) {
  .quran-reader-toolbar {
    padding: 8px 10px;
    gap: 7px;
  }
  .nav-back-text {
    display: none;
  }
  .quran-reader-nav-back {
    padding: 6px 8px;
  }
  .quran-reader-nav-back::after {
    content: "Surat";
    margin-left: 2px;
  }
  .auto-next-label {
    display: none;
  }
  .quran-toggle-btn#btnToggleAutoNext::after {
    content: "Auto";
  }
}

/* Surah Hero Header Card */
.quran-surah-hero-header {
  background: linear-gradient(135deg, #081b29 0%, #0f2b48 50%, #1c519d 100%);
  border-radius: 16px;
  padding: 26px 24px;
  margin-bottom: 20px;
  color: #ffffff;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 25px -5px rgba(8, 27, 41, 0.35);
}
.quran-header-arabic {
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: 40px;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 10px;
  line-height: 1.3;
}
.quran-header-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px 0;
}
.quran-header-arti {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 12px 0;
}
.quran-header-meta {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.quran-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 600;
  color: #f8fafc;
}
.quran-header-pill.btn-play-all {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transition: all 0.2s ease;
}
.quran-header-pill.btn-play-all:hover {
  background: rgba(255, 255, 255, 0.32);
}
.quran-header-pill.btn-play-all.is-playing {
  background: #f59e0b;
  border-color: #d97706;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

/* Bismillah Box */
.quran-bismillah-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 18px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.quran-bismillah-arabic {
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: 30px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
  line-height: 1.4;
}
.quran-bismillah-arti {
  font-size: 13px;
  color: #64748b;
  font-style: italic;
}

/* Verse Item Card */
.quran-verse-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}
.quran-verse-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px -3px rgba(15, 23, 42, 0.07);
}
.quran-verse-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}
.quran-verse-pill {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}
.quran-verse-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.quran-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.quran-action-btn span {
  display: none !important;
}
.quran-action-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}
.quran-action-btn.playing {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  animation: pulse-murottal 1.8s infinite;
}
html[data-mode="dark"] .quran-action-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}
html[data-mode="dark"] .quran-action-btn:hover {
  background: #334155;
  color: #f8fafc;
  border-color: #475569;
}

.quran-verse-card.active-playing-verse {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25), 0 8px 24px -4px rgba(59, 130, 246, 0.15) !important;
  background: #f8faff !important;
  position: relative;
  transition: all 0.25s ease;
}
html[data-mode="dark"] .quran-verse-card.active-playing-verse {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.35), 0 8px 24px -4px rgba(0, 0, 0, 0.5) !important;
  background: #1e293b !important;
}
.quran-verse-arabic {
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 2.4;
  color: #0f172a;
  text-align: right;
  direction: rtl;
  padding: 8px 0 14px 0;
  word-spacing: 2px;
}
.quran-verse-latin {
  font-size: 14.5px;
  font-style: italic;
  color: #1c519d;
  line-height: 1.6;
  margin-bottom: 8px;
  transition: opacity 0.2s ease;
}
.quran-verse-arti {
  font-size: 14px;
  color: #334155;
  line-height: 1.65;
  border-top: 1px dashed #f1f5f9;
  padding-top: 8px;
  transition: opacity 0.2s ease;
}

/* Bottom Surah Navigation */
.quran-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}
.quran-nav-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1e293b !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}
.quran-nav-card:hover {
  border-color: #1c519d;
  color: #1c519d !important;
  box-shadow: 0 4px 12px rgba(28, 81, 157, 0.1);
}



/* ==========================================================================
   MINIMALIST CLEAN WHITE SIDEBAR (PURE CLEAN WHITE BACKGROUND & CONTRAST FONTS)
   ========================================================================== */
:root {
  --sidebar-bg: #ffffff;
}

/* 1. Base Sidebar Container & Navigation Canvas (Light Mode - Subtle Glassmorphism matching Topbar) */
html:not([data-mode="dark"]) .sidebar,
html:not([data-mode="dark"]) #app-sidebar,
html:not([data-mode="dark"]) .sidebar-expand-lg,
html:not([data-mode="dark"]) aside.sidebar,
html:not([data-mode="dark"]) body:not(.sidebar-folded) .sidebar,
html:not([data-mode="dark"]) body.sidebar-folded .sidebar,
html:not([data-mode="dark"]) body .sidebar,
html:not([data-mode="dark"]) body.sidebar-open .sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(248, 250, 255, 0.65) 100%) !important;
  background-color: rgba(255, 255, 255, 0.70) !important;
  /* backdrop-filter optimized */
  border-right: 1px solid rgba(226, 232, 240, 0.75) !important;
  box-shadow: 4px 0 24px -4px rgba(28, 81, 157, 0.05) !important;
}

html:not([data-mode="dark"]) .sidebar-navigation,
html:not([data-mode="dark"]) .sidebar .sidebar-navigation,
html:not([data-mode="dark"]) body .sidebar-navigation,
html:not([data-mode="dark"]) body:not(.sidebar-folded) .sidebar-navigation,
html:not([data-mode="dark"]) body.sidebar-folded .sidebar-navigation,
html:not([data-mode="dark"]) .sidebar-navigation ul.menu,
html:not([data-mode="dark"]) .sidebar ul.menu {
  background: transparent !important;
  background-color: transparent !important;
  border-right: none !important;
  box-shadow: none !important;
}

/* 2. Sidebar Header & Logo (Light Mode - Subtle Glass) */
html:not([data-mode="dark"]) .sidebar-header,
html:not([data-mode="dark"]) .sidebar .sidebar-header,
html:not([data-mode="dark"]) .sidebar-header.bg-primary,
html:not([data-mode="dark"]) body .sidebar-header,
html:not([data-mode="dark"]) body:not(.sidebar-folded) .sidebar-header,
html:not([data-mode="dark"]) body.sidebar-folded .sidebar-header,
html:not([data-mode="dark"]) header.sidebar-header {
  background: rgba(255, 255, 255, 0.45) !important;
  background-color: rgba(255, 255, 255, 0.45) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
  border-right: none !important;
  box-shadow: none !important;
  height: 52px !important;
  min-height: 52px !important;
  box-sizing: border-box !important;
}

/* Expanded Mode (Desktop >= 992px) */
@media (min-width: 992px) {
  body:not(.sidebar-folded) .sidebar-header {
    width: 260px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 16px !important;
  }

  body:not(.sidebar-folded) .sidebar-header .logo {
    display: flex !important;
    align-items: center !important;
    max-width: 165px !important;
    order: 1 !important;
  }

  html:not([data-mode="dark"]) body:not(.sidebar-folded) .sidebar-header .logo img,
  html:not([data-mode="dark"]) body:not(.sidebar-folded) .sidebar-header .logo .sidebar-logo-img,
  html:not([data-mode="dark"]) .sidebar .sidebar-logo-img {
    max-height: 22px !important;
    max-width: 160px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    filter: brightness(0) saturate(100%) invert(8%) sepia(20%) saturate(3000%) hue-rotate(185deg) brightness(90%) contrast(100%) !important;
    opacity: 0.9 !important;
    display: block !important;
  }

  body:not(.sidebar-folded) .sidebar-header .sidebar-toggle-fold {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    order: 2 !important;
    margin: 0 0 0 auto !important;
    transition: all 0.15s ease !important;
  }

  body:not(.sidebar-folded) .sidebar-header .sidebar-toggle-fold:hover {
    background-color: #f8fafc !important;
  }

  body:not(.sidebar-folded) .sidebar-header .sidebar-toggle-fold::before {
    content: '' !important;
    display: inline-block !important;
    width: 12px !important;
    height: 12px !important;
    border: 2px solid #2563eb !important;
    border-radius: 50% !important;
    background-color: #2563eb !important;
    box-shadow: 0 0 0 2px #dbeafe !important;
    box-sizing: border-box !important;
    transition: all 0.15s ease !important;
  }

  body:not(.sidebar-folded) .sidebar-header .sidebar-toggle-fold:hover::before {
    border-color: #1d4ed8 !important;
    background-color: #1d4ed8 !important;
    box-shadow: 0 0 0 3px #bfdbfe !important;
  }

  body:not(.sidebar-folded) .sidebar-header .logo-icon,
  body:not(.sidebar-folded) .sidebar-header .mobile-sidebar-close,
  body.sidebar-folded .sidebar-header .mobile-sidebar-close {
    display: none !important;
  }

  /* Folded Mode */
  body.sidebar-folded .sidebar-header {
    width: 80px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  body.sidebar-folded .sidebar-header .logo,
  body.sidebar-folded .sidebar-header span.sidebar-toggle-fold {
    display: none !important;
  }

  body.sidebar-folded .sidebar-header .logo-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
  }

  body.sidebar-folded .sidebar-header .logo-icon:hover {
    background-color: #f8fafc !important;
  }

  body.sidebar-folded .sidebar-header .logo-icon img,
  body.sidebar-folded .sidebar-header .sidebar-logo-icon {
    width: 26px !important;
    height: 26px !important;
    object-fit: contain !important;
    display: block !important;
    filter: brightness(0) saturate(100%) invert(8%) sepia(20%) saturate(3000%) hue-rotate(185deg) brightness(90%) contrast(100%) !important;
  }
}

/* Mobile Drawer Mode (< 992px): Sleek 244px width, Logo Left, Minimal X Right, NO fold circle */
@media (max-width: 991px) {
  .sidebar,
  body .sidebar,
  body:not(.sidebar-folded) .sidebar,
  body.sidebar-folded .sidebar {
    width: 244px !important;
    min-width: 244px !important;
    max-width: 75vw !important;
  }

  html:not([data-mode="dark"]) .sidebar .sidebar-header,
  html:not([data-mode="dark"]) body .sidebar-header,
  html:not([data-mode="dark"]) body:not(.sidebar-folded) .sidebar-header,
  html:not([data-mode="dark"]) body.sidebar-folded .sidebar-header {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.45) !important;
    background-color: rgba(255, 255, 255, 0.45) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 14px !important;
    height: 48px !important;
    min-height: 48px !important;
  }

  body:not(.sidebar-folded) .sidebar-header .logo,
  body.sidebar-folded .sidebar-header .logo,
  .sidebar-header .logo {
    display: flex !important;
    align-items: center !important;
    max-width: 145px !important;
    order: 1 !important;
    margin: 0 !important;
  }

  html:not([data-mode="dark"]) body:not(.sidebar-folded) .sidebar-header .logo img,
  html:not([data-mode="dark"]) body.sidebar-folded .sidebar-header .logo img,
  html:not([data-mode="dark"]) .sidebar-header .logo img {
    max-height: 20px !important;
    max-width: 140px !important;
    width: auto !important;
    height: auto !important;
    filter: brightness(0) saturate(100%) invert(8%) sepia(20%) saturate(3000%) hue-rotate(185deg) brightness(90%) contrast(100%) !important;
  }

  body:not(.sidebar-folded) .sidebar-header .logo-icon,
  body.sidebar-folded .sidebar-header .logo-icon,
  .sidebar-header .logo-icon,
  body:not(.sidebar-folded) .sidebar-header .sidebar-toggle-fold,
  body.sidebar-folded .sidebar-header .sidebar-toggle-fold,
  .sidebar-header .sidebar-toggle-fold,
  span.sidebar-toggle-fold {
    display: none !important;
  }

  .sidebar-header .mobile-sidebar-close,
  body .sidebar-header .mobile-sidebar-close {
    display: inline-flex !important;
    order: 2 !important;
    margin: 0 0 0 auto !important;
    color: #94a3b8 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    padding: 0 !important;
  }
  .sidebar-header .mobile-sidebar-close:hover,
  .sidebar-header .mobile-sidebar-close:active {
    background: #f8fafc !important;
    color: #334155 !important;
  }
}

/* 3. Minimalist Category Headings */
.sidebar .menu-category,
.sidebar-navigation .menu-category,
body .sidebar .menu-category,
.menu-category {
  color: #94a3b8 !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 12px 14px 3px !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
}
.sidebar .menu-category:first-child,
.sidebar-navigation .menu-category:first-child {
  padding-top: 8px !important;
}
.sidebar .menu-category::after,
.sidebar-navigation .menu-category::after,
.sidebar .menu-category::before,
.sidebar-navigation .menu-category::before {
  display: none !important;
}

/* 4. Minimalist Menu Links */
.sidebar .menu-link,
.sidebar-navigation .menu-link,
.sidebar:not(.sidebar-folded) .menu-link,
body .sidebar .menu-link {
  display: flex !important;
  align-items: center !important;
  min-height: 33px !important;
  padding: 6px 10px !important;
  margin: 1px 8px !important;
  border-radius: 7px !important;
  color: #475569 !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
  transition: background-color 0.12s ease, color 0.12s ease !important;
}

.sidebar .menu-link .title,
.sidebar-navigation .menu-link .title,
body .sidebar .menu-link .title {
  font-size: 12.5px !important;
  line-height: 1.25 !important;
  color: inherit !important;
}

.sidebar .menu-link:hover,
.sidebar-navigation .menu-link:hover,
.sidebar:not(.sidebar-folded) .menu-link:hover,
body .sidebar .menu-link:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Minimalist Menu Icons */
.sidebar .menu-link .icon,
.sidebar-navigation .menu-link .icon,
.sidebar .menu-link i,
.sidebar-navigation .menu-link i,
body:not(.sidebar-folded) .sidebar .menu-link .icon {
  color: #64748b !important;
  font-size: 13px !important;
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  text-align: center !important;
  margin-right: 9px !important;
  margin-left: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transition: color 0.12s ease !important;
}

.sidebar .menu-link:hover .icon,
.sidebar-navigation .menu-link:hover .icon,
.sidebar .menu-link:hover i {
  color: #2563eb !important;
}

/* Minimalist Arrow */
.sidebar .menu-link .arrow,
.sidebar-navigation .menu-link .arrow {
  color: #cbd5e1 !important;
  font-size: 10px !important;
  margin-left: auto !important;
}
.sidebar .menu-link:hover .arrow,
.sidebar-navigation .menu-link:hover .arrow {
  color: #64748b !important;
}

/* 5. Active Menu Item (Flat Pill, No Heavy Border Bar) */
.sidebar .menu-item.active > .menu-link,
.sidebar:not(.sidebar-folded) .menu-item.active > .menu-link,
.sidebar-navigation .menu-item.active > .menu-link,
body .sidebar .menu-item.active > .menu-link {
  background: #eff6ff !important;
  color: #2563eb !important;
  font-weight: 600 !important;
  border: none !important;
  border-left: none !important;
  border-radius: 7px !important;
  box-shadow: none !important;
  transform: none !important;
}

.sidebar .menu-item.active > .menu-link .icon,
.sidebar-navigation .menu-item.active > .menu-link .icon,
.sidebar .menu-item.active > .menu-link i {
  color: #2563eb !important;
  background: transparent !important;
}

/* 6. Minimalist Submenu (Clean Thin Left Line, No Boxy Background) */
.sidebar .menu-submenu,
.sidebar-navigation .menu-submenu,
body .sidebar .menu-submenu {
  background: transparent !important;
  border-left: 1.5px solid #e2e8f0 !important;
  margin: 2px 8px 4px 20px !important;
  padding: 2px 0 2px 4px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  list-style: none !important;
}

.sidebar .menu-submenu .menu-link,
.sidebar-navigation .menu-submenu .menu-link,
body .sidebar .menu-submenu .menu-link {
  padding: 5px 10px !important;
  margin: 1px 2px !important;
  font-size: 12px !important;
  min-height: 28px !important;
  color: #64748b !important;
  border-radius: 6px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
  font-weight: 500 !important;
}

.sidebar .menu-submenu .menu-link:hover,
.sidebar-navigation .menu-submenu .menu-link:hover,
body .sidebar .menu-submenu .menu-link:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  transform: none !important;
  box-shadow: none !important;
}

.sidebar .menu-submenu .menu-item.active > .menu-link,
.sidebar-navigation .menu-submenu .menu-item.active > .menu-link,
body .sidebar .menu-submenu .menu-item.active > .menu-link {
  color: #2563eb !important;
  background: #eff6ff !important;
  font-weight: 600 !important;
  border: none !important;
  border-left: none !important;
  box-shadow: none !important;
}

/* Remove weird saucer dot pseudo-elements */
.menu-link .dot::after,
.menu-submenu .menu-link .dot::after,
.sidebar .menu-submenu .dot::after,
.sidebar .menu-submenu .menu-item:hover > .menu-link .dot::after,
.sidebar .menu-submenu .menu-item.active > .menu-link .dot::after {
  display: none !important;
  content: none !important;
  width: 0 !important;
  height: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

/* Tiny Minimalist Dot */
.menu-link .dot,
.menu-submenu .menu-link .dot,
.sidebar .menu-submenu .menu-link .dot {
  display: inline-block !important;
  position: static !important;
  width: 4px !important;
  height: 4px !important;
  min-width: 4px !important;
  max-width: 4px !important;
  border-radius: 50% !important;
  background-color: #cbd5e1 !important;
  margin-right: 8px !important;
  margin-left: 0 !important;
  flex-basis: auto !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
  border: none !important;
}

.sidebar .menu-submenu .menu-item.active > .menu-link .dot,
.sidebar .menu-submenu .menu-link:hover .dot {
  background-color: #2563eb !important;
  box-shadow: none !important;
}

/* 7. Consistent Floating Profile Footer at Bottom of Sidebar (Light Mode - Matching Dark Mode) */
html:not([data-mode="dark"]) .sidebar-profile-card,
html:not([data-mode="dark"]) .sidebar .sidebar-profile-card,
html:not([data-mode="dark"]) body .sidebar-profile-card,
html:not([data-mode="dark"]) body:not(.sidebar-folded) .sidebar-profile-card {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  margin: 8px 12px 14px 12px !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.sidebar-profile-badge,
.sidebar .sidebar-profile-badge {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  background: #eff6ff !important;
  color: #2563eb !important;
  border-radius: 10px !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.sidebar-profile-card .profile-meta {
  margin-left: 10px !important;
  gap: 2px !important;
}

.sidebar-profile-card .profile-meta span:first-child,
.sidebar-profile-card .profile-meta strong {
  color: #0f172a !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
}
.sidebar-profile-card .profile-meta span:last-child {
  color: #64748b !important;
  font-size: 11px !important;
}

.sidebar-profile-card .sidebar-profile-logout {
  color: #64748b !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}
.sidebar-profile-card .sidebar-profile-logout:hover {
  color: #ef4444 !important;
  background: #fee2e2 !important;
}

/* 8. Minimalist Scrollbar */
.sidebar-navigation::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 3px !important;
}
.sidebar-navigation::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
  background: transparent !important;
}
.sidebar-navigation::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  background: #e2e8f0 !important;
  border-radius: 3px !important;
}
.sidebar-navigation::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1 !important;
}


/* 9. Folded Sidebar (80px Desktop Mode) Precision Alignment & Theme Consistency */
@media (min-width: 992px) {
  .sidebar-header,
  .sidebar .sidebar-header,
  body:not(.sidebar-folded) .sidebar-header,
  body.sidebar-folded .sidebar-header {
    height: 64px !important;
    min-height: 64px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-right: 1px solid #e2e8f0 !important;
  }

  /* Restore crisp full-color school emblem in folded header (remove black silhouette filter) */
  body.sidebar-folded .sidebar-header .logo-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border-radius: 10px !important;
  }

  body.sidebar-folded .sidebar-header .logo-icon img,
  body.sidebar-folded .sidebar-header .sidebar-logo-icon {
    width: 30px !important;
    height: 30px !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    display: block !important;
    filter: none !important;
    opacity: 1 !important;
  }

  /* Center all menu items and icons inside the 80px folded column */
  body.sidebar-folded .sidebar-navigation ul.menu {
    padding: 10px 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 80px !important;
  }

  body.sidebar-folded .sidebar .menu-item,
  body.sidebar-folded .sidebar-navigation .menu-item {
    width: 80px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 2px 0 !important;
    padding: 0 !important;
  }

  body.sidebar-folded .sidebar .menu-link,
  body.sidebar-folded .sidebar-navigation .menu-link {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  body.sidebar-folded .sidebar .menu-link .icon,
  body.sidebar-folded .sidebar-navigation .menu-link .icon,
  body.sidebar-folded .sidebar .menu-link i {
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Folded Hover State: Subtle Slate Pill + Blue Icon (No white-on-white!) */
  body.sidebar-folded .sidebar .menu-link:hover,
  body.sidebar-folded .sidebar-navigation .menu-link:hover {
    background: #f1f5f9 !important;
    color: #2563eb !important;
  }
  body.sidebar-folded .sidebar .menu-link:hover .icon,
  body.sidebar-folded .sidebar-navigation .menu-link:hover .icon,
  body.sidebar-folded .sidebar .menu-link:hover i {
    color: #2563eb !important;
    background: transparent !important;
    border: none !important;
  }

  /* Folded Active State: Soft Blue Pill + Royal Blue Icon (No yellow/orange border box!) */
  body.sidebar-folded .sidebar .menu-item.active > .menu-link,
  body.sidebar-folded .sidebar-navigation .menu-item.active > .menu-link {
    background: #eff6ff !important;
    color: #2563eb !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 10px !important;
  }
  body.sidebar-folded .sidebar .menu-item.active > .menu-link .icon,
  body.sidebar-folded .sidebar-navigation .menu-item.active > .menu-link .icon,
  body.sidebar-folded .sidebar .menu-item.active > .menu-link i {
    color: #2563eb !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* Folded Bottom Profile Footer: Cleanly Centered 80px Box, No protruding border */
  body.sidebar-folded .sidebar-profile-card,
  body.sidebar-folded .sidebar .sidebar-profile-card {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    padding: 12px 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    border: none !important;
    border-top: 1px solid #f1f5f9 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.sidebar-folded .sidebar-profile-card > div {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 !important;
  }

  body.sidebar-folded .sidebar-profile-card .sidebar-profile-badge {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    margin: 0 auto !important;
    border-radius: 9px !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: none !important;
  }
}

/* ==========================================================================
   MOBILE DATA-TABLE VIEW SWITCHER & CARD / STICKY TABLE SYSTEM
   ========================================================================== */

/* 1. View Switcher Pill Component */
.table-view-switcher {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.btn-table-mode {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}
.btn-table-mode:hover {
  color: #1e293b;
}
.btn-table-mode.active {
  background: #ffffff;
  color: #1c519d;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.btn-table-mode.active i {
  color: #1c519d;
}

/* 2. Scroll Hint Bar (Visible only in Table Mode on Mobile) */
.mobile-table-hint {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1c519d;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 10px;
}

/* ==========================================================================
   4. UNIVERSAL RESPONSIVE TABLE ARCHITECTURE (MOBILE & DESKTOP)
   ========================================================================== */

/* 1. Toggle Switcher Buttons (📑 Kartu vs 📊 Tabel) */
.table-view-switcher {
  display: inline-flex !important;
  align-items: center;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
html[data-mode="dark"] .table-view-switcher {
  background: rgba(255, 255, 255, 0.08);
}
.btn-table-mode {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}
.btn-table-mode:hover {
  color: #1e293b;
}
.btn-table-mode.active {
  background: #ffffff !important;
  color: var(--t-primary, #059669) !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
}
html[data-mode="dark"] .btn-table-mode.active {
  background: var(--t-surface, #1e293b) !important;
  color: var(--t-primary, #34d399) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4) !important;
}
html[data-mode="dark"] .btn-table-mode {
  color: #94a3b8;
}
html[data-mode="dark"] .btn-table-mode.active {
  background: var(--t-surface, #1e293b);
  color: #60a5fa;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* 2. CARD VIEW (MODE KARTU) - UNIVERSAL (DESKTOP & MOBILE) */
.card:has(.mode-card-view),
.card:has(.is-guru-table),
.card:has(.is-siswa-table) {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.card-body.table-responsive.mode-card-view,
.table-responsive.mode-card-view,
.table-responsive.mode-card-view .dt-mobile-table-scroll {
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y !important;
  border: none !important;
  background: transparent !important;
  padding: 6px 10px 16px 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

@media (max-width: 767px) {
  .card-body.table-responsive.mode-card-view,
  .table-responsive.mode-card-view,
  .table-responsive.mode-card-view .dt-mobile-table-scroll {
    padding: 6px 8px 16px 8px !important;
  }
}

/* Eliminate all nested DataTables wrapper padding & margin in Card View */
.table-responsive.mode-card-view .dataTables_wrapper,
.table-responsive.mode-card-view .dataTables_wrapper.container-fluid,
.table-responsive.mode-card-view div.dataTables_wrapper {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y !important;
}
.table-responsive.mode-card-view .dataTables_wrapper .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.table-responsive.mode-card-view .dataTables_wrapper .col-sm-12,
.table-responsive.mode-card-view .dataTables_wrapper [class*="col-"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.table-responsive.mode-card-view table.dataTable,
.table-responsive.mode-card-view table.table,
.table-responsive.mode-card-view table.dataTable.table-wide-mobile,
.table-responsive.mode-card-view table.table.table-wide-mobile {
  display: block !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  border: none !important;
  background: transparent !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}
.table-responsive.mode-card-view table.dataTable thead,
.table-responsive.mode-card-view table.table thead {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
}

/* Desktop & Tablet: Multi-column Card Grid | Mobile: Single Column */
.table-responsive.mode-card-view table.dataTable tbody,
.table-responsive.mode-card-view table.table tbody {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
@media (max-width: 991px) {
  .table-responsive.mode-card-view table.dataTable tbody,
  .table-responsive.mode-card-view table.table tbody {
    display: block !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}

.table-responsive.mode-card-view table.dataTable tbody tr,
.table-responsive.mode-card-view table.table tbody tr {
  display: block !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 14px 12px 14px 12px !important;
  margin-bottom: 14px !important;
  min-height: auto !important;
  height: auto !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  transition: all 0.15s ease !important;
}

/* Dynamic Mobile Ergonomics: Natural Auto-Height & Fluid Padding on Phones */
@media (max-width: 767px) {
  .table-responsive.mode-card-view table.dataTable tbody tr,
  .table-responsive.mode-card-view table.table tbody tr {
    min-height: auto !important;
    height: auto !important;
    padding: 14px 12px 14px 12px !important;
    margin-bottom: 14px !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .table-responsive.mode-card-view table.dataTable tbody td:nth-child(2) a.cell-primary-title,
  .table-responsive.mode-card-view table.dataTable tbody td:nth-child(2) a {
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    word-break: break-word !important;
    line-height: 1.35 !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
  }
  .table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-hasiltes-table) table.dataTable tbody td:nth-child(2) {
    padding: 0 128px 4px 38px !important;
  }
  .table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-hasiltes-table) table.dataTable tbody td:first-child {
    top: 14px !important;
    left: 12px !important;
  }
  .table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-hasiltes-table) table.dataTable tbody td:last-child {
    top: 12px !important;
    right: 12px !important;
  }
  .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8),
  .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7) {
    top: 13px !important;
    right: 48px !important;
  }
}

@media (max-width: 400px) {
  .table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-hasiltes-table) table.dataTable tbody td:nth-child(2) {
    padding: 0 116px 4px 34px !important;
  }
  .table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-hasiltes-table) table.dataTable tbody td:first-child {
    top: 13px !important;
    left: 10px !important;
  }
  .table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-hasiltes-table) table.dataTable tbody td:last-child {
    top: 12px !important;
    right: 10px !important;
  }
  .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8),
  .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7) {
    top: 15px !important;
    right: 48px !important;
  }
}

@media (max-width: 320px) {
  .table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-hasiltes-table) table.dataTable tbody td:nth-child(2) {
    padding: 0 104px 4px 30px !important;
  }
  .table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-hasiltes-table) table.dataTable tbody td:first-child {
    top: 12px !important;
    left: 8px !important;
  }
  .table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-hasiltes-table) table.dataTable tbody td:last-child {
    top: 11px !important;
    right: 8px !important;
  }
  .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8),
  .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7) {
    top: 14px !important;
    right: 44px !important;
  }
}

/* Empty State / No Data Fallback inside Card View */
.table-responsive.mode-card-view table.dataTable tbody tr:has(.dataTables_empty),
.table-responsive.mode-card-view table.dataTable tbody tr td.dataTables_empty {
  display: block !important;
  position: static !important;
  text-align: center !important;
  width: 100% !important;
  min-height: auto !important;
  padding: 30px 15px !important;
  grid-column: 1 / -1 !important;
  box-shadow: none !important;
}
  html[data-mode="dark"] .table-responsive.mode-card-view table.dataTable tbody tr {
    background: var(--t-surface, #1e293b) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  }
  .table-responsive.mode-card-view table.dataTable tbody tr:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
  }

  /* Universal Reset for ALL TDs in Card View */
  .table-responsive.mode-card-view table.dataTable tbody td,
  .table-responsive.mode-card-view table.table tbody td {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    position: static;
    padding: 0;
  }

  /* Universal Checkbox Top-Left */
  .table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-tugas-table):not(.is-hasiltes-table) table.dataTable tbody td:first-child,
  .table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-tugas-table):not(.is-hasiltes-table) table.dataTable.table-wide-mobile > tbody > tr > td:first-child,
  .table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-tugas-table):not(.is-hasiltes-table) table.table.table-wide-mobile > tbody > tr > td:first-child {
    display: inline-block !important;
    position: absolute !important;
    top: 16px !important;
    left: 16px !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    z-index: 4 !important;
  }

  /* Universal Name & Title (Second Column) */
  .table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-tugas-table):not(.is-hasiltes-table) table.dataTable tbody td:nth-child(2),
  .table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-tugas-table):not(.is-hasiltes-table) table.table tbody td:nth-child(2) {
    display: block !important;
    padding: 0 145px 4px 34px !important; /* Prevents long names from colliding with status badge */
    border: none !important;
    background: transparent !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .table-responsive.mode-card-view table.dataTable tbody td:nth-child(2) a.cell-primary-title,
  .table-responsive.mode-card-view table.dataTable tbody td:nth-child(2) a {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    display: block !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-decoration: none !important;
  }
  html[data-mode="dark"] .table-responsive.mode-card-view table.dataTable tbody td:nth-child(2) a.cell-primary-title,
  html[data-mode="dark"] .table-responsive.mode-card-view table.dataTable tbody td:nth-child(2) a {
    color: #f1f5f9 !important;
  }
  .table-responsive.mode-card-view table.dataTable tbody td:nth-child(2) .cell-subtitle {
    display: inline-block !important;
    font-size: 10.5px !important;
    color: #64748b !important;
    margin-top: 2px !important;
  }
  .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(2) .cell-subtitle,
  .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(2) .cell-subtitle {
    display: none !important;
  }
  html[data-mode="dark"] .table-responsive.mode-card-view table.dataTable tbody td:nth-child(2) .cell-subtitle {
    color: #94a3b8 !important;
  }

  /* Universal 3-dots Action Dropdown (Last Column) in Card View */
  .table-responsive.mode-card-view:not(.is-hasilsurvey-table):not(.is-survey-table):not(.is-hasiltes-table) table.dataTable tbody td:last-child,
  .table-responsive.mode-card-view:not(.is-hasilsurvey-table):not(.is-survey-table):not(.is-hasiltes-table) table.table tbody td:last-child {
    display: block !important;
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    min-width: 0 !important;
    width: auto !important;
    z-index: 10 !important;
  }

  /* Elevate z-index when dropdown is open so it renders above all cards */
  .table-responsive.mode-card-view table.dataTable tbody tr:has(.dropdown.show),
  .table-responsive.mode-card-view table.table tbody tr:has(.dropdown.show),
  .table-responsive.mode-card-view table.dataTable tbody td:last-child:has(.dropdown.show),
  .table-responsive.mode-card-view table.table tbody td:last-child:has(.dropdown.show),
  .table-responsive.mode-card-view table.dataTable tbody td:last-child .dropdown.show,
  .table-responsive.mode-card-view table.table tbody td:last-child .dropdown.show {
    z-index: 1050 !important;
  }

  /* 3-dots Toggle Trigger Button ONLY (Direct child of .dropdown) */
  .table-responsive.mode-card-view table.dataTable tbody td:last-child .dropdown > a,
  .table-responsive.mode-card-view table.dataTable tbody td:last-child .dropdown > a.text-lighter,
  .table-responsive.mode-card-view table.dataTable tbody td:last-child .dropdown > button,
  .table-responsive.mode-card-view table.table tbody td:last-child .dropdown > a,
  .table-responsive.mode-card-view table.table tbody td:last-child .dropdown > a.text-lighter,
  .table-responsive.mode-card-view table.table tbody td:last-child .dropdown > button {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
  }
  .table-responsive.mode-card-view table.dataTable tbody td:last-child .dropdown > a:hover,
  .table-responsive.mode-card-view table.dataTable tbody td:last-child .dropdown > button:hover,
  .table-responsive.mode-card-view table.table tbody td:last-child .dropdown > a:hover,
  .table-responsive.mode-card-view table.table tbody td:last-child .dropdown > button:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
  }
  html[data-mode="dark"] .table-responsive.mode-card-view table.dataTable tbody td:last-child .dropdown > a,
  html[data-mode="dark"] .table-responsive.mode-card-view table.table tbody td:last-child .dropdown > a,
  html[data-mode="dark"] .table-responsive.mode-card-view table.dataTable tbody td:last-child .dropdown > button,
  html[data-mode="dark"] .table-responsive.mode-card-view table.table tbody td:last-child .dropdown > button {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #94a3b8 !important;
  }
  html[data-mode="dark"] .table-responsive.mode-card-view table.dataTable tbody td:last-child .dropdown > a:hover,
  html[data-mode="dark"] .table-responsive.mode-card-view table.table tbody td:last-child .dropdown > a:hover,
  html[data-mode="dark"] .table-responsive.mode-card-view table.dataTable tbody td:last-child .dropdown > button:hover,
  html[data-mode="dark"] .table-responsive.mode-card-view table.table tbody td:last-child .dropdown > button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #f1f5f9 !important;
  }

  /* Universal Dropdown Menu in Card View */
  .table-responsive.mode-card-view table.dataTable tbody td:last-child .dropdown .dropdown-menu,
  .table-responsive.mode-card-view table.table tbody td:last-child .dropdown .dropdown-menu,
  .table-responsive.mode-card-view .dropdown-menu {
    min-width: 170px !important;
    width: max-content !important;
    max-width: 260px !important;
    padding: 6px !important;
    margin: 4px 0 0 0 !important;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08) !important;
    z-index: 1060 !important;
  }
  .table-responsive.mode-card-view .dropdown-menu.dropdown-menu-right {
    right: 0 !important;
    left: auto !important;
  }

  /* Universal Dropdown Item in Card View - Full Width, Clean, Non-Bubble */
  .table-responsive.mode-card-view table.dataTable tbody td:last-child .dropdown .dropdown-menu a.dropdown-item,
  .table-responsive.mode-card-view table.dataTable tbody td:last-child .dropdown .dropdown-menu button.dropdown-item,
  .table-responsive.mode-card-view table.table tbody td:last-child .dropdown .dropdown-menu a.dropdown-item,
  .table-responsive.mode-card-view table.table tbody td:last-child .dropdown .dropdown-menu button.dropdown-item,
  .table-responsive.mode-card-view .dropdown-menu a.dropdown-item,
  .table-responsive.mode-card-view .dropdown-menu button.dropdown-item {
    width: 100% !important;
    height: auto !important;
    min-height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #334155 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    gap: 8px !important;
    text-align: left !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease, color 0.15s ease !important;
  }
  .table-responsive.mode-card-view .dropdown-menu a.dropdown-item:hover,
  .table-responsive.mode-card-view .dropdown-menu a.dropdown-item:focus {
    background-color: #f1f5f9 !important;
    color: #0284c7 !important;
  }
  .table-responsive.mode-card-view .dropdown-menu a.dropdown-item.delete:hover,
  .table-responsive.mode-card-view .dropdown-menu a.dropdown-item.text-danger:hover {
    background-color: #fef2f2 !important;
    color: #ef4444 !important;
  }
  .table-responsive.mode-card-view .dropdown-menu .dropdown-item i {
    width: 16px !important;
    font-size: 13px !important;
    text-align: center !important;
    margin-right: 6px !important;
    flex-shrink: 0 !important;
    color: #64748b !important;
  }
  .table-responsive.mode-card-view .dropdown-menu a.dropdown-item:hover i {
    color: inherit !important;
  }
  .table-responsive.mode-card-view .dropdown-menu .dropdown-divider {
    margin: 4px 0 !important;
    border-top: 1px solid #f1f5f9 !important;
  }

  /* Dark mode support */
  html[data-mode="dark"] .table-responsive.mode-card-view table.dataTable tbody td:last-child .dropdown .dropdown-menu,
  html[data-mode="dark"] .table-responsive.mode-card-view table.table tbody td:last-child .dropdown .dropdown-menu,
  html[data-mode="dark"] .table-responsive.mode-card-view .dropdown-menu {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
  }
  html[data-mode="dark"] .table-responsive.mode-card-view .dropdown-menu a.dropdown-item {
    color: #cbd5e1 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
  }
  html[data-mode="dark"] .table-responsive.mode-card-view .dropdown-menu a.dropdown-item:hover,
  html[data-mode="dark"] .table-responsive.mode-card-view .dropdown-menu a.dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #38bdf8 !important;
  }
  html[data-mode="dark"] .table-responsive.mode-card-view .dropdown-menu a.dropdown-item.delete:hover {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
  }
  html[data-mode="dark"] .table-responsive.mode-card-view .dropdown-menu .dropdown-divider {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
  }
  html[data-mode="dark"] .table-responsive.mode-card-view .dropdown-menu .dropdown-item i {
    color: #94a3b8 !important;
  }

    /* --------------------------------------------------------------------------
   A. SISWA & GURU UNIFIED CARD VIEW (.is-siswa-table, .is-guru-table)
   Siswa Cols: 1:Check, 2:Nama, 3:NISN, 4:NIS, 5:Kelas,    6:Kontak, 7:Aktif, 8:Aksi
   Guru Cols:  1:Check, 2:Nama, 3:NBM,  4:JK,  5:Username, 6:Kontak, 7:ID,    8:Aktif, 9:Aksi
   Architecture: Unified 48px/46px Left Guide - Immune to wrapping misalignment
   -------------------------------------------------------------------------- */

/* 1. Universal Card Container (Identical for Siswa & Guru) */
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody tr,
.table-responsive.is-siswa-table.mode-card-view table.table tbody tr,
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody tr,
.table-responsive.is-guru-table.mode-card-view table.table tbody tr {
  display: block !important;
  position: relative !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 13px 15px 13px 48px !important; /* Unified 48px left guide */
  margin-bottom: 12px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  contain: layout style !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
  box-sizing: border-box !important;
}
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody tr:hover,
.table-responsive.is-siswa-table.mode-card-view table.table tbody tr:hover,
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody tr:hover,
.table-responsive.is-guru-table.mode-card-view table.table tbody tr:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08) !important;
  border-color: #cbd5e1 !important;
}
html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody tr,
html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.table tbody tr,
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.dataTable tbody tr,
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.table tbody tr {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* 2. Checkbox Top-Left (Identical for Siswa & Guru) */
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:first-child,
.table-responsive.is-siswa-table.mode-card-view table.table tbody td:first-child,
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:first-child,
.table-responsive.is-guru-table.mode-card-view table.table tbody td:first-child {
  position: absolute !important;
  top: 13px !important;
  left: 13px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  width: auto !important;
  z-index: 5 !important;
}

/* 3. Person Name Header (Identical for Siswa & Guru) */
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(2),
.table-responsive.is-siswa-table.mode-card-view table.table tbody td:nth-child(2),
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(2),
.table-responsive.is-guru-table.mode-card-view table.table tbody td:nth-child(2) {
  display: block !important;
  padding: 0 84px 3px 0 !important; /* 84px safe clearance for Status button + 3-dots */
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border: none !important;
}
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(2) a.cell-primary-title,
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(2) a,
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(2) a.cell-primary-title,
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(2) a {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  line-height: 1.35 !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(2) a:hover,
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(2) a:hover {
  color: #059669 !important;
}
html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(2) a,
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(2) a {
  color: #f8fafc !important;
}
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(2) .cell-subtitle,
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(2) .cell-subtitle {
  display: none !important;
}

/* 4. Status Aktif Button (top-right next to 3-dots) */
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7),
.table-responsive.is-siswa-table.mode-card-view table.table tbody td:nth-child(7),
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8),
.table-responsive.is-guru-table.mode-card-view table.table tbody td:nth-child(8) {
  display: inline-flex !important;
  align-items: center !important;
  position: absolute !important;
  top: 15px !important;
  right: 50px !important; /* 8px clean separation from 3-dots button (at right: 12px, width: 30px) */
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  width: auto !important;
  min-width: 0 !important;
  z-index: 5 !important;
}
/* ==========================================================================
   MINIMALIST CLEAN STATUS INDICATORS (AKTIF / NON-AKTIF)
   Replaces heavy bulky badges with clean borderless text + status indicator dot
   ========================================================================== */

/* 1. AKTIF (Card View & Table View) */
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7) .btn,
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8) .btn,
.table-responsive.is-siswa-table.mode-card-view table.table tbody td:nth-child(7) .btn,
.table-responsive.is-guru-table.mode-card-view table.table tbody td:nth-child(8) .btn,
table td a.btn.btn-xs.btn-success.confirm,
table td .btn.btn-xs.btn-success.confirm,
table td a.btn.btn-xs.btn-success.btn-toggle-aktif,
table td .btn.btn-xs.btn-success.btn-toggle-aktif,
.btn.btn-xs.btn-success.confirm,
.btn.btn-xs.btn-success.btn-toggle-aktif {
  background: transparent !important;
  color: #059669 !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  letter-spacing: normal !important;
  text-transform: capitalize !important;
  padding: 3px 6px !important;
  border-radius: 6px !important;
  min-height: auto !important;
  height: auto !important;
  max-height: none !important;
  line-height: 1.3 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  cursor: pointer !important;
  transition: background 0.15s ease, color 0.15s ease !important;
  text-decoration: none !important;
}

/* Subtle Indicator Dot for Aktif */
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7) .btn::before,
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8) .btn::before,
.table-responsive.is-siswa-table.mode-card-view table.table tbody td:nth-child(7) .btn::before,
.table-responsive.is-guru-table.mode-card-view table.table tbody td:nth-child(8) .btn::before,
table td a.btn.btn-xs.btn-success.confirm::before,
table td .btn.btn-xs.btn-success.confirm::before,
table td a.btn.btn-xs.btn-success.btn-toggle-aktif::before,
table td .btn.btn-xs.btn-success.btn-toggle-aktif::before,
.btn.btn-xs.btn-success.confirm::before,
.btn.btn-xs.btn-success.btn-toggle-aktif::before {
  content: '' !important;
  display: inline-block !important;
  width: 6.5px !important;
  height: 6.5px !important;
  border-radius: 50% !important;
  background-color: #10b981 !important;
  box-shadow: none !important;
  animation: none !important;
  flex-shrink: 0 !important;
}

/* Hover for Aktif */
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7) .btn:hover,
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8) .btn:hover,
table td a.btn.btn-xs.btn-success.confirm:hover,
table td .btn.btn-xs.btn-success.confirm:hover,
table td a.btn.btn-xs.btn-success.btn-toggle-aktif:hover,
table td .btn.btn-xs.btn-success.btn-toggle-aktif:hover,
.btn.btn-xs.btn-success.confirm:hover,
.btn.btn-xs.btn-success.btn-toggle-aktif:hover {
  background: rgba(16, 185, 129, 0.08) !important;
  color: #047857 !important;
  box-shadow: none !important;
  transform: none !important;
}

/* 2. NON-AKTIF (Card View & Table View) */
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7) .btn.btn-danger,
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8) .btn.btn-danger,
.table-responsive.is-siswa-table.mode-card-view table.table tbody td:nth-child(7) .btn.btn-danger,
.table-responsive.is-guru-table.mode-card-view table.table tbody td:nth-child(8) .btn.btn-danger,
table:not(.is-hasiltes-table) td a.btn.btn-xs.btn-danger.confirm:not(.btn-action-hapus),
table:not(.is-hasiltes-table) td .btn.btn-xs.btn-danger.confirm:not(.btn-action-hapus),
table:not(.is-hasiltes-table) td a.btn.btn-xs.btn-danger.btn-toggle-aktif,
table:not(.is-hasiltes-table) td .btn.btn-xs.btn-danger.btn-toggle-aktif,
.table-responsive.is-siswa-table .btn.btn-xs.btn-danger.confirm,
.table-responsive.is-guru-table .btn.btn-xs.btn-danger.confirm,
.btn.btn-xs.btn-danger.btn-toggle-aktif {
  background: transparent !important;
  color: #dc2626 !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  letter-spacing: normal !important;
  text-transform: capitalize !important;
  padding: 3px 6px !important;
  border-radius: 6px !important;
  min-height: auto !important;
  height: auto !important;
  max-height: none !important;
  line-height: 1.3 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  cursor: pointer !important;
  transition: background 0.15s ease, color 0.15s ease !important;
  text-decoration: none !important;
}

/* Subtle Indicator Dot for Non-Aktif */
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7) .btn.btn-danger::before,
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8) .btn.btn-danger::before,
.table-responsive.is-siswa-table.mode-card-view table.table tbody td:nth-child(7) .btn.btn-danger::before,
.table-responsive.is-guru-table.mode-card-view table.table tbody td:nth-child(8) .btn.btn-danger::before,
table:not(.is-hasiltes-table) td a.btn.btn-xs.btn-danger.confirm:not(.btn-action-hapus)::before,
table:not(.is-hasiltes-table) td .btn.btn-xs.btn-danger.confirm:not(.btn-action-hapus)::before,
table:not(.is-hasiltes-table) td a.btn.btn-xs.btn-danger.btn-toggle-aktif::before,
table:not(.is-hasiltes-table) td .btn.btn-xs.btn-danger.btn-toggle-aktif::before,
.table-responsive.is-siswa-table .btn.btn-xs.btn-danger.confirm::before,
.table-responsive.is-guru-table .btn.btn-xs.btn-danger.confirm::before,
.btn.btn-xs.btn-danger.btn-toggle-aktif::before {
  content: '' !important;
  display: inline-block !important;
  width: 6.5px !important;
  height: 6.5px !important;
  border-radius: 50% !important;
  background-color: #ef4444 !important;
  box-shadow: none !important;
  animation: none !important;
  flex-shrink: 0 !important;
}

/* Hover for Non-Aktif */
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7) .btn.btn-danger:hover,
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8) .btn.btn-danger:hover,
table:not(.is-hasiltes-table) td a.btn.btn-xs.btn-danger.confirm:not(.btn-action-hapus):hover,
table:not(.is-hasiltes-table) td .btn.btn-xs.btn-danger.confirm:not(.btn-action-hapus):hover,
table:not(.is-hasiltes-table) td a.btn.btn-xs.btn-danger.btn-toggle-aktif:hover,
table:not(.is-hasiltes-table) td .btn.btn-xs.btn-danger.btn-toggle-aktif:hover,
.table-responsive.is-siswa-table .btn.btn-xs.btn-danger.confirm:hover,
.table-responsive.is-guru-table .btn.btn-xs.btn-danger.confirm:hover,
.btn.btn-xs.btn-danger.btn-toggle-aktif:hover {
  background: rgba(239, 68, 68, 0.08) !important;
  color: #b91c1c !important;
  box-shadow: none !important;
  transform: none !important;
}

/* 3. DARK MODE STATUS INDICATORS */
html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7) .btn,
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8) .btn,
html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.table tbody td:nth-child(7) .btn,
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.table tbody td:nth-child(8) .btn,
html[data-mode="dark"] table td a.btn.btn-xs.btn-success.confirm,
html[data-mode="dark"] table td .btn.btn-xs.btn-success.confirm,
html[data-mode="dark"] table td a.btn.btn-xs.btn-success.btn-toggle-aktif,
html[data-mode="dark"] table td .btn.btn-xs.btn-success.btn-toggle-aktif,
html[data-mode="dark"] .btn.btn-xs.btn-success.confirm,
html[data-mode="dark"] .btn.btn-xs.btn-success.btn-toggle-aktif {
  background: transparent !important;
  color: #34d399 !important;
  border: none !important;
  box-shadow: none !important;
}
html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7) .btn::before,
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8) .btn::before,
html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.table tbody td:nth-child(7) .btn::before,
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.table tbody td:nth-child(8) .btn::before,
html[data-mode="dark"] table td a.btn.btn-xs.btn-success.confirm::before,
html[data-mode="dark"] table td .btn.btn-xs.btn-success.confirm::before,
html[data-mode="dark"] table td a.btn.btn-xs.btn-success.btn-toggle-aktif::before,
html[data-mode="dark"] table td .btn.btn-xs.btn-success.btn-toggle-aktif::before,
html[data-mode="dark"] .btn.btn-xs.btn-success.confirm::before,
html[data-mode="dark"] .btn.btn-xs.btn-success.btn-toggle-aktif::before {
  background-color: #34d399 !important;
  box-shadow: none !important;
}
html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7) .btn:hover,
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8) .btn:hover,
html[data-mode="dark"] table td a.btn.btn-xs.btn-success.confirm:hover,
html[data-mode="dark"] table td .btn.btn-xs.btn-success.confirm:hover,
html[data-mode="dark"] table td a.btn.btn-xs.btn-success.btn-toggle-aktif:hover,
html[data-mode="dark"] table td .btn.btn-xs.btn-success.btn-toggle-aktif:hover,
html[data-mode="dark"] .btn.btn-xs.btn-success.confirm:hover,
html[data-mode="dark"] .btn.btn-xs.btn-success.btn-toggle-aktif:hover {
  background: rgba(52, 211, 153, 0.12) !important;
  color: #6ee7b7 !important;
}

html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7) .btn.btn-danger,
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8) .btn.btn-danger,
html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.table tbody td:nth-child(7) .btn.btn-danger,
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.table tbody td:nth-child(8) .btn.btn-danger,
html[data-mode="dark"] table td a.btn.btn-xs.btn-danger.confirm,
html[data-mode="dark"] table td .btn.btn-xs.btn-danger.confirm,
html[data-mode="dark"] table td a.btn.btn-xs.btn-danger.btn-toggle-aktif,
html[data-mode="dark"] table td .btn.btn-xs.btn-danger.btn-toggle-aktif,
html[data-mode="dark"] .btn.btn-xs.btn-danger.confirm,
html[data-mode="dark"] .btn.btn-xs.btn-danger.btn-toggle-aktif {
  background: transparent !important;
  color: #f87171 !important;
  border: none !important;
  box-shadow: none !important;
}
html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7) .btn.btn-danger::before,
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8) .btn.btn-danger::before,
html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.table tbody td:nth-child(7) .btn.btn-danger::before,
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.table tbody td:nth-child(8) .btn.btn-danger::before,
html[data-mode="dark"] table td a.btn.btn-xs.btn-danger.confirm::before,
html[data-mode="dark"] table td .btn.btn-xs.btn-danger.confirm::before,
html[data-mode="dark"] table td a.btn.btn-xs.btn-danger.btn-toggle-aktif::before,
html[data-mode="dark"] table td .btn.btn-xs.btn-danger.btn-toggle-aktif::before,
html[data-mode="dark"] .btn.btn-xs.btn-danger.confirm::before,
html[data-mode="dark"] .btn.btn-xs.btn-danger.btn-toggle-aktif::before {
  background-color: #f87171 !important;
  box-shadow: none !important;
}
html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7) .btn.btn-danger:hover,
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8) .btn.btn-danger:hover,
html[data-mode="dark"] table td a.btn.btn-xs.btn-danger.confirm:hover,
html[data-mode="dark"] table td .btn.btn-xs.btn-danger.confirm:hover,
html[data-mode="dark"] table td a.btn.btn-xs.btn-danger.btn-toggle-aktif:hover,
html[data-mode="dark"] table td .btn.btn-xs.btn-danger.btn-toggle-aktif:hover,
html[data-mode="dark"] .btn.btn-xs.btn-danger.confirm:hover,
html[data-mode="dark"] .btn.btn-xs.btn-danger.btn-toggle-aktif:hover {
  background: rgba(248, 113, 113, 0.12) !important;
  color: #fca5a5 !important;
}

/* 5. 3-dots Menu Button (top-right) */
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:last-child,
.table-responsive.is-siswa-table.mode-card-view table.table tbody td:last-child,
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:last-child,
.table-responsive.is-guru-table.mode-card-view table.table tbody td:last-child {
  display: block !important;
  position: absolute !important;
  top: 11px !important;
  right: 10px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  z-index: 10 !important;
}

/* 6. --- SISWA METADATA: NISN + NIS + Kelas --- */
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(3),
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(4),
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(5) {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 11.5px !important;
  color: #64748b !important;
  padding: 0 !important;
  margin: 1px 8px 4px 0 !important;
  vertical-align: middle !important;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  background: transparent !important;
}
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(3)::before {
  content: 'NISN: ';
  font-weight: 600;
  color: #94a3b8;
  margin-right: 2px;
}
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(4)::before {
  content: 'NIS: ';
  font-weight: 600;
  color: #94a3b8;
  margin-right: 2px;
}
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(5)::before {
  content: 'Kelas: ';
  font-weight: 600;
  color: #94a3b8;
  margin-right: 2px;
}

/* 7. --- GURU METADATA: NBM + JK + Username --- */
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(3),
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(4),
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(5) {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 11.5px !important;
  color: #64748b !important;
  padding: 0 !important;
  margin: 1px 8px 4px 0 !important;
  vertical-align: middle !important;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  background: transparent !important;
}
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(3)::before {
  content: 'NBM: ';
  font-weight: 600;
  color: #94a3b8;
  margin-right: 2px;
}
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(4)::before {
  content: 'JK: ';
  font-weight: 600;
  color: #94a3b8;
  margin-right: 2px;
}
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(5) {
  max-width: 160px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(5)::before {
  content: 'User: ';
  font-weight: 600;
  color: #94a3b8;
  margin-right: 2px;
}
/* Guru Col 7: ID (Hidden in Card View) */
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(7) {
  display: none !important;
}

html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(3),
html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(4),
html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(5),
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(3),
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(4),
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(5) {
  color: #cbd5e1 !important;
}

/* 8. Card Divider & Kontak Section (Identical Col 6 for Siswa & Guru) */
.table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(6),
.table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(6) {
  display: block !important;
  clear: both !important;
  font-size: 11.5px !important;
  padding: 7px 0 0 0 !important;
  margin: 6px 0 0 -34px !important;
  padding-left: 34px !important;
  border-top: 1px solid #f1f5f9 !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
  line-height: 1.5 !important;
  color: #64748b !important;
  width: calc(100% + 34px) !important;
  box-sizing: border-box !important;
}
html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(6),
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(6) {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
}
.table-responsive.is-siswa-table.mode-card-view .kontak-line,
.table-responsive.is-guru-table.mode-card-view .kontak-line {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-bottom: 3px !important;
}
.table-responsive.is-siswa-table.mode-card-view .kontak-lbl,
.table-responsive.is-guru-table.mode-card-view .kontak-lbl {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #94a3b8 !important;
  min-width: 48px !important;
  flex-shrink: 0 !important;
}
.table-responsive.is-siswa-table.mode-card-view .kontak-phone,
.table-responsive.is-guru-table.mode-card-view .kontak-phone {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  text-decoration: none !important;
  max-width: 190px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.table-responsive.is-siswa-table.mode-card-view .kontak-phone:hover,
.table-responsive.is-guru-table.mode-card-view .kontak-phone:hover {
  color: #059669 !important;
}
html[data-mode="dark"] .table-responsive.is-siswa-table.mode-card-view .kontak-phone,
html[data-mode="dark"] .table-responsive.is-guru-table.mode-card-view .kontak-phone {
  color: #f8fafc !important;
}
.table-responsive.is-siswa-table.mode-card-view .badge-whatsapp,
.table-responsive.is-guru-table.mode-card-view .badge-whatsapp {
  background: #25D366 !important;
  color: #ffffff !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  border-radius: 50% !important;
  font-size: 13px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-left: 6px !important;
  padding: 0 !important;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(37, 211, 102, 0.4) !important;
  vertical-align: middle !important;
}

/* ==========================================================================
   MOBILE & IPHONE VIEWPORT SPECIALIZATION (<= 480px, e.g. iPhone, Galaxy S/A)
   ========================================================================== */
@media (max-width: 480px) {
  .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody tr,
  .table-responsive.is-siswa-table.mode-card-view table.table tbody tr,
  .table-responsive.is-guru-table.mode-card-view table.dataTable tbody tr,
  .table-responsive.is-guru-table.mode-card-view table.table tbody tr {
    padding: 12px 14px 12px 46px !important; /* Unified 46px left guide */
    margin-bottom: 11px !important;
    border-radius: 12px !important;
  }

  .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:first-child,
  .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:first-child {
    top: 12px !important;
    left: 12px !important;
  }

  .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:last-child,
  .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:last-child {
    top: 10px !important;
    right: 10px !important;
  }

  .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7),
  .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8) {
    top: 11px !important;
    right: 34px !important;
  }
  .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(7) .btn,
  .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(8) .btn {
    font-size: 9.5px !important;
    padding: 2px 7px !important;
    border-radius: 10px !important;
  }

  /* Name Header */
  .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(2),
  .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(2) {
    padding: 0 76px 3px 0 !important;
  }
  .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(2) a,
  .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(2) a {
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

  /* Metadata: Col 3, 4, 5 (Unified on Line 2, wraps with identical 46px left guide) */
  .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(3),
  .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(3),
  .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(4),
  .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(4),
  .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(5),
  .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(5) {
    font-size: 11px !important;
    margin: 1px 7px 2px 0 !important;
    max-width: 150px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* Solid Divider & Kontak */
  .table-responsive.is-siswa-table.mode-card-view table.dataTable tbody td:nth-child(6),
  .table-responsive.is-guru-table.mode-card-view table.dataTable tbody td:nth-child(6) {
    margin: 6px 0 0 -32px !important;
    padding: 7px 0 0 32px !important;
    width: calc(100% + 32px) !important;
  }
  .table-responsive.is-siswa-table.mode-card-view .kontak-lbl,
  .table-responsive.is-guru-table.mode-card-view .kontak-lbl {
    font-size: 10.5px !important;
    min-width: 44px !important;
  }
  .table-responsive.is-siswa-table.mode-card-view .kontak-phone,
  .table-responsive.is-guru-table.mode-card-view .kontak-phone {
    font-size: 11.5px !important;
    max-width: 175px !important;
  }
}

/* ==========================================================================
   ZERO-JANK NATIVE MOBILE CARD VIEW (Pure CSS on width < 992px)
   ========================================================================== */
@media (max-width: 991px) {
  /* Siswa & Guru Tables render as Cards instantly on mobile before JS executes */
  .table-responsive.is-siswa-table:not(.mode-table-view) table.dataTable thead,
  .table-responsive.is-siswa-table:not(.mode-table-view) table.table thead,
  .table-responsive.is-guru-table:not(.mode-table-view) table.dataTable thead,
  .table-responsive.is-guru-table:not(.mode-table-view) table.table thead {
    display: none !important;
  }

  .table-responsive.is-siswa-table:not(.mode-table-view) table.dataTable tbody,
  .table-responsive.is-siswa-table:not(.mode-table-view) table.table tbody,
  .table-responsive.is-guru-table:not(.mode-table-view) table.dataTable tbody,
  .table-responsive.is-guru-table:not(.mode-table-view) table.table tbody {
    display: block !important;
    gap: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}


/* 3. UNIVERSAL MOBILE TABLE VIEW (.mode-table-view & ALL STANDARD TABLES) */
@media (max-width: 991px) {
  .table-responsive,
  .table-responsive.mode-table-view {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    max-width: 100% !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    margin-bottom: 14px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
  }
  html[data-mode="dark"] .table-responsive,
  html[data-mode="dark"] .table-responsive.mode-table-view {
    background: var(--t-surface, #1e293b) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }

  /* Table layout: Compact (<= 4 cols) fits 100%, Wide (>= 5 cols) scrolls smoothly */
  .table-responsive table.dataTable,
  .table-responsive table.table {
    width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }
  .table-responsive.mode-table-view table.dataTable {
    min-width: 720px !important;
  }

  .table-responsive table th,
  .table-responsive table td {
    padding: 10px 12px !important;
    font-size: 13px !important;
    vertical-align: middle !important;
    border-top: 1px solid #f1f5f9 !important;
  }
  html[data-mode="dark"] .table-responsive table th,
  html[data-mode="dark"] .table-responsive table td {
    border-top-color: rgba(255, 255, 255, 0.06) !important;
    color: #e2e8f0 !important;
  }

  .table-responsive table thead th {
    background: #f8fafc !important;
    border-bottom: 1.5px solid #e2e8f0 !important;
    border-top: none !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #475569 !important;
    white-space: nowrap !important;
  }
  html[data-mode="dark"] .table-responsive table thead th {
    background: rgba(255, 255, 255, 0.04) !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
  }

  /* Sticky First Column (Checkbox) */
  .table-responsive.mode-table-view table.dataTable th:first-child,
  .table-responsive.mode-table-view table.dataTable td:first-child {
    position: sticky !important;
    left: 0 !important;
    background: #ffffff !important;
    z-index: 5 !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    padding: 6px 4px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
  html[data-mode="dark"] .table-responsive.mode-table-view table.dataTable th:first-child,
  html[data-mode="dark"] .table-responsive.mode-table-view table.dataTable td:first-child {
    background: var(--t-surface, #1e293b) !important;
  }

  /* Sticky Second Column (Name) - Compact Ergonomic Width & Sizing */
  .table-responsive.mode-table-view table.dataTable th:nth-child(2),
  .table-responsive.mode-table-view table.dataTable td:nth-child(2) {
    position: sticky !important;
    left: 36px !important;
    background: #ffffff !important;
    z-index: 5 !important;
    box-shadow: 3px 0 6px -2px rgba(15, 23, 42, 0.08) !important;
    width: 125px !important;
    min-width: 110px !important;
    max-width: 135px !important;
    padding: 6px 8px !important;
    white-space: normal !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
  }
  .table-responsive.mode-table-view table.dataTable td:nth-child(2) a.cell-primary-title,
  .table-responsive.mode-table-view table.dataTable td:nth-child(2) a {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    display: block !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
  .table-responsive.mode-table-view table.dataTable td:nth-child(2) .cell-subtitle {
    font-size: 9.5px !important;
    color: #64748b !important;
    display: block !important;
    line-height: 1.2 !important;
    margin-top: 1px !important;
  }
  html[data-mode="dark"] .table-responsive.mode-table-view table.dataTable th:nth-child(2),
  html[data-mode="dark"] .table-responsive.mode-table-view table.dataTable td:nth-child(2) {
    background: var(--t-surface, #1e293b) !important;
    box-shadow: 3px 0 8px -2px rgba(0, 0, 0, 0.4) !important;
  }
  .table-responsive.mode-table-view table.dataTable thead th:first-child,
  .table-responsive.mode-table-view table.dataTable thead th:nth-child(2) {
    background: #f8fafc !important;
    z-index: 7 !important;
  }
  html[data-mode="dark"] .table-responsive.mode-table-view table.dataTable thead th:first-child,
  html[data-mode="dark"] .table-responsive.mode-table-view table.dataTable thead th:nth-child(2) {
    background: #1e293b !important;
  }
  .table-responsive.mode-table-view table.dataTable tr:hover td:first-child,
  .table-responsive.mode-table-view table.dataTable tr:hover td:nth-child(2) {
    background: #f8fafc !important;
  }
  html[data-mode="dark"] .table-responsive.mode-table-view table.dataTable tr:hover td:first-child,
  html[data-mode="dark"] .table-responsive.mode-table-view table.dataTable tr:hover td:nth-child(2) {
    background: rgba(255, 255, 255, 0.05) !important;
  }

  /* Bottom Clearance for Floating Action Button (FAB) */
  .card-body.table-responsive {
    padding-bottom: 95px !important;
  }
  .dataTables_wrapper .dataTables_paginate {
    padding-bottom: 25px !important;
  }
}

/* ==========================================================================
   5. LBSOAL (LATIHAN & TES) MODERN ACADEMIC CARDS
   ========================================================================== */
.lbsoal-filter-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  padding: 20px 22px !important;
  margin-bottom: 22px !important;
}

.lbsoal-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #eff6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #2563eb;
  flex-shrink: 0;
}

.lbsoal-filter-form label {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.lbsoal-filter-form .form-control {
  height: 38px !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  font-size: 13px !important;
  color: #1e293b !important;
  box-shadow: none !important;
}
.lbsoal-filter-form .form-control:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

/* Card Grid */
.lbsoal-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

@media (max-width: 991px) {
  .lbsoal-card-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Individual Card */
.lbsoal-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 18px 20px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.lbsoal-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1 !important;
  box-shadow: 0 8px 22px -4px rgba(15, 23, 42, 0.08) !important;
}

/* Top bar badges */
.lbsoal-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.lbsoal-badges-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.lbsoal-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  line-height: 1.3;
}

.lbsoal-pill-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.lbsoal-pill-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.lbsoal-pill-danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.lbsoal-pill-running {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.lbsoal-pill-muted {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.lbsoal-pill-scope {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.lbsoal-pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #2563eb;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 rgba(37, 99, 235, 0.4);
  animation: pulse-dot 1.8s infinite;
}

/* Card 3-dots Menu */
.lbsoal-opt-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s ease;
}
.lbsoal-opt-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Title & Header */
.lbsoal-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin: 0 0 6px 0;
}
.lbsoal-card-title a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.15s ease;
}
.lbsoal-card-title a:hover {
  color: #2563eb;
}

.lbsoal-code-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 2px 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lbsoal-mapel-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 5px;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lbsoal-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.5;
  margin: 6px 0 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Classes tags */
.lbsoal-classes-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.lbsoal-tag-kelas {
  font-size: 11px;
  font-weight: 600;
  color: #1e293b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px 7px;
  line-height: 1.3;
}

/* Schedule */
.lbsoal-schedule-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 12px;
}
.lbsoal-schedule-item {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: #334155;
  font-weight: 500;
}
.lbsoal-schedule-item i {
  color: #64748b;
  font-size: 13px;
}
.lbsoal-sesi-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border-radius: 4px;
  padding: 1px 5px;
}

/* Quick Metrics Strip */
.lbsoal-metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.lbsoal-metric-col {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lbsoal-metric-col strong {
  color: #0f172a;
}
.lbsoal-metric-col i {
  font-size: 13px;
  flex-shrink: 0;
}

/* Card Footer */
.lbsoal-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}
.lbsoal-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lbsoal-btn-action {
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 6px 13px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.badge-pelangi, .bg-pelangi, .btn-pelangi { 
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
  color: #ffffff !important;
}
.text-rainbow {
  color: #2563eb !important;
}

/* ==========================================================================
   6. COMPREHENSIVE MOBILE FIRST ACADEMIC SYSTEM
   - 100% Native Mobile Scaling
   - iOS Auto-Zoom Prevention (16px form inputs)
   - Bottom Dock Safe-Area Clearance
   - Zero Horizontal Body Clipping
   - Mobile Touch Targets & Micro-interactions
   ========================================================================== */

/* Universal Viewport & Horizontal Overflow Shield */
html, body {
  overflow-x: clip !important;
  position: relative;
}

@media (max-width: 991px) {
  /* 1. Body & Content Safe Bottom Clearance (Prevents bottom nav overlap) */
  body,
  .main-container,
  .main-content,
  main,
  #app-main {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* 2. Mobile Bottom Navigation Dock Safe Area */
  .mobile-bottom-nav {
    padding-bottom: max(6px, env(safe-area-inset-bottom, 0px)) !important;
    height: auto !important;
  }

  /* 3. Floating Action Button (FAB) Suppressed */
  .fab.fab-fixed, .btn-float {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* 4. Form Control Ergonomics & iOS Auto-Zoom Prevention */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  input[type="search"],
  input[type="tel"],
  input[type="url"],
  select,
  textarea,
  .form-control {
    font-size: 13px !important;
    border-radius: 8px !important;
  }
  /* Discussion Composer & Reply Input Ergonomics on Mobile */
  textarea.diskusi-composer-textarea {
    font-size: 13px !important;
    line-height: 1.45 !important;
    border-radius: 12px !important;
    padding: 10px 12px !important;
  }
  .diskusi-reply-capsule {
    padding: 3px 5px 3px 12px !important;
    min-width: 0 !important;
  }
  .diskusi-reply-capsule input,
  .diskusi-reply-capsule input[type="text"] {
    font-size: 12px !important;
    line-height: 1.3 !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: 3px 0 !important;
  }
  .diskusi-reply-capsule input::placeholder {
    font-size: 11.5px !important;
    color: #94a3b8 !important;
  }


  /* 5. Touch Targets (Minimum 38-44px for comfortable tapping) */
  .btn {
    min-height: 38px;
    touch-action: manipulation;
  }
  .btn-sm {
    min-height: 32px;
  }
  .topbar-btn.sidebar-toggler {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border-radius: 10px !important;
  }

  /* 6. Topbar Mobile Cleanliness */
  .topbar {
    height: 54px !important;
    min-height: 54px !important;
    padding: 0 14px !important;
  }
  .topbar-page-title {
    font-size: 15px !important;
    max-width: 48vw !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* 7. Mobile Modal Full-width Comfort */
  .modal-dialog {
    margin: 10px !important;
    max-width: calc(100vw - 20px) !important;
  }
  .modal-content {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 20px 45px rgba(0,0,0,0.2) !important;
  }

  /* 8. Card Grid Responsive Column Defaults */
  .card,
  .card.card-welcome-hero {
    border-radius: 16px !important;
    margin-bottom: 12px !important;
  }

  /* 9. Mobile Table Touch Scroll Smoothness */
  .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 0 !important;
  }
}

/* ==========================================================================
   7. UNIVERSAL MOBILE-FIRST TABLE ARCHITECTURE (ALL TABLES)
   ========================================================================== */

/* Universal Scroll Hint Pill */
.mobile-table-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 6px;
  padding: 0 2px;
}
.scroll-hint-pill {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  letter-spacing: 0.2px;
}

/* Global DataTables Pagination Clean Fix (Desktop & Mobile - Eliminates double-pill bug) */
/* Universal Modern Pagination (Matches DataTables & App Theme) */
.pagination,
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.pagination li.paginate_button,
.pagination li.page-item,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.paginate_button,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item.active,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item.current {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  height: auto !important;
  box-shadow: none !important;
  display: inline-flex !important;
}

.pagination li.page-item a.page-link,
.pagination li.page-item span.page-link,
.pagination li a,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item a.page-link,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li a {
  min-width: 32px !important;
  height: 32px !important;
  padding: 0 10px !important;
  margin: 0 !important;
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  color: #475569 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-shadow: none !important;
  transition: all 0.15s ease !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

.pagination li.page-item a.page-link:hover,
.pagination li a:hover,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item a.page-link:hover,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li a:hover {
  background: #f1f5f9 !important;
  color: var(--t-primary, #059669) !important;
  border-color: #cbd5e1 !important;
}

.pagination li.page-item.active a.page-link,
.pagination li.page-item.active span.page-link,
.pagination li.active a,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item.active a.page-link,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.active a {
  background: var(--t-primary, #059669) !important;
  border-color: var(--t-primary, #059669) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25) !important;
}

.pagination li.page-item.disabled a.page-link,
.pagination li.page-item.disabled span.page-link,
.pagination li.disabled a,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item.disabled a.page-link,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.disabled a {
  opacity: 0.45 !important;
  background: #f8fafc !important;
  color: #94a3b8 !important;
  border-color: #f1f5f9 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
}

@media (max-width: 991px) {
  /* 1. Prevent Double Nested Borders on .table-responsive + .dataTables_wrapper */
  .table-responsive.has-dt-wrapper {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: visible !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
  }

  div.dataTables_wrapper,
  div.dataTables_wrapper.container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Reset Bootstrap .row negative margins inside DataTables so nothing clips on left/right */
  div.dataTables_wrapper .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
  }
  div.dataTables_wrapper [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Only the table scroll wrapper gets the clean square border & touch scroll (0 border-radius) */
  .dt-mobile-table-scroll,
  .table-responsive:not(.has-dt-wrapper) {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    margin-bottom: 10px !important;
    box-shadow: none !important;
  }

  /* 2. Smart Table Sizing: Compact tables (<= 4 cols) fit 100%, Wide tables (>= 5 cols) scroll */
  .table-responsive table.table,
  .table-responsive table.dataTable {
    width: 100% !important;
    min-width: 100% !important;
    margin-bottom: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #ffffff !important;
  }

  .table-responsive:not(.mode-card-view) table.table.table-wide-mobile,
  .table-responsive:not(.mode-card-view) table.dataTable.table-wide-mobile {
    min-width: 560px !important;
  }

  /* Compact tables (2-4 columns like Mapel, Kelas, Semester): fit screen, wrap long text */
  .table-responsive table.table.table-compact-mobile th,
  .table-responsive table.table.table-compact-mobile td {
    white-space: normal !important;
    word-break: break-word !important;
  }
  .table-responsive table.table.table-compact-mobile th:first-child,
  .table-responsive table.table.table-compact-mobile td:first-child {
    white-space: nowrap !important;
    width: 1% !important;
    font-weight: 600 !important;
    color: #334155 !important;
  }
  .table-responsive table.table.table-compact-mobile th:last-child,
  .table-responsive table.table.table-compact-mobile td:last-child {
    white-space: nowrap !important;
    width: 1% !important;
    text-align: right !important;
  }

  /* Wide tables (5+ columns): sticky first column + nowrap */
  .table-responsive:not(.mode-card-view) table.table.table-wide-mobile th,
  .table-responsive:not(.mode-card-view) table.table.table-wide-mobile td {
    white-space: nowrap !important;
  }
  .table-responsive:not(.mode-card-view):not(.is-survey-table) table.table.table-wide-mobile > thead > tr > th:first-child,
  .table-responsive:not(.mode-card-view):not(.is-survey-table) table.table.table-wide-mobile > tbody > tr > td:first-child {
    position: sticky !important;
    left: 0 !important;
    background: #ffffff !important;
    z-index: 5 !important;
    box-shadow: 2px 0 5px -2px rgba(15, 23, 42, 0.06) !important;
  }
  .table-responsive:not(.mode-card-view):not(.is-survey-table) table.table.table-wide-mobile > thead > tr > th:first-child {
    background: #f8fafc !important;
    z-index: 7 !important;
  }
  .table-responsive.is-survey-table table.table > thead > tr > th:first-child,
  .table-responsive.is-survey-table table.table > tbody > tr > td:first-child {
    position: static !important;
    box-shadow: none !important;
    white-space: normal !important;
    min-width: 240px !important;
    max-width: 320px !important;
  }

  /* 3. Clean Uniform Row Backgrounds (Eliminates two-tone table-striped split) */
  .table-responsive:not(.mode-card-view) table.table tbody tr,
  .table-responsive:not(.mode-card-view) table.dataTable tbody tr,
  .table-responsive:not(.mode-card-view) table.table-striped tbody tr:nth-of-type(odd),
  .table-responsive:not(.mode-card-view) table.table-striped tbody tr:nth-of-type(even) {
    background-color: #ffffff !important;
  }
  .table-responsive:not(.mode-card-view) table.table tbody td,
  .table-responsive:not(.mode-card-view) table.dataTable tbody td {
    background-color: #ffffff !important;
    padding: 11px 12px !important;
    vertical-align: middle !important;
    font-size: 13px !important;
    color: #1e293b !important;
    border-top: 1px solid #f1f5f9 !important;
  }
  .table-responsive table.table tbody tr:first-child td {
    border-top: none !important;
  }
  .table-responsive table.table tbody tr:hover td {
    background-color: #f8fafc !important;
  }

  /* 4. Table Header Styling */
  .table-responsive table.table thead th,
  .table-responsive table.dataTable thead th {
    background: #f8fafc !important;
    border-bottom: 1.5px solid #e2e8f0 !important;
    border-top: none !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    color: #475569 !important;
    padding: 11px 12px !important;
  }

  /* 5. Action Buttons & 3-Dots Menu */
  .table-responsive .btn-xs,
  .table-responsive .btn-sm,
  .table-responsive table .btn {
    min-height: 30px !important;
    padding: 4px 10px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 6. DataTables Top Controls (Length & Search) - Modern Mobile Ergonomics */
  div.dataTables_wrapper > .row:first-child {
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
    padding: 0 !important;
    width: 100% !important;
  }
  div.dataTables_wrapper > .row:first-child > [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
    float: none !important;
  }
  div.dataTables_wrapper .dataTables_filter {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    text-align: left !important;
    display: block !important;
  }
  div.dataTables_wrapper .dataTables_filter label {
    width: 100% !important;
    display: block !important;
    margin: 0 !important;
    font-size: 0 !important;
    color: transparent !important;
    text-align: left !important;
  }
  div.dataTables_wrapper .dataTables_filter input[type="search"],
  div.dataTables_wrapper .dataTables_filter input {
    display: block !important;
    width: 100% !important;
    height: 40px !important;
    padding: 8px 14px !important;
    border-radius: 10px !important;
    border: 1.5px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #1e293b !important;
    font-size: 13.5px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    -webkit-appearance: none !important;
  }
  div.dataTables_wrapper .dataTables_filter input::-webkit-search-decoration,
  div.dataTables_wrapper .dataTables_filter input::-webkit-search-cancel-button,
  div.dataTables_wrapper .dataTables_filter input::-webkit-search-results-button,
  div.dataTables_wrapper .dataTables_filter input::-webkit-search-results-decoration {
    -webkit-appearance: none !important;
    display: none !important;
  }
  div.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
    outline: none !important;
  }
  div.dataTables_wrapper .dataTables_length {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    float: none !important;
    margin: 6px 0 16px 0 !important;
  }
  div.dataTables_wrapper .dataTables_length label {
    font-size: 12px !important;
    color: #64748b !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
  }
  div.dataTables_wrapper .dataTables_length select {
    height: 30px !important;
    font-size: 12px !important;
    padding: 2px 8px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #1e293b !important;
  }

  /* Unconditionally hide all scroll hints when Card View is active */
  .table-responsive.mode-card-view ~ .mobile-table-scroll-hint,
  .table-responsive.mode-card-view + .mobile-table-scroll-hint,
  .table-responsive.mode-card-view .mobile-table-scroll-hint,
  .mode-card-view .mobile-table-scroll-hint,
  .mode-card-view ~ .mobile-table-scroll-hint,
  .mode-card-view + .mobile-table-scroll-hint,
  .table-responsive.mode-card-view .mobile-table-hint,
  .mobile-table-hint {
    display: none !important;
  }

  /* 7. DataTables Bottom Info & Pagination (Centered, Wrapped, Never Cut Off) */
  .dataTables_wrapper .dataTables_info {
    float: none !important;
    text-align: center !important;
    font-size: 12px !important;
    color: #64748b !important;
    padding: 6px 0 8px 0 !important;
    margin: 0 !important;
  }
  .dataTables_wrapper .dataTables_paginate {
    float: none !important;
    width: 100% !important;
    padding: 2px 0 6px 0 !important;
    margin: 0 !important;
  }
  .dataTables_wrapper .dataTables_paginate ul.pagination {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* ==========================================================================
   DESKTOP FULL-WIDTH FIX (COMPATIBLE WITH 80% DESKTOP ZOOM) & MOBILE SHIELD
   ========================================================================== */
@media (min-width: 992px) {
  html, body {
    width: 100% !important;
    max-width: none !important;
    overflow-x: hidden !important;
  }
  body:not(.sidebar-folded) .topbar,
  body:not(.sidebar-folded) main,
  body:not(.sidebar-folded) .main-container {
    margin-left: 260px !important;
    margin-right: 0 !important;
    width: auto !important;
    max-width: none !important;
    right: 0 !important;
  }
  body.sidebar-folded .topbar,
  body.sidebar-folded main,
  body.sidebar-folded .main-container {
    margin-left: 80px !important;
    margin-right: 0 !important;
    width: auto !important;
    max-width: none !important;
    right: 0 !important;
  }
  .main-content {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 991px) {
  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
}


/* Global Zero Border-Radius for All Tables & Clean Header Row (Overrides tr.bg-dark) */
.table-responsive,
.dt-mobile-table-scroll,
table.table,
table.dataTable,
table.table thead,
table.table tbody,
table.table tr,
table.table th,
table.table td {
  border-radius: 0 !important;
}
table.table thead tr,
table.table thead tr.bg-dark,
table.dataTable thead tr,
table.dataTable thead tr.bg-dark {
  background: #f8fafc !important;
  background-color: #f8fafc !important;
  color: #475569 !important;
  border: none !important;
}


/* ==========================================================================
   8. GLOBAL GLASSY BLURRED COLOR GRADIENT THEME (v=7.3)
   - Full-Viewport Blurred Multi-Color Gradient Base (Royal Blue, Sky Cyan, Surya Gold)
   - Frosted Glass Cards, Topbar, Sidebar, Bottom Dock, and Hero Surfaces
   ========================================================================== */

html {
  background-color: #e6f0ff !important;
}

body {
  background-color: #e6f0ff !important;
  background-image:
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.24) 0px, transparent 50%),
    radial-gradient(at 96% 8%, rgba(245, 158, 11, 0.22) 0px, transparent 48%),
    radial-gradient(at 50% 45%, rgba(14, 165, 233, 0.18) 0px, transparent 55%),
    radial-gradient(at 8% 92%, rgba(28, 81, 157, 0.22) 0px, transparent 52%),
    radial-gradient(at 92% 90%, rgba(16, 185, 129, 0.16) 0px, transparent 48%),
    linear-gradient(135deg, #dceafe 0%, #ebf3ff 35%, #fef6e4 70%, #dff0ff 100%) !important;
  background-attachment: fixed !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  position: relative;
  min-height: 100vh;
}

/* Smooth Blurred Ambient Orbs across the entire viewport */
body::before {
  content: "" !important;
  position: fixed !important;
  top: -8% !important;
  left: -8% !important;
  right: -8% !important;
  bottom: -8% !important;
  z-index: -1 !important;
  pointer-events: none !important;
  background:
    radial-gradient(circle at 15% 18%, rgba(37, 99, 235, 0.28) 0%, rgba(56, 189, 248, 0.15) 30%, transparent 56%),
    radial-gradient(circle at 86% 16%, rgba(245, 158, 11, 0.24) 0%, rgba(251, 191, 36, 0.12) 28%, transparent 52%),
    radial-gradient(circle at 52% 52%, rgba(14, 165, 233, 0.18) 0%, rgba(99, 102, 241, 0.10) 35%, transparent 62%),
    radial-gradient(circle at 18% 85%, rgba(28, 81, 157, 0.24) 0%, rgba(2, 132, 199, 0.14) 32%, transparent 56%),
    radial-gradient(circle at 85% 84%, rgba(16, 185, 129, 0.16) 0%, rgba(245, 158, 11, 0.14) 30%, transparent 55%) !important;
  filter: blur(42px) !important;
  -webkit-filter: blur(42px) !important;
  transform: translateZ(0) !important;
}

/* Ensure main layout wrappers stay transparent so the blurred gradient base shines through */
main,
.main-container,
.main-content,
#app-main,
.quran-container,
.diskusi-feed-container {
  background: transparent !important;
  background-color: transparent !important;
}

/* Glassy Topbar */
.topbar,
body .topbar,
header.topbar {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.78) !important;
  box-shadow: 0 4px 20px -2px rgba(28, 81, 157, 0.06) !important;
}

/* Glassy Sidebar (Expanded, Folded & Mobile Drawer) */
.sidebar,
body .sidebar,
body:not(.sidebar-folded) .sidebar,
body.sidebar-folded .sidebar,
body.sidebar-open .sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.80) 0%, rgba(244, 249, 255, 0.74) 100%) !important;
  /* backdrop-filter optimized */
  border-right: 1px solid rgba(255, 255, 255, 0.82) !important;
  box-shadow: 4px 0 24px -4px rgba(28, 81, 157, 0.06) !important;
}

.sidebar-navigation,
.sidebar .sidebar-navigation,
.sidebar-navigation ul.menu,
.sidebar ul.menu,
.sidebar .menu-submenu {
  background: transparent !important;
  background-color: transparent !important;
}

.sidebar-header,
.sidebar .sidebar-header,
body:not(.sidebar-folded) .sidebar-header,
body.sidebar-folded .sidebar-header {
  background: rgba(255, 255, 255, 0.55) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
  border-right: none !important;
}


/* Glassy Mobile Bottom Navigation Dock */
.mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.85) !important;
}

/* Glassy Cards, Stat Tiles, Quick Action Cards, LBSoal Cards, Diskusi Cards */
.card:not(.card-welcome-hero),
.quick-action-card,
.lbsoal-card,
.lbsoal-filter-card,
.diskusi-card,
.diskusi-hero-banner,
.grid > a.bg-white {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(246, 250, 255, 0.68) 55%, rgba(255, 251, 242, 0.72) 100%) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(255, 255, 255, 0.82) !important;
  box-shadow: 0 8px 28px -4px rgba(28, 81, 157, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* Glassy Welcome Hero Card (Translucent Royal Sapphire, Cyan & Surya Gold Blurred Gradient) */
.card-welcome-hero,
.card.card-welcome-hero {
  background:
    radial-gradient(circle at 12% 18%, rgba(56, 189, 248, 0.45) 0%, transparent 52%),
    radial-gradient(circle at 88% 82%, rgba(245, 158, 11, 0.36) 0%, transparent 52%),
    linear-gradient(135deg, rgba(10, 37, 68, 0.84) 0%, rgba(28, 81, 157, 0.78) 52%, rgba(14, 116, 144, 0.82) 100%) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(255, 255, 255, 0.32) !important;
  box-shadow: 0 12px 32px -6px rgba(15, 43, 72, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  border-radius: 16px !important;
}


/* ==========================================================================
   9. MULTI-THEME & LIGHT/DARK GLASSY ENGINE (v=7.4)
   Supports 2 Modes (light, dark) x 8 Curated Glassy Themes:
   - harmony (Default: Royal Blue, Sky Cyan & Surya Gold)
   - monochrome (Minimalist Onyx, Slate & Silver)
   - emerald (Nature Emerald, Mint & Warm Gold)
   - aurora (Cosmic Indigo, Violet & Rose Pink)
   - ocean (Deep Marine, Turquoise & Aqua)
   - sunset (Warm Sunset Orange, Amber & Coral Rose)
   - sakura (Soft Rose, Sakura Pink & Lavender)
   - royalgold (Prestige Navy, Classic Gold & Amber)
   ========================================================================== */

/* --- DEFAULT / EMERALD OASIS THEME (Default) --- */
:root,
html[data-theme="emerald"] {
  --t-primary: #059669;
  --t-primary-hover: #047857;
  --t-primary-soft: rgba(5, 150, 105, 0.12);
  --t-secondary: #10b981;
  --t-accent: #eab308;
  --t-orb-1: rgba(5, 150, 105, 0.28);
  --t-orb-2: rgba(234, 179, 8, 0.22);
  --t-orb-3: rgba(20, 184, 166, 0.24);
  --t-orb-4: rgba(16, 185, 129, 0.22);
  --t-canvas-light: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 36%, #fef9c3 72%, #ccfbf1 100%);
  --t-canvas-dark: linear-gradient(135deg, #060b14 0%, #0a1324 50%, #070e1c 100%);
  --t-hero-bg: radial-gradient(circle at 12% 18%, rgba(52, 211, 153, 0.42) 0%, transparent 52%), radial-gradient(circle at 88% 82%, rgba(250, 204, 21, 0.32) 0%, transparent 52%), linear-gradient(135deg, rgba(6, 46, 34, 0.88) 0%, rgba(5, 122, 85, 0.82) 55%, rgba(13, 148, 136, 0.84) 100%);
  --t-dot-grad: linear-gradient(135deg, #059669, #10b981, #eab308);
}
:root[data-mode="dark"],
html[data-theme="emerald"][data-mode="dark"] {
  --t-primary: #34d399;
  --t-primary-hover: #10b981;
  --t-primary-soft: rgba(52, 211, 153, 0.15);
}

/* --- HARMONY THEME --- */
html[data-theme="harmony"] {
  --t-primary: #2563eb;
  --t-primary-hover: #1d4ed8;
  --t-primary-soft: rgba(37, 99, 235, 0.12);
  --t-secondary: #0ea5e9;
  --t-accent: #f59e0b;
  --t-orb-1: rgba(37, 99, 235, 0.30);
  --t-orb-2: rgba(245, 158, 11, 0.25);
  --t-orb-3: rgba(14, 165, 233, 0.22);
  --t-orb-4: rgba(16, 185, 129, 0.18);
  --t-canvas-light: linear-gradient(135deg, #dceafe 0%, #ebf3ff 35%, #fef6e4 70%, #dff0ff 100%);
  --t-canvas-dark: linear-gradient(135deg, #060b14 0%, #0a1324 50%, #070e1c 100%);
  --t-hero-bg: radial-gradient(circle at 12% 18%, rgba(56, 189, 248, 0.45) 0%, transparent 52%), radial-gradient(circle at 88% 82%, rgba(245, 158, 11, 0.36) 0%, transparent 52%), linear-gradient(135deg, rgba(10, 37, 68, 0.86) 0%, rgba(28, 81, 157, 0.80) 52%, rgba(14, 116, 144, 0.84) 100%);
  --t-dot-grad: linear-gradient(135deg, #2563eb, #0ea5e9, #f59e0b);
}

/* --- 2. MONOCHROME THEME (Minimalist Black / White / Zinc Glass) --- */
html[data-theme="monochrome"] {
  --t-primary: #27272a;
  --t-primary-hover: #18181b;
  --t-primary-soft: rgba(39, 39, 42, 0.10);
  --t-secondary: #52525b;
  --t-accent: #71717a;
  --t-orb-1: rgba(24, 24, 27, 0.18);
  --t-orb-2: rgba(113, 113, 122, 0.22);
  --t-orb-3: rgba(161, 161, 170, 0.20);
  --t-orb-4: rgba(63, 63, 70, 0.16);
  --t-canvas-light: linear-gradient(135deg, #e4e4e7 0%, #f4f4f5 38%, #fafafa 70%, #e4e4e7 100%);
  --t-canvas-dark: linear-gradient(135deg, #09090b 0%, #121215 45%, #18181b 80%, #09090b 100%);
  --t-hero-bg: radial-gradient(circle at 15% 20%, rgba(161, 161, 170, 0.32) 0%, transparent 52%), radial-gradient(circle at 85% 80%, rgba(212, 212, 216, 0.22) 0%, transparent 52%), linear-gradient(135deg, rgba(9, 9, 11, 0.90) 0%, rgba(39, 39, 42, 0.86) 55%, rgba(63, 63, 70, 0.88) 100%);
  --t-dot-grad: linear-gradient(135deg, #09090b, #71717a, #e4e4e7);
}
html[data-theme="monochrome"][data-mode="dark"] {
  --t-primary: #e4e4e7;
  --t-primary-hover: #ffffff;
  --t-primary-soft: rgba(228, 228, 231, 0.14);
}

/* --- 4. AURORA VIOLET THEME --- */
html[data-theme="aurora"],
html[data-theme="purple"] {
  --t-primary: #6366f1;
  --t-primary-hover: #4f46e5;
  --t-primary-soft: rgba(99, 102, 241, 0.12);
  --t-secondary: #8b5cf6;
  --t-accent: #ec4899;
  --t-orb-1: rgba(99, 102, 241, 0.28);
  --t-orb-2: rgba(236, 72, 153, 0.24);
  --t-orb-3: rgba(139, 92, 246, 0.25);
  --t-orb-4: rgba(56, 189, 248, 0.20);
  --t-canvas-light: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 38%, #fce7f3 72%, #e0f2fe 100%);
  --t-canvas-dark: linear-gradient(135deg, #070914 0%, #0c1124 50%, #070a1a 100%);
  --t-hero-bg: radial-gradient(circle at 12% 18%, rgba(167, 139, 250, 0.45) 0%, transparent 52%), radial-gradient(circle at 88% 82%, rgba(244, 114, 182, 0.38) 0%, transparent 52%), linear-gradient(135deg, rgba(30, 27, 75, 0.88) 0%, rgba(79, 70, 229, 0.82) 52%, rgba(147, 51, 234, 0.84) 100%);
  --t-dot-grad: linear-gradient(135deg, #4f46e5, #8b5cf6, #ec4899);
}
html[data-theme="aurora"][data-mode="dark"],
html[data-theme="purple"][data-mode="dark"] {
  --t-primary: #818cf8;
  --t-primary-hover: #6366f1;
  --t-primary-soft: rgba(129, 140, 248, 0.16);
}

/* --- 5. OCEAN BREEZE THEME --- */
html[data-theme="ocean"] {
  --t-primary: #0284c7;
  --t-primary-hover: #0369a1;
  --t-primary-soft: rgba(2, 132, 199, 0.12);
  --t-secondary: #06b6d4;
  --t-accent: #2dd4bf;
  --t-orb-1: rgba(2, 132, 199, 0.30);
  --t-orb-2: rgba(45, 212, 191, 0.26);
  --t-orb-3: rgba(6, 182, 212, 0.25);
  --t-orb-4: rgba(59, 130, 246, 0.20);
  --t-canvas-light: linear-gradient(135deg, #cffafe 0%, #e0f2fe 38%, #ccfbf1 72%, #dbeafe 100%);
  --t-canvas-dark: linear-gradient(135deg, #060e1a 0%, #09172c 50%, #061120 100%);
  --t-hero-bg: radial-gradient(circle at 12% 18%, rgba(34, 211, 238, 0.45) 0%, transparent 52%), radial-gradient(circle at 88% 82%, rgba(45, 212, 191, 0.38) 0%, transparent 52%), linear-gradient(135deg, rgba(8, 47, 73, 0.88) 0%, rgba(3, 105, 161, 0.82) 52%, rgba(13, 148, 136, 0.84) 100%);
  --t-dot-grad: linear-gradient(135deg, #0284c7, #06b6d4, #2dd4bf);
}
html[data-theme="ocean"][data-mode="dark"] {
  --t-primary: #38bdf8;
  --t-primary-hover: #0ea5e9;
  --t-primary-soft: rgba(56, 189, 248, 0.15);
}

/* --- 6. SUNSET AMBER THEME --- */
html[data-theme="sunset"] {
  --t-primary: #ea580c;
  --t-primary-hover: #c2410c;
  --t-primary-soft: rgba(234, 88, 12, 0.12);
  --t-secondary: #f59e0b;
  --t-accent: #f43f5e;
  --t-orb-1: rgba(234, 88, 12, 0.26);
  --t-orb-2: rgba(244, 63, 94, 0.24);
  --t-orb-3: rgba(245, 158, 11, 0.26);
  --t-orb-4: rgba(251, 146, 60, 0.22);
  --t-canvas-light: linear-gradient(135deg, #ffedd5 0%, #fef3c7 38%, #ffe4e6 72%, #ffedd5 100%);
  --t-canvas-dark: linear-gradient(135deg, #0d0806 0%, #14101d 50%, #0d0914 100%);
  --t-hero-bg: radial-gradient(circle at 12% 18%, rgba(251, 146, 60, 0.45) 0%, transparent 52%), radial-gradient(circle at 88% 82%, rgba(251, 113, 133, 0.38) 0%, transparent 52%), linear-gradient(135deg, rgba(67, 20, 7, 0.88) 0%, rgba(194, 65, 12, 0.82) 52%, rgba(190, 18, 60, 0.84) 100%);
  --t-dot-grad: linear-gradient(135deg, #ea580c, #f59e0b, #f43f5e);
}
html[data-theme="sunset"][data-mode="dark"] {
  --t-primary: #fb923c;
  --t-primary-hover: #f97316;
  --t-primary-soft: rgba(251, 146, 60, 0.16);
}

/* --- 7. SAKURA BLUSH THEME --- */
html[data-theme="sakura"],
html[data-theme="crimson"] {
  --t-primary: #db2777;
  --t-primary-hover: #be185d;
  --t-primary-soft: rgba(219, 39, 119, 0.12);
  --t-secondary: #f472b6;
  --t-accent: #a855f7;
  --t-orb-1: rgba(236, 72, 153, 0.26);
  --t-orb-2: rgba(168, 85, 247, 0.22);
  --t-orb-3: rgba(244, 63, 94, 0.20);
  --t-orb-4: rgba(251, 113, 133, 0.22);
  --t-canvas-light: linear-gradient(135deg, #fce7f3 0%, #fdf2f8 38%, #f3e8ff 72%, #ffe4e6 100%);
  --t-canvas-dark: linear-gradient(135deg, #0d0810 0%, #140f21 50%, #0c0816 100%);
  --t-hero-bg: radial-gradient(circle at 12% 18%, rgba(244, 114, 182, 0.45) 0%, transparent 52%), radial-gradient(circle at 88% 82%, rgba(192, 132, 252, 0.38) 0%, transparent 52%), linear-gradient(135deg, rgba(80, 7, 36, 0.88) 0%, rgba(190, 24, 93, 0.82) 52%, rgba(126, 34, 206, 0.84) 100%);
  --t-dot-grad: linear-gradient(135deg, #e11d48, #f472b6, #a855f7);
}
html[data-theme="sakura"][data-mode="dark"],
html[data-theme="crimson"][data-mode="dark"] {
  --t-primary: #f472b6;
  --t-primary-hover: #ec4899;
  --t-primary-soft: rgba(244, 114, 182, 0.16);
}

/* --- 8. ROYAL GOLD THEME --- */
html[data-theme="royalgold"],
html[data-theme="amber"] {
  --t-primary: #b45309;
  --t-primary-hover: #92400e;
  --t-primary-soft: rgba(180, 83, 9, 0.12);
  --t-secondary: #1e3a8a;
  --t-accent: #f59e0b;
  --t-orb-1: rgba(245, 158, 11, 0.28);
  --t-orb-2: rgba(30, 58, 138, 0.24);
  --t-orb-3: rgba(217, 119, 6, 0.24);
  --t-orb-4: rgba(251, 191, 36, 0.22);
  --t-canvas-light: linear-gradient(135deg, #fef3c7 0%, #fffbeb 38%, #dbeafe 72%, #fef9c3 100%);
  --t-canvas-dark: linear-gradient(135deg, #0c0905 0%, #14121d 50%, #0c0a13 100%);
  --t-hero-bg: radial-gradient(circle at 12% 18%, rgba(251, 191, 36, 0.45) 0%, transparent 52%), radial-gradient(circle at 88% 82%, rgba(59, 130, 246, 0.35) 0%, transparent 52%), linear-gradient(135deg, rgba(28, 25, 23, 0.90) 0%, rgba(146, 64, 14, 0.84) 52%, rgba(30, 58, 138, 0.86) 100%);
  --t-dot-grad: linear-gradient(135deg, #1e3a8a, #d97706, #fbbf24);
}
html[data-theme="royalgold"][data-mode="dark"],
html[data-theme="amber"][data-mode="dark"] {
  --t-primary: #fbbf24;
  --t-primary-hover: #f59e0b;
  --t-primary-soft: rgba(251, 191, 36, 0.16);
}

/* ==========================================================================
   APPLY DYNAMIC THEME VARIABLES TO BACKGROUND, HERO & ACCENTS
   ========================================================================== */

html body {
  background: var(--t-canvas-light) !important;
  background-attachment: fixed !important;
  transition: background 0.35s ease, color 0.25s ease !important;
}

html[data-mode="dark"] body {
  background: var(--t-canvas-dark) !important;
  background-attachment: fixed !important;
  color: #e2e8f0 !important;
}

html body::before {
  background:
    radial-gradient(circle at 15% 18%, var(--t-orb-1) 0%, transparent 55%),
    radial-gradient(circle at 86% 16%, var(--t-orb-2) 0%, transparent 52%),
    radial-gradient(circle at 52% 52%, var(--t-orb-3) 0%, transparent 60%),
    radial-gradient(circle at 18% 85%, var(--t-orb-2) 0%, transparent 56%),
    radial-gradient(circle at 85% 84%, var(--t-orb-4) 0%, transparent 55%) !important;
}

/* Dynamic Hero Banner */
.card-welcome-hero,
.card.card-welcome-hero {
  background: var(--t-hero-bg) !important;
}

/* Dynamic Primary Accents (Sidebar active, pagination, buttons, links) */
.sidebar .menu-item.active > .menu-link,
.sidebar .menu-item.open > .menu-link,
.sidebar-navigation .menu-item.active > .menu-link,
.sidebar-navigation .menu-item.open > .menu-link,
body.sidebar-folded .sidebar .menu-item.active > .menu-link,
.sidebar .menu-submenu .menu-item.active > .menu-link {
  background: var(--t-primary-soft) !important;
  color: var(--t-primary) !important;
}

.sidebar .menu-item.active > .menu-link .icon,
.sidebar .menu-item.open > .menu-link .icon,
.sidebar .menu-item.active > .menu-link i,
.sidebar .menu-link:hover,
.sidebar .menu-link:hover .icon,
.sidebar .menu-link:hover i,
body.sidebar-folded .sidebar .menu-item.active > .menu-link .icon,
body.sidebar-folded .sidebar .menu-item.active > .menu-link i {
  color: var(--t-primary) !important;
}

.sidebar .menu-submenu .menu-item.active > .menu-link .dot,
.sidebar .menu-submenu .menu-link:hover .dot {
  background-color: var(--t-primary) !important;
}

.sidebar-profile-badge,
.sidebar .sidebar-profile-badge,
.quran-hero-icon-box,
.quran-num-badge,
.quran-verse-pill {
  background: var(--t-primary-soft) !important;
  color: var(--t-primary) !important;
  border-color: var(--t-primary-soft) !important;
}

.quran-hero-icon-box i,
.quran-badge-stat i,
.quran-hero-calligraphy,
.quran-card-arabic,
.quran-header-arabic,
.topbar-page-title {
  color: var(--t-primary) !important;
}

.quran-surah-card:hover .quran-num-badge,
.quran-chip.active,
.pagination li.page-item.active a.page-link,
.pagination li.page-item.active span.page-link,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item.active a.page-link,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.active a,
.btn-primary {
  background: var(--t-primary) !important;
  border-color: var(--t-primary) !important;
  color: #ffffff !important;
}
html[data-theme="monochrome"][data-mode="dark"] .btn-primary,
html[data-theme="monochrome"][data-mode="dark"] .quran-chip.active,
html[data-theme="monochrome"][data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item.active a.page-link {
  color: #09090b !important;
}

/* ==========================================================================
   THEME PICKER POPOVER & TOPBAR GLASS BUTTONS
   ========================================================================== */
.topbar-glass-btn {
  background: rgba(255, 255, 255, 0.75) !important;
  border: 1px solid rgba(226, 232, 240, 0.85) !important;
  color: #475569 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
}
.topbar-glass-btn:hover {
  background: #ffffff !important;
  color: var(--t-primary) !important;
  border-color: var(--t-primary) !important;
  transform: translateY(-1px);
}

.theme-active-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--t-dot-grad);
  border: 1.5px solid #ffffff;
  pointer-events: none;
}

.theme-picker-menu {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.18) !important;
}

.theme-picker-label {
  color: #475569;
}
.theme-picker-sublabel {
  color: #94a3b8;
  font-weight: 600;
}
.theme-badge-current {
  background: var(--t-primary-soft);
  color: var(--t-primary);
}

.theme-mode-segmented {
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.theme-mode-btn {
  background: transparent;
  border: none;
  color: #64748b;
}
.theme-mode-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.theme-swatch-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.65);
  border: 1.5px solid rgba(226, 232, 240, 0.85);
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  width: 100%;
}
.theme-swatch-card:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
.theme-swatch-card.active {
  background: #ffffff;
  border-color: var(--t-primary);
  box-shadow: 0 4px 12px var(--t-primary-soft);
}
.theme-swatch-orb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.6), 0 2px 5px rgba(0,0,0,0.12);
}
.theme-swatch-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.theme-swatch-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.theme-swatch-desc {
  font-size: 9.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.theme-swatch-check {
  font-size: 10px;
  color: var(--t-primary);
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.15s ease;
}
.theme-swatch-card.active .theme-swatch-check {
  opacity: 1;
  transform: scale(1);
}

/* ==========================================================================
   COMPREHENSIVE DARK MODE GLASSY SURFACES (html[data-mode="dark"])
   ========================================================================== */
html[data-mode="dark"] .topbar,
html[data-mode="dark"] body .topbar,
html[data-mode="dark"] header.topbar {
  background: rgba(15, 23, 42, 0.72) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35) !important;
}

html[data-mode="dark"] .topbar-glass-btn,
html[data-mode="dark"] .topbar .sidebar-toggler {
  background: rgba(30, 41, 59, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
}
html[data-mode="dark"] .topbar-glass-btn i,
html[data-mode="dark"] .topbar .sidebar-toggler svg {
  color: #e2e8f0 !important;
}

/* ==========================================================================
   COMPREHENSIVE DARK MODE SIDEBAR ARCHITECTURE (html[data-mode="dark"])
   ========================================================================== */
html[data-mode="dark"] {
  --sidebar-bg: #0b1120;
}

html[data-mode="dark"] .sidebar,
html[data-mode="dark"] #app-sidebar,
html[data-mode="dark"] .sidebar-expand-lg,
html[data-mode="dark"] aside.sidebar,
html[data-mode="dark"] body .sidebar,
html[data-mode="dark"] body:not(.sidebar-folded) .sidebar,
html[data-mode="dark"] body.sidebar-folded .sidebar,
html[data-mode="dark"] body.sidebar-open .sidebar {
  background: rgba(15, 23, 42, 0.72) !important;
  background-color: rgba(15, 23, 42, 0.72) !important;
  /* backdrop-filter optimized */
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25) !important;
}

html[data-mode="dark"] .sidebar-navigation,
html[data-mode="dark"] .sidebar .sidebar-navigation,
html[data-mode="dark"] body .sidebar-navigation,
html[data-mode="dark"] body:not(.sidebar-folded) .sidebar-navigation,
html[data-mode="dark"] body.sidebar-folded .sidebar-navigation,
html[data-mode="dark"] .sidebar-navigation ul.menu,
html[data-mode="dark"] .sidebar ul.menu {
  background: transparent !important;
  background-color: transparent !important;
  border-right: none !important;
}

html[data-mode="dark"] .sidebar-header,
html[data-mode="dark"] .sidebar .sidebar-header,
html[data-mode="dark"] .sidebar-header.bg-primary,
html[data-mode="dark"] body .sidebar-header,
html[data-mode="dark"] body:not(.sidebar-folded) .sidebar-header,
html[data-mode="dark"] body.sidebar-folded .sidebar-header,
html[data-mode="dark"] header.sidebar-header {
  background: rgba(15, 23, 42, 0.45) !important;
  background-color: rgba(15, 23, 42, 0.45) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-right: none !important;
}

/* Logo in Dark Mode: Clean Crisp White Text & Natural Color Emblem */
html[data-mode="dark"] .sidebar .sidebar-logo-img,
html[data-mode="dark"] .sidebar-header .logo img,
html[data-mode="dark"] body:not(.sidebar-folded) .sidebar-header .logo img {
  filter: brightness(0) invert(1) !important;
  opacity: 0.95 !important;
}

html[data-mode="dark"] .sidebar .sidebar-logo-icon,
html[data-mode="dark"] body.sidebar-folded .sidebar-header .logo-icon img {
  filter: none !important;
  opacity: 0.95 !important;
}

html[data-mode="dark"] body:not(.sidebar-folded) .sidebar-header .sidebar-toggle-fold::before {
  border-color: var(--t-primary, #60a5fa) !important;
  background-color: var(--t-primary, #60a5fa) !important;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.25) !important;
}
html[data-mode="dark"] .sidebar-header .sidebar-toggle-fold:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
}
html[data-mode="dark"] body:not(.sidebar-folded) .sidebar-header .sidebar-toggle-fold:hover::before {
  border-color: #93c5fd !important;
  background-color: #93c5fd !important;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.35) !important;
}

html[data-mode="dark"] .sidebar-header .mobile-sidebar-close {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .sidebar-header .mobile-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}

/* Minimalist Category Headings in Dark Mode */
html[data-mode="dark"] .sidebar .menu-category,
html[data-mode="dark"] .sidebar-navigation .menu-category,
html[data-mode="dark"] body .sidebar .menu-category,
html[data-mode="dark"] .menu-category {
  color: #94a3b8 !important;
  background: transparent !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
}

/* Menu Links in Dark Mode */
html[data-mode="dark"] .sidebar .menu-link,
html[data-mode="dark"] .sidebar-navigation .menu-link,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) .menu-link,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item > .menu-link,
html[data-mode="dark"] body .sidebar .menu-link {
  color: #cbd5e1 !important;
  background: transparent !important;
}
html[data-mode="dark"] .sidebar .menu-link .title,
html[data-mode="dark"] .sidebar-navigation .menu-link .title,
html[data-mode="dark"] body .sidebar .menu-link .title {
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .sidebar .menu-link .icon,
html[data-mode="dark"] .sidebar-navigation .menu-link .icon,
html[data-mode="dark"] .sidebar .menu-link i,
html[data-mode="dark"] .sidebar-navigation .menu-link i {
  color: #94a3b8 !important;
}

html[data-mode="dark"] .sidebar .menu-link .arrow,
html[data-mode="dark"] .sidebar-navigation .menu-link .arrow {
  color: #94a3b8 !important;
}

/* Hover Menu Link in Dark Mode */
html[data-mode="dark"] .sidebar .menu-link:hover,
html[data-mode="dark"] .sidebar-navigation .menu-link:hover,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) .menu-link:hover,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item > .menu-link:hover,
html[data-mode="dark"] body .sidebar .menu-link:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .sidebar .menu-link:hover .title,
html[data-mode="dark"] .sidebar-navigation .menu-link:hover .title {
  color: #ffffff !important;
}
html[data-mode="dark"] .sidebar .menu-link:hover .icon,
html[data-mode="dark"] .sidebar-navigation .menu-link:hover .icon,
html[data-mode="dark"] .sidebar .menu-link:hover i {
  color: #ffffff !important;
}
html[data-mode="dark"] .sidebar .menu-link:hover .arrow,
html[data-mode="dark"] .sidebar-navigation .menu-link:hover .arrow {
  color: #ffffff !important;
}

/* Active Menu Item in Dark Mode */
html[data-mode="dark"] .sidebar .menu-item.active > .menu-link,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) .menu-item.active > .menu-link,
html[data-mode="dark"] .sidebar-navigation .menu-item.active > .menu-link,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item.active > .menu-link,
html[data-mode="dark"] body .sidebar .menu-item.active > .menu-link {
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.2)) !important;
  color: var(--t-primary, #60a5fa) !important;
  font-weight: 600 !important;
}
html[data-mode="dark"] .sidebar .menu-item.active > .menu-link .title,
html[data-mode="dark"] .sidebar-navigation .menu-item.active > .menu-link .title {
  color: var(--t-primary, #60a5fa) !important;
  font-weight: 700 !important;
}
html[data-mode="dark"] .sidebar .menu-item.active > .menu-link .icon,
html[data-mode="dark"] .sidebar-navigation .menu-item.active > .menu-link .icon,
html[data-mode="dark"] .sidebar .menu-item.active > .menu-link i {
  color: var(--t-primary, #60a5fa) !important;
}

/* Submenu in Dark Mode */
html[data-mode="dark"] .sidebar .menu-submenu,
html[data-mode="dark"] .sidebar-navigation .menu-submenu,
html[data-mode="dark"] body .sidebar .menu-submenu {
  border-left: 2px solid rgba(255, 255, 255, 0.12) !important;
  background: transparent !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-link,
html[data-mode="dark"] .sidebar-navigation .menu-submenu .menu-link,
html[data-mode="dark"] body .sidebar .menu-submenu .menu-link {
  color: #cbd5e1 !important;
  background: transparent !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-link .title {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-link:hover,
html[data-mode="dark"] .sidebar-navigation .menu-submenu .menu-link:hover,
html[data-mode="dark"] body .sidebar .menu-submenu .menu-link:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-link:hover .title {
  color: #ffffff !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-item.active > .menu-link,
html[data-mode="dark"] .sidebar-navigation .menu-submenu .menu-item.active > .menu-link,
html[data-mode="dark"] body .sidebar .menu-submenu .menu-item.active > .menu-link {
  color: var(--t-primary, #60a5fa) !important;
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.2)) !important;
  font-weight: 600 !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-item.active > .menu-link .title {
  color: var(--t-primary, #60a5fa) !important;
  font-weight: 700 !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .dot,
html[data-mode="dark"] .menu-submenu .menu-link .dot {
  background-color: #64748b !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-link:hover .dot {
  background-color: #ffffff !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-item.active > .menu-link .dot {
  background-color: var(--t-primary, #60a5fa) !important;
  box-shadow: 0 0 6px var(--t-primary, #60a5fa) !important;
}

/* Profile Footer in Dark Mode */
html[data-mode="dark"] .sidebar-profile-card,
html[data-mode="dark"] .sidebar .sidebar-profile-card,
html[data-mode="dark"] body .sidebar .sidebar-profile-card,
html[data-mode="dark"] body:not(.sidebar-folded) .sidebar-profile-card,
html[data-mode="dark"] body.sidebar-folded .sidebar-profile-card {
  background: rgba(255, 255, 255, 0.05) !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .sidebar-profile-badge,
html[data-mode="dark"] .sidebar .sidebar-profile-badge {
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.16)) !important;
  color: var(--t-primary, #60a5fa) !important;
}
html[data-mode="dark"] .sidebar-profile-card .profile-meta span:first-child,
html[data-mode="dark"] .sidebar-profile-card .profile-meta strong {
  color: #f8fafc !important;
}
html[data-mode="dark"] .sidebar-profile-card .profile-meta span:last-child {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .sidebar-profile-card .sidebar-profile-logout {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .sidebar-profile-card .sidebar-profile-logout:hover {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.16) !important;
}

/* Scrollbar in Dark Mode */
html[data-mode="dark"] .sidebar-navigation::-webkit-scrollbar-thumb,
html[data-mode="dark"] .sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12) !important;
}
html[data-mode="dark"] .sidebar-navigation::-webkit-scrollbar-thumb:hover,
html[data-mode="dark"] .sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22) !important;
}

html[data-mode="dark"] .mobile-bottom-nav {
  background: rgba(15, 23, 42, 0.84) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.10) !important;
}
html[data-mode="dark"] .mobile-bottom-nav .mobile-nav-item {
  color: #94a3b8 !important;
}

/* Dark Mode Cards & Surfaces */
html[data-mode="dark"] .card:not(.card-welcome-hero),
html[data-mode="dark"] .quick-action-card,
html[data-mode="dark"] .lbsoal-card,
html[data-mode="dark"] .lbsoal-filter-card,
html[data-mode="dark"] .diskusi-card,
html[data-mode="dark"] .diskusi-hero-banner,
html[data-mode="dark"] .grid > a.bg-white,
html[data-mode="dark"] .quran-hero-card,
html[data-mode="dark"] .quran-toolbar-card,
html[data-mode="dark"] .quran-surah-card,
html[data-mode="dark"] .quran-surah-hero-header,
html[data-mode="dark"] .quran-bismillah-card,
html[data-mode="dark"] .quran-verse-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.76) 0%, rgba(30, 41, 59, 0.66) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
}

html[data-mode="dark"] .broadcast-marquee-card {
  background: rgba(15, 23, 42, 0.95) !important;
  background-color: #0f172a !important;
  border: 1px solid rgba(245, 158, 11, 0.28) !important;
}
html[data-mode="dark"] .broadcast-marquee-card marquee {
  color: #fef08a !important;
}

/* Dark Mode Quran Search & Chips */
html[data-mode="dark"] .quran-search-input {
  background: rgba(15, 23, 42, 0.7) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #f1f5f9 !important;
}
html[data-mode="dark"] .quran-search-input:focus {
  background: rgba(15, 23, 42, 0.9) !important;
  border-color: var(--t-primary, #38bdf8) !important;
}
html[data-mode="dark"] .quran-count-badge {
  background: rgba(15, 23, 42, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
}
html[data-mode="dark"] .quran-chip {
  background: rgba(15, 23, 42, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .quran-chip:hover {
  background: rgba(30, 41, 59, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .quran-chip.active {
  background: var(--t-primary, #1c519d) !important;
  border-color: var(--t-primary, #1c519d) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .quran-empty-state {
  background: rgba(15, 23, 42, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}
html[data-mode="dark"] .quran-empty-title {
  color: #f8fafc !important;
}
html[data-mode="dark"] .quran-empty-desc {
  color: #94a3b8 !important;
}

/* Dark Mode Typography inside Cards */
html[data-mode="dark"] .card-title,
html[data-mode="dark"] .card h1,
html[data-mode="dark"] .card h2,
html[data-mode="dark"] .card h3,
html[data-mode="dark"] .card h4,
html[data-mode="dark"] .card h5,
html[data-mode="dark"] .text-slate-800,
html[data-mode="dark"] .text-slate-900,
html[data-mode="dark"] .text-primary,
html[data-mode="dark"] .quick-action-card span,
html[data-mode="dark"] .lbsoal-card-title,
html[data-mode="dark"] .lbsoal-card-title a,
html[data-mode="dark"] .quran-hero-title,
html[data-mode="dark"] .quran-card-name,
html[data-mode="dark"] .quran-header-title,
html[data-mode="dark"] .quran-bismillah-arabic,
html[data-mode="dark"] .quran-verse-arabic,
html[data-mode="dark"] .cell-primary-title {
  color: #f8fafc !important;
}

html[data-mode="dark"] .text-slate-600,
html[data-mode="dark"] .text-slate-700,
html[data-mode="dark"] .card-body .col-form-label,
html[data-mode="dark"] .quran-verse-arti,
html[data-mode="dark"] .lbsoal-schedule-item {
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .text-slate-400,
html[data-mode="dark"] .text-slate-500,
html[data-mode="dark"] .quran-hero-school,
html[data-mode="dark"] .quran-hero-subtitle,
html[data-mode="dark"] .quran-card-arti,
html[data-mode="dark"] .quran-header-arti,
html[data-mode="dark"] .lbsoal-desc {
  color: #94a3b8 !important;
}

/* Dark Mode Tables */
html[data-mode="dark"] .dt-mobile-table-scroll,
html[data-mode="dark"] .table-responsive:not(.has-dt-wrapper) {
  background: rgba(15, 23, 42, 0.72) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}

html[data-mode="dark"] table.table,
html[data-mode="dark"] table.dataTable,
html[data-mode="dark"] .table-responsive:not(.mode-card-view) table.table tbody tr,
html[data-mode="dark"] .table-responsive:not(.mode-card-view) table.dataTable tbody tr,
html[data-mode="dark"] .table-responsive:not(.mode-card-view) table.table tbody td,
html[data-mode="dark"] .table-responsive:not(.mode-card-view) table.dataTable tbody td {
  background-color: rgba(15, 23, 42, 0.65) !important;
  color: #e2e8f0 !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
}

html[data-mode="dark"] table.table thead tr,
html[data-mode="dark"] table.table thead tr.bg-dark,
html[data-mode="dark"] table.dataTable thead tr,
html[data-mode="dark"] table.dataTable thead tr.bg-dark,
html[data-mode="dark"] table.table thead th,
html[data-mode="dark"] table.dataTable thead th,
html[data-mode="dark"] .table-responsive:not(.mode-card-view) table.table.table-wide-mobile > thead > tr > th:first-child {
  background: rgba(30, 41, 59, 0.90) !important;
  background-color: rgba(30, 41, 59, 0.90) !important;
  color: #cbd5e1 !important;
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-mode="dark"] .table-responsive:not(.mode-card-view) table.table.table-wide-mobile > tbody > tr > td:first-child {
  background: rgba(15, 23, 42, 0.92) !important;
}

html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item a.page-link,
html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate ul.pagination li a {
  background: rgba(30, 41, 59, 0.80) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
}

/* Dark Mode Form Inputs, Selects & Textareas */
html[data-mode="dark"] .form-control,
html[data-mode="dark"] .card-body .form-control:not(textarea),
html[data-mode="dark"] .card-body input.form-control,
html[data-mode="dark"] .card-body select.form-control,
html[data-mode="dark"] .card-body textarea.form-control,
html[data-mode="dark"] textarea.form-control,
html[data-mode="dark"] .quran-search-input,
html[data-mode="dark"] .quran-select-surah,
html[data-mode="dark"] .diskusi-reply-capsule,
html[data-mode="dark"] .dataTables_wrapper .dataTables_filter input,
html[data-mode="dark"] .dataTables_wrapper .dataTables_length select {
  background-color: rgba(15, 23, 42, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #f8fafc !important;
}

/* Dark Mode Dropdowns & Theme Picker Menu */
html[data-mode="dark"] .dropdown-menu,
html[data-mode="dark"] .theme-picker-menu,
html[data-mode="dark"] .modal-content {
  background: rgba(15, 23, 42, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
}
html[data-mode="dark"] .dropdown-item {
  color: #e2e8f0 !important;
}
html[data-mode="dark"] .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .theme-picker-label {
  color: #cbd5e1;
}
html[data-mode="dark"] .theme-mode-segmented {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(255, 255, 255, 0.10);
}
html[data-mode="dark"] .theme-mode-btn {
  color: #94a3b8;
}
html[data-mode="dark"] .theme-mode-btn.active {
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
}
html[data-mode="dark"] .theme-swatch-card {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(255, 255, 255, 0.10);
}
html[data-mode="dark"] .theme-swatch-card:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.22);
}
html[data-mode="dark"] .theme-swatch-card.active {
  background: rgba(30, 41, 59, 0.98);
  border-color: var(--t-primary);
}
html[data-mode="dark"] .theme-swatch-name {
  color: #f8fafc;
}
html[data-mode="dark"] .theme-swatch-desc {
  color: #94a3b8;
}


/* ==========================================================================
   10. TOPBAR ZOOM CAPSULE WIDGET & MODERN SAAS SIDEBAR (v=7.5)
   ========================================================================== */

/* Topbar Zoom Capsule Widget */
.topbar-zoom-capsule {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  gap: 2px;
  height: 36px;
  padding: 2px 4px;
  transition: all 0.2s ease;
}
.topbar-zoom-capsule:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
}
.topbar-zoom-btn {
  background: transparent;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}
.topbar-zoom-btn:hover {
  background: rgba(241, 245, 249, 0.9);
  color: var(--t-primary);
  transform: scale(1.1);
}
.topbar-zoom-btn:active {
  transform: scale(0.92);
}
.topbar-zoom-val {
  min-width: 38px;
  text-align: center;
  color: #1e293b;
  font-family: inherit;
  font-weight: 700;
  user-select: none;
  background: transparent;
  border: none;
  padding: 0 2px;
  line-height: 1;
}
.topbar-zoom-val:hover {
  color: var(--t-primary);
}

/* Dark Mode Zoom Capsule */
html[data-mode="dark"] .topbar-zoom-capsule {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
html[data-mode="dark"] .topbar-zoom-capsule:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.22);
}
html[data-mode="dark"] .topbar-zoom-btn {
  color: #cbd5e1;
}
html[data-mode="dark"] .topbar-zoom-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}
html[data-mode="dark"] .topbar-zoom-val {
  color: #f8fafc;
}

/* ==========================================================================
   MODERN HIGH-END SAAS SIDEBAR REDESIGN
   - Sleek floating pills with generous breathing room
   - Connected modern submenu tree lines
   - Subtle category micro-typography
   - Elegant hover micro-interactions
   ========================================================================== */

.sidebar,
body .sidebar {
  width: 260px !important;
  min-width: 260px !important;
}

.sidebar-navigation {
  padding: 10px 0 24px 0 !important;
}

/* Modern Category Headings */
.sidebar .menu-category,
.sidebar-navigation .menu-category {
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
  padding: 16px 18px 6px 18px !important;
  margin: 0 !important;
}
html[data-mode="dark"] .sidebar .menu-category,
html[data-mode="dark"] .sidebar-navigation .menu-category {
  color: #94a3b8 !important;
}

/* Modern Floating Navigation Link Pills */
.sidebar:not(.sidebar-folded) .menu-link,
.sidebar-navigation:not(.sidebar-folded) .menu-link,
.sidebar:not(.sidebar-folded) ul.menu > .menu-item > .menu-link {
  min-height: 40px !important;
  padding: 9px 14px !important;
  margin: 3px 12px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: #334155 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  background: transparent !important;
  border: none !important;
}
html[data-mode="dark"] .sidebar:not(.sidebar-folded) .menu-link,
html[data-mode="dark"] .sidebar-navigation:not(.sidebar-folded) .menu-link,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item > .menu-link {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item > .menu-link .title {
  color: #cbd5e1 !important;
}

/* Hover Interaction: Smooth forward micro-slide */
.sidebar:not(.sidebar-folded) .menu-link:hover,
.sidebar-navigation:not(.sidebar-folded) .menu-link:hover {
  background: rgba(241, 245, 249, 0.85) !important;
  color: var(--t-primary) !important;
  transform: translateX(3px) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}
html[data-mode="dark"] .sidebar:not(.sidebar-folded) .menu-link:hover,
html[data-mode="dark"] .sidebar-navigation:not(.sidebar-folded) .menu-link:hover,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item > .menu-link:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .sidebar:not(.sidebar-folded) .menu-link:hover .title,
html[data-mode="dark"] .sidebar-navigation:not(.sidebar-folded) .menu-link:hover .title,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item > .menu-link:hover .title {
  color: #ffffff !important;
}

/* Active State: Modern Frosted Tint Pill + Bold typography */
.sidebar:not(.sidebar-folded) .menu-item.active > .menu-link,
.sidebar-navigation:not(.sidebar-folded) .menu-item.active > .menu-link {
  background: var(--t-primary-soft) !important;
  color: var(--t-primary) !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
  transform: none !important;
}
.sidebar:not(.sidebar-folded) .menu-item.active > .menu-link .title {
  color: var(--t-primary) !important;
  font-weight: 700 !important;
}
html[data-mode="dark"] .sidebar:not(.sidebar-folded) .menu-item.active > .menu-link .title {
  color: var(--t-primary, #60a5fa) !important;
  font-weight: 700 !important;
}

/* Modern Icons */
.sidebar .menu-link .icon,
.sidebar-navigation .menu-link .icon,
.sidebar .menu-link i,
.sidebar-navigation .menu-link i {
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 15px !important;
  margin-right: 11px !important;
  margin-left: 0 !important;
  color: #64748b !important;
  transition: all 0.2s ease !important;
}
.sidebar .menu-link:hover .icon,
.sidebar .menu-link:hover i {
  color: var(--t-primary) !important;
  transform: scale(1.1) !important;
}
.sidebar .menu-item.active > .menu-link .icon,
.sidebar .menu-item.active > .menu-link i {
  color: var(--t-primary) !important;
}
html[data-mode="dark"] .sidebar .menu-link .icon,
html[data-mode="dark"] .sidebar-navigation .menu-link .icon,
html[data-mode="dark"] .sidebar .menu-link i,
html[data-mode="dark"] .sidebar-navigation .menu-link i {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .sidebar .menu-link:hover .icon,
html[data-mode="dark"] .sidebar-navigation .menu-link:hover .icon,
html[data-mode="dark"] .sidebar .menu-link:hover i,
html[data-mode="dark"] .sidebar-navigation .menu-link:hover i {
  color: #ffffff !important;
}

/* Modern Chevron Arrow */
.sidebar .menu-link .arrow,
.sidebar-navigation .menu-link .arrow {
  margin-left: auto !important;
  font-size: 11px !important;
  color: #94a3b8 !important;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease !important;
}
.sidebar .menu-item.open > .menu-link .arrow,
.sidebar .menu-link.open .arrow {
  transform: rotate(90deg) !important;
  color: var(--t-primary) !important;
}
html[data-mode="dark"] .sidebar .menu-link .arrow,
html[data-mode="dark"] .sidebar-navigation .menu-link .arrow {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .sidebar .menu-link:hover .arrow,
html[data-mode="dark"] .sidebar-navigation .menu-link:hover .arrow {
  color: #ffffff !important;
}
html[data-mode="dark"] .sidebar .menu-item.open > .menu-link .arrow,
html[data-mode="dark"] .sidebar .menu-link.open .arrow {
  color: var(--t-primary, #60a5fa) !important;
}

/* Modern Submenu Tree with Vertical Connected Guide */
.sidebar .menu-submenu,
.sidebar-navigation .menu-submenu {
  border-left: 2px solid rgba(226, 232, 240, 0.9) !important;
  margin: 3px 12px 6px 26px !important;
  padding: 3px 0 3px 8px !important;
  list-style: none !important;
}
html[data-mode="dark"] .sidebar .menu-submenu,
html[data-mode="dark"] .sidebar-navigation .menu-submenu {
  border-left-color: rgba(255, 255, 255, 0.12) !important;
}

.sidebar .menu-submenu .menu-link,
.sidebar-navigation .menu-submenu .menu-link {
  min-height: 32px !important;
  padding: 6px 12px !important;
  margin: 1px 4px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #475569 !important;
}
.sidebar .menu-submenu .menu-link:hover {
  background: rgba(241, 245, 249, 0.9) !important;
  color: var(--t-primary) !important;
  transform: translateX(3px) !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-link,
html[data-mode="dark"] .sidebar-navigation .menu-submenu .menu-link {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-link .title,
html[data-mode="dark"] .sidebar-navigation .menu-submenu .menu-link .title {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-link:hover,
html[data-mode="dark"] .sidebar-navigation .menu-submenu .menu-link:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-link:hover .title,
html[data-mode="dark"] .sidebar-navigation .menu-submenu .menu-link:hover .title {
  color: #ffffff !important;
}

.sidebar .menu-submenu .menu-item.active > .menu-link {
  background: var(--t-primary-soft) !important;
  color: var(--t-primary) !important;
  font-weight: 700 !important;
  border-radius: 9px !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-item.active > .menu-link {
  color: var(--t-primary, #60a5fa) !important;
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.2)) !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-item.active > .menu-link .title {
  color: var(--t-primary, #60a5fa) !important;
}

/* Modern Submenu Dot Indicator */
.sidebar .menu-submenu .menu-link .dot {
  width: 6px !important;
  height: 6px !important;
  min-width: 6px !important;
  max-width: 6px !important;
  border-radius: 50% !important;
  background-color: #cbd5e1 !important;
  margin-right: 9px !important;
  transition: all 0.2s ease !important;
}
.sidebar .menu-submenu .menu-link:hover .dot {
  background-color: var(--t-primary) !important;
  transform: scale(1.2) !important;
}
.sidebar .menu-submenu .menu-item.active > .menu-link .dot {
  background-color: var(--t-primary) !important;
  box-shadow: 0 0 6px var(--t-primary) !important;
  transform: scale(1.3) !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-link .dot,
html[data-mode="dark"] .sidebar-navigation .menu-submenu .menu-link .dot {
  background-color: #64748b !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-link:hover .dot,
html[data-mode="dark"] .sidebar-navigation .menu-submenu .menu-link:hover .dot {
  background-color: #ffffff !important;
}
html[data-mode="dark"] .sidebar .menu-submenu .menu-item.active > .menu-link .dot,
html[data-mode="dark"] .sidebar-navigation .menu-submenu .menu-item.active > .menu-link .dot {
  background-color: var(--t-primary, #60a5fa) !important;
  box-shadow: 0 0 6px var(--t-primary, #60a5fa) !important;
}

/* Modern Floating Profile Footer */
.sidebar-profile-card,
.sidebar .sidebar-profile-card {
  margin: 8px 12px 14px 12px !important;
  padding: 10px 14px !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(226, 232, 240, 0.85) !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04) !important;
  backdrop-filter: blur(12px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
html[data-mode="dark"] .sidebar-profile-card {
  background: rgba(30, 41, 59, 0.72) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

.sidebar-profile-badge {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 10px !important;
  background: var(--t-primary) !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12) !important;
}
.sidebar-profile-logout {
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #94a3b8 !important;
  transition: all 0.15s ease !important;
}
.sidebar-profile-logout:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #ef4444 !important;
  transform: scale(1.08) !important;
}

/* Modern Folded Sidebar (80px Mode) */
@media (min-width: 992px) {
  body.sidebar-folded .sidebar-navigation ul.menu {
    padding: 12px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 80px !important;
  }
  body.sidebar-folded .sidebar .menu-item {
    width: 80px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 3px 0 !important;
  }
  body.sidebar-folded .sidebar .menu-link {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 12px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  body.sidebar-folded .sidebar .menu-link:hover {
    background: rgba(241, 245, 249, 0.9) !important;
    color: var(--t-primary) !important;
    transform: scale(1.06) !important;
  }
  body.sidebar-folded .sidebar .menu-item.active > .menu-link {
    background: var(--t-primary-soft) !important;
    color: var(--t-primary) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
  }
  body.sidebar-folded .sidebar-profile-card {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    margin: 8px auto 14px auto !important;
    padding: 8px 0 !important;
    justify-content: center !important;
  }
  body.sidebar-folded .sidebar-profile-card .profile-meta,
  body.sidebar-folded .sidebar-profile-card .sidebar-profile-logout {
    display: none !important;
  }
}

/* ==========================================================================
   8. ENHANCED TOPBAR & MODERN SPACIOUS THEME PICKER (v=7.6)
   ========================================================================== */

html:not([data-mode="dark"]) .theme-picker-menu {
  width: 440px !important;
  min-width: 440px !important;
  max-width: 95vw !important;
  padding: 20px 22px !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 25px 65px -10px rgba(15, 23, 42, 0.22) !important;
  z-index: 1050 !important;
}
html[data-mode="dark"] .theme-picker-menu {
  width: 440px !important;
  min-width: 440px !important;
  max-width: 95vw !important;
  padding: 20px 22px !important;
  border-radius: 22px !important;
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.75) !important;
  color: #f8fafc !important;
  z-index: 1050 !important;
}

@media (max-width: 768px) {
  header.topbar,
  .topbar {
    overflow: visible !important;
  }

  .theme-picker-menu {
    position: fixed !important;
    top: 58px !important;
    bottom: auto !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 75px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    transform: none !important;
    margin: 0 !important;
    padding: 16px 14px !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45) !important;
    z-index: 10000 !important;
  }
}

/* Fullscreen Button in Theme Menu Styling */
html[data-mode="dark"] #btnThemeFullscreen {
  background: rgba(30, 41, 59, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #f1f5f9 !important;
}
html[data-mode="dark"] #btnThemeFullscreen i {
  color: #cbd5e1 !important;
}
#btnThemeFullscreen.active {
  background: var(--t-primary, #2563eb) !important;
  border-color: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
}
#btnThemeFullscreen.active i {
  color: #ffffff !important;
}

.theme-picker-label {
  color: #475569;
  font-size: 11px !important;
  font-weight: 800 !important;
}
.theme-picker-sublabel {
  color: #94a3b8;
  font-weight: 600;
  font-size: 10.5px !important;
}
.theme-badge-current {
  background: var(--t-primary-soft);
  color: var(--t-primary);
  font-size: 10.5px !important;
  padding: 3px 10px !important;
}

.theme-mode-segmented {
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.85);
  padding: 4px !important;
  gap: 6px !important;
}

.theme-mode-btn {
  background: transparent;
  border: none;
  color: #64748b;
  padding: 8px 12px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  border-radius: 9px !important;
  transition: all 0.15s ease;
}
.theme-mode-btn:hover {
  color: var(--t-primary);
}
.theme-mode-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.theme-swatch-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
}
@media (max-width: 360px) {
  .theme-swatch-grid {
    grid-template-columns: 1fr !important;
  }
}

html:not([data-mode="dark"]) .theme-swatch-card {
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  padding: 10px 13px !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.75) !important;
  border: 1.5px solid rgba(226, 232, 240, 0.9) !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  width: 100% !important;
  min-height: 52px !important;
}
html:not([data-mode="dark"]) .theme-swatch-card:hover {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07) !important;
}
html:not([data-mode="dark"]) .theme-swatch-card.active {
  background: #ffffff !important;
  border-color: var(--t-primary) !important;
  box-shadow: 0 6px 18px var(--t-primary-soft, rgba(79, 70, 229, 0.22)) !important;
}
html:not([data-mode="dark"]) .theme-swatch-name {
  color: #0f172a !important;
}
html:not([data-mode="dark"]) .theme-swatch-desc {
  color: #64748b !important;
}

/* Dark Mode Swatch Cards in Theme Picker */
html[data-mode="dark"] .theme-swatch-card {
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  padding: 10px 13px !important;
  border-radius: 14px !important;
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.10) !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  width: 100% !important;
  min-height: 52px !important;
}
html[data-mode="dark"] .theme-swatch-card:hover {
  background: rgba(30, 41, 59, 0.98) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45) !important;
}
html[data-mode="dark"] .theme-swatch-card.active {
  background: rgba(30, 41, 59, 0.98) !important;
  border-color: var(--t-primary, #3b82f6) !important;
  box-shadow: 0 6px 20px var(--t-primary-soft, rgba(59, 130, 246, 0.3)) !important;
}
html[data-mode="dark"] .theme-swatch-name {
  color: #f8fafc !important;
}
html[data-mode="dark"] .theme-swatch-desc {
  color: #94a3b8 !important;
}

.theme-swatch-orb {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.7), 0 2px 6px rgba(0,0,0,0.14) !important;
}

.theme-swatch-info {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  flex: 1 !important;
  justify-content: center !important;
}
.theme-swatch-name {
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1.25 !important;
  margin-bottom: 2px !important;
}
.theme-swatch-desc {
  font-size: 11px !important;
  color: #64748b !important;
  line-height: 1.35 !important;
  white-space: normal !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.theme-swatch-check {
  font-size: 12px !important;
  color: var(--t-primary) !important;
  opacity: 0 !important;
  transform: scale(0.6) !important;
  transition: all 0.15s ease !important;
  margin-left: 2px !important;
  flex-shrink: 0 !important;
}
.theme-swatch-card.active .theme-swatch-check {
  opacity: 1 !important;
  transform: scale(1) !important;
}


/* ==========================================================================
   BORDERLESS DISCUSSION COMMENTS (custom.css?v=7.8)
   ========================================================================== */
.diskusi-comments-wrapper,
.diskusi-reply-form,
[id^="comment-item-"],
.diskusi-comments-wrapper [id^="comment-item-"],
div[id^="comment-item-"],
.diskusi-comments-list > div {
  border: none !important;
  border-width: 0 !important;
  outline: none !important;
}

[id^="comment-item-"] {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

html[data-mode="dark"] [id^="comment-item-"],
html[data-mode="dark"] .diskusi-comments-wrapper [id^="comment-item-"],
html[data-mode="dark"] div[id^="comment-item-"] {
  border: none !important;
  border-width: 0 !important;
  background: rgba(30, 41, 59, 0.5) !important;
}

html[data-mode="dark"] .diskusi-comments-wrapper,
html[data-mode="dark"] .diskusi-reply-form {
  border: none !important;
  border-width: 0 !important;
}


/* Active Font Size Button Accent */
[data-font-size].active {
  background: var(--t-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--t-primary-soft, rgba(79, 70, 229, 0.25)) !important;
}
[data-font-size].active span {
  color: #ffffff !important;
}
html[data-mode="dark"] [data-font-size].active {
  background: var(--t-primary) !important;
  color: #ffffff !important;
}


/* ==========================================================================
   ULTRA-SMOOTH HARDWARE-ACCELERATED GPU MARQUEE (custom.css?v=8.0)
   - Zero CPU repaint / Zero reflow during scroll
   - 100% GPU Compositor Thread animation (translate3d)
   - Edge fade masks & pause on hover
   ========================================================================== */
.broadcast-marquee-card {
  contain: paint layout !important;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.marquee-viewport {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  contain: paint layout;
  mask-image: linear-gradient(to right, transparent 0%, black 14px, black calc(100% - 14px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 14px, black calc(100% - 14px), transparent 100%);
}

.marquee-track {
  display: inline-flex;
  gap: 4rem;
  white-space: nowrap;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  animation: gpuMarquee 30s linear infinite;
}

.broadcast-marquee-card:hover .marquee-track {
  animation-play-state: paused !important;
}

@keyframes gpuMarquee {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@-webkit-keyframes gpuMarquee {
  0% {
    -webkit-transform: translate3d(0, 0, 0);
  }
  100% {
    -webkit-transform: translate3d(-50%, 0, 0);
  }
}

.marquee-item {
  display: inline-block;
  white-space: nowrap;
  transform: translateZ(0);
}

html[data-mode="dark"] .marquee-item {
  color: #fef08a !important;
}


/* ==========================================================================
   GLOBAL HIDE SITE FOOTER (User requested)
   ========================================================================== */
.site-footer,
footer.site-footer {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border: none !important;
}


/* ==========================================================================
   MODERN LIST MATERI SYSTEM (v=8.2)
   ========================================================================== */

/* 1. Header & Filter Card */
.materi-filter-card {
  background: var(--t-surface, #ffffff);
  border: 1px solid var(--t-surface-border, #e2e8f0);
  border-radius: 20px;
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 25px rgba(15, 23, 42, 0.04);
  /* backdrop-filter optimized */
  transition: all 0.25s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.materi-filter-card .row {
  margin-left: -8px !important;
  margin-right: -8px !important;
  row-gap: 14px !important;
}
.materi-filter-card .row > [class*="col-"] {
  padding-left: 8px !important;
  padding-right: 8px !important;
}
html[data-mode="dark"] .materi-filter-card {
  background: var(--t-surface, #1e293b);
  border-color: var(--t-surface-border, rgba(255, 255, 255, 0.08));
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
}

.materi-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--t-surface-border, #f1f5f9);
}
html[data-mode="dark"] .materi-header-row {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.materi-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.materi-header-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(99, 102, 241, 0.25));
  color: var(--t-primary, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}
html[data-mode="dark"] .materi-header-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(129, 140, 248, 0.15));
  color: #a5b4fc;
}

.materi-header-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--t-text-main, #0f172a);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
html[data-mode="dark"] .materi-header-title {
  color: #f8fafc;
}

.materi-header-sub {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: var(--t-text-muted, #64748b);
  line-height: 1.4;
}
html[data-mode="dark"] .materi-header-sub {
  color: #94a3b8;
}

/* Quick Filter Pills */
.materi-quick-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 18px;
  scrollbar-width: thin;
}
.materi-quick-filters::-webkit-scrollbar {
  height: 4px;
}
.materi-quick-filters::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}

.materi-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  background: var(--t-surface-subtle, #f8fafc);
  color: var(--t-text-muted, #64748b);
  border: 1px solid var(--t-surface-border, #e2e8f0);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
html[data-mode="dark"] .materi-filter-pill {
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.08);
}
.materi-filter-pill:hover {
  background: var(--t-primary-soft, rgba(79, 70, 229, 0.08));
  color: var(--t-primary, #4f46e5);
  border-color: var(--t-primary-soft, rgba(79, 70, 229, 0.2));
  transform: translateY(-1px);
}
.materi-filter-pill.active {
  background: var(--t-primary, #4f46e5) !important;
  color: #ffffff !important;
  border-color: var(--t-primary, #4f46e5) !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* Filter Inputs & Dropdowns (Standardized Cross-Device Sizing) */
.materi-filter-label {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  margin-bottom: 7px !important;
  min-height: 18px !important;
  line-height: 1 !important;
}
.materi-filter-label i,
.materi-filter-label svg {
  width: 14px !important;
  height: 14px !important;
  font-size: 14px !important;
  color: var(--t-primary, #10b981) !important;
  stroke: var(--t-primary, #10b981) !important;
  stroke-width: 2 !important;
  display: inline-block !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}
html[data-mode="dark"] .materi-filter-label {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .materi-filter-label i,
html[data-mode="dark"] .materi-filter-label svg {
  color: #38bdf8 !important;
  stroke: #38bdf8 !important;
}

.materi-form-control {
  display: block !important;
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  line-height: normal !important;
  background-color: var(--t-surface-subtle, #ffffff) !important;
  border: 1.5px solid var(--t-surface-border, #cbd5e1) !important;
  color: var(--t-text-main, #0f172a) !important;
  border-radius: 10px !important;
  padding: 0 14px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  box-sizing: border-box !important;
  -webkit-box-sizing: border-box !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  transition: all 0.2s ease !important;
}

/* Custom dropdown chevron for select elements - vertically dead-centered */
select.materi-form-control {
  line-height: normal !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 14px !important;
  padding-right: 38px !important;
  vertical-align: middle !important;
  background-color: var(--t-surface-subtle, #ffffff) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px 16px !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  cursor: pointer !important;
}
select.materi-form-control::-ms-expand {
  display: none !important;
}

/* Date input normalization for Chrome, Edge, Safari & Mobile */
input[type="date"].materi-form-control {
  position: relative !important;
  display: block !important;
  padding-left: 14px !important;
  padding-right: 38px !important;
  box-sizing: border-box !important;
  text-align: left !important;
  cursor: text !important;
  color-scheme: light;
}
input[type="date"].materi-form-control::-webkit-datetime-edit {
  display: inline-flex !important;
  align-items: center !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
input[type="date"].materi-form-control::-webkit-date-and-time-value {
  text-align: left !important;
  line-height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
}
input[type="date"].materi-form-control::-webkit-calendar-picker-indicator {
  position: absolute !important;
  right: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  cursor: pointer !important;
  opacity: 0.65 !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 18px !important;
  height: 18px !important;
  transition: opacity 0.2s ease !important;
}
input[type="date"].materi-form-control::-webkit-calendar-picker-indicator:hover {
  opacity: 1 !important;
}

html[data-mode="dark"] .materi-form-control {
  background-color: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #f1f5f9 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25) !important;
}
html[data-mode="dark"] .materi-form-control:hover {
  border-color: rgba(255, 255, 255, 0.25) !important;
}
html[data-mode="dark"] .materi-form-control::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}
html[data-mode="dark"] select.materi-form-control {
  background-color: #0f172a !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px 16px !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}
html[data-mode="dark"] select.materi-form-control option {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
}
html[data-mode="dark"] input[type="date"].materi-form-control {
  color-scheme: dark !important;
  color: #f1f5f9 !important;
}
html[data-mode="dark"] input[type="date"].materi-form-control::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(0.85) !important;
  opacity: 0.75 !important;
}
html[data-mode="dark"] input[type="date"].materi-form-control::-webkit-calendar-picker-indicator:hover {
  opacity: 1 !important;
}

.materi-form-control:focus,
html[data-mode="dark"] .materi-form-control:focus {
  border-color: var(--t-primary, #10b981) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18) !important;
  outline: none !important;
}

/* Header Tahun Ajaran Selector Dropdown */
.materi-th-wrap {
  position: relative !important;
  display: inline-block !important;
  flex: 0 0 auto !important;
  min-width: 154px !important;
}
.materi-th-select {
  display: block !important;
  width: 100% !important;
  min-width: 154px !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  line-height: normal !important;
  padding: 0 34px 0 14px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  -webkit-box-sizing: border-box !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  background-color: rgba(37, 99, 235, 0.08) !important;
  border: 1.5px solid rgba(37, 99, 235, 0.25) !important;
  color: var(--t-primary, #2563eb) !important;
  cursor: pointer !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 13px 13px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  transition: all 0.2s ease !important;
}
.materi-th-select:hover {
  background-color: rgba(37, 99, 235, 0.12) !important;
  border-color: rgba(37, 99, 235, 0.4) !important;
}
.materi-th-select:focus {
  outline: none !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
}
html[data-mode="dark"] .materi-th-select {
  background-color: rgba(56, 189, 248, 0.1) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
  color: #38bdf8 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}
html[data-mode="dark"] .materi-th-select:hover {
  background-color: rgba(56, 189, 248, 0.16) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
}
html[data-mode="dark"] .materi-th-select:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2) !important;
}
html[data-mode="dark"] .materi-th-select option {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
}

/* 2. Materi Card Grid */
.materi-card-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
@media (min-width: 768px) {
  .materi-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1366px) {
  .materi-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Individual Card */
.materi-card {
  background: var(--t-surface, #ffffff);
  border: 1px solid var(--t-surface-border, #e2e8f0);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 3px 16px rgba(15, 23, 42, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
html[data-mode="dark"] .materi-card {
  background: var(--t-surface, #1e293b);
  border-color: var(--t-surface-border, rgba(255, 255, 255, 0.08));
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.materi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border-color: var(--t-primary-soft, rgba(79, 70, 229, 0.3));
}
html[data-mode="dark"] .materi-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  border-color: rgba(99, 102, 241, 0.4);
}

/* Accent top border strip based on status - REMOVED for clean minimal design */
.materi-card::before {
  display: none !important;
  content: none !important;
  height: 0 !important;
}

/* Card Top Bar */
.materi-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
/* Materi Mapel Text (Plain text di atas judul materi, tanpa badge & tanpa icon) */
.materi-mapel-text {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--t-primary, #2563eb);
  margin-bottom: 4px;
  line-height: 1.35;
  display: block;
  text-decoration: none !important;
}
html[data-mode="dark"] .materi-mapel-text {
  color: var(--t-primary, #60a5fa);
}

.materi-mapel-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.08)) !important;
  color: var(--t-primary, #2563eb) !important;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-mode="dark"] .materi-mapel-badge {
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.15)) !important;
  color: var(--t-primary, #60a5fa) !important;
}

.materi-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.status-pill-active {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}
html[data-mode="dark"] .status-pill-active {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}
.status-pill-active .pulse-dot {
  background: #10b981 !important;
}
html[data-mode="dark"] .status-pill-active .pulse-dot {
  background: #34d399 !important;
}
.status-pill-today {
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.12)) !important;
  color: var(--t-primary, #2563eb) !important;
  border: 1px solid rgba(37, 99, 235, 0.25) !important;
}
html[data-mode="dark"] .status-pill-today {
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.2)) !important;
  color: var(--t-primary, #60a5fa) !important;
}
.status-pill-upcoming {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}
html[data-mode="dark"] .status-pill-upcoming {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}
.status-pill-past {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}
html[data-mode="dark"] .status-pill-past {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}
.status-pill-draft {
  background: rgba(148, 163, 184, 0.12);
  color: #64748b;
}
html[data-mode="dark"] .status-pill-draft {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

/* Pulse Dot */
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulseDot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* Card Title & Code */
.materi-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--t-text-main, #0f172a);
  line-height: 1.35;
  margin: 0 0 6px 0;
  display: block;
  text-decoration: none !important;
  transition: color 0.15s ease;
}
html[data-mode="dark"] .materi-card-title {
  color: #f1f5f9;
}
.materi-card-title:hover {
  color: var(--t-primary, #4f46e5);
}

.materi-code-chip {
  display: inline-flex;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  color: var(--t-text-muted, #64748b);
  background: var(--t-surface-subtle, rgba(0,0,0,0.03));
  padding: 2px 7px;
  border-radius: 6px;
  margin-bottom: 8px;
}
html[data-mode="dark"] .materi-code-chip {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}

.materi-desc-text {
  font-size: 12.5px;
  color: var(--t-text-muted, #64748b);
  line-height: 1.45;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
html[data-mode="dark"] .materi-desc-text {
  color: #94a3b8;
}

/* Meta Rows */
.materi-meta-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--t-surface-subtle, #f8fafc);
  border-radius: 12px;
  border: 1px solid var(--t-surface-border, #f1f5f9);
}
html[data-mode="dark"] .materi-meta-list {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
}

.materi-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--t-text-muted, #475569);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-mode="dark"] .materi-meta-item {
  color: #cbd5e1;
}
.materi-meta-item i {
  font-size: 13px;
  width: 16px;
  text-align: center;
  color: var(--t-primary) !important;
  opacity: 0.85;
}

/* Target Classes Chips */
.materi-classes-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.materi-class-chip {
  display: inline;
  padding: 0;
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  box-shadow: none !important;
  font-size: inherit;
  font-weight: 600;
  color: var(--t-text-main, #334155);
}
html[data-mode="dark"] .materi-class-chip {
  background: transparent !important;
  border: none !important;
  color: #cbd5e1;
}

/* Engagement Counters & Badges */
.materi-counters-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.materi-counter-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.materi-counter-presensi {
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.1)) !important;
  color: var(--t-primary, #0284c7) !important;
}
html[data-mode="dark"] .materi-counter-presensi {
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.18)) !important;
  color: var(--t-primary, #38bdf8) !important;
}
.materi-counter-diskusi {
  background: rgba(234, 179, 8, 0.12);
  color: #b45309;
}
html[data-mode="dark"] .materi-counter-diskusi {
  background: rgba(234, 179, 8, 0.18);
  color: #fde047;
}
.materi-counter-tugas {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
}
html[data-mode="dark"] .materi-counter-tugas {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
}
.materi-counter-test {
  background: rgba(168, 85, 247, 0.12);
  color: #7e22ce;
}
html[data-mode="dark"] .materi-counter-test {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}

/* Siswa Specific State Tags */
.materi-tag-ikut {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}
html[data-mode="dark"] .materi-tag-ikut {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.materi-tag-belumikut {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}
html[data-mode="dark"] .materi-tag-belumikut {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
}

/* Card Bottom Action Bar */
.materi-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--t-surface-border, #f1f5f9);
}
html[data-mode="dark"] .materi-card-footer {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.materi-btn-open {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  background: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
  border: none;
  box-shadow: 0 4px 12px var(--t-orb-1, rgba(37, 99, 235, 0.25)) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.materi-btn-open:hover {
  background: var(--t-primary-hover, #1d4ed8) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--t-orb-1, rgba(37, 99, 235, 0.35)) !important;
}

.materi-btn-locked {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  background: var(--t-surface-subtle, #f1f5f9);
  color: var(--t-text-muted, #94a3b8) !important;
  border: 1px solid var(--t-surface-border, #e2e8f0);
  cursor: pointer;
}
html[data-mode="dark"] .materi-btn-locked {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: #64748b !important;
}

.materi-menu-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--t-surface-subtle, #f8fafc);
  border: 1px solid var(--t-surface-border, #e2e8f0);
  color: var(--t-text-muted, #64748b);
  transition: all 0.2s ease;
  cursor: pointer;
}
html[data-mode="dark"] .materi-menu-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}
.materi-menu-btn:hover {
  background: var(--t-surface-border, #e2e8f0);
  color: var(--t-text-main, #0f172a);
}

/* Empty State */
.materi-empty-card {
  background: var(--t-surface, #ffffff);
  border: 2px dashed var(--t-surface-border, #cbd5e1);
  border-radius: 20px;
  padding: 48px 24px;
  text-align: center;
  margin: 20px 0;
  grid-column: 1 / -1;
}
html[data-mode="dark"] .materi-empty-card {
  background: var(--t-surface, #1e293b);
  border-color: rgba(255, 255, 255, 0.12);
}
.materi-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--t-primary-soft, rgba(79, 70, 229, 0.1));
  color: var(--t-primary, #4f46e5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
}
.materi-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--t-text-main, #0f172a);
  margin-bottom: 6px;
}
html[data-mode="dark"] .materi-empty-title {
  color: #f8fafc;
}
.materi-empty-desc {
  font-size: 13.5px;
  color: var(--t-text-muted, #64748b);
  max-width: 440px;
  margin: 0 auto 20px auto;
  line-height: 1.5;
}
html[data-mode="dark"] .materi-empty-desc {
  color: #94a3b8;
}


/* ==========================================================================
   EDLINK / SEVIMA STYLE MATERI & CALENDAR LAYOUT (v=8.3)
   ========================================================================== */

/* Main 2-Column Grid Container */
.edlink-layout-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 30px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 1024px) {
  .edlink-layout-container {
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: start;
  }
  .edlink-main-panel {
    position: -webkit-sticky;
    position: sticky;
    top: 85px;
    will-change: top;
  }
}

.edlink-calendar-widget,
.edlink-main-panel {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Left Widget Card (Semi-Glassy) */
html:not([data-mode="dark"]) .edlink-calendar-widget {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(248, 250, 255, 0.70) 100%) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: 20px !important;
  padding: 22px !important;
  box-shadow: 0 8px 30px -4px rgba(28, 81, 157, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  position: relative !important;
}
html[data-mode="dark"] .edlink-calendar-widget {
  background: var(--t-surface, #1e293b);
  border-color: var(--t-surface-border, rgba(255, 255, 255, 0.08));
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.edlink-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--t-surface-border, #f1f5f9);
}
html[data-mode="dark"] .edlink-widget-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
.edlink-widget-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--t-text-main, #0f172a);
  margin: 0;
}
html[data-mode="dark"] .edlink-widget-title {
  color: #f8fafc;
}
.edlink-widget-date {
  font-size: 11.5px;
  color: var(--t-text-muted, #64748b);
  margin: 0;
}

/* Calendar Week Strip */
.edlink-week-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 18px;
  padding-bottom: 4px;
}
.edlink-day-pill {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  border-radius: 12px;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--t-text-muted, #64748b);
  position: relative;
  background: transparent;
}
html[data-mode="dark"] .edlink-day-pill {
  color: #94a3b8;
}
.edlink-day-pill:hover {
  background: var(--t-surface-subtle, rgba(0, 0, 0, 0.04));
  color: var(--t-text-main, #0f172a);
  transform: translateY(-1px);
}
html[data-mode="dark"] .edlink-day-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}
.edlink-day-pill.active {
  background: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px var(--t-orb-1, rgba(37, 99, 235, 0.35)) !important;
}
.edlink-day-name {
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  margin-bottom: 2px;
}
.edlink-day-num {
  font-size: 14px;
  font-weight: 800;
}
.edlink-day-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--t-primary, #2563eb);
  margin-top: 4px;
  opacity: 0;
}
.edlink-day-pill.has-materi .edlink-day-dot {
  opacity: 1;
}
.edlink-day-pill.active .edlink-day-dot {
  background: #ffffff;
}

/* Alert Summary Box */
.edlink-alert-box {
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.08)) !important;
  border: 1px solid var(--t-primary-soft, rgba(37, 99, 235, 0.25)) !important;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t-primary, #2563eb) !important;
}
html[data-mode="dark"] .edlink-alert-box {
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.12)) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--t-primary, #60a5fa) !important;
}

/* Left Sessions List (Semi-Glassy) */
html:not([data-mode="dark"]) .edlink-session-card {
  background: rgba(255, 255, 255, 0.60) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(226, 232, 240, 0.80) !important;
  border-radius: 14px !important;
  padding: 14px !important;
  margin-bottom: 12px !important;
  transition: all 0.2s ease !important;
}

html:not([data-mode="dark"]) .edlink-session-card:hover {
  background: rgba(255, 255, 255, 0.85) !important;
}
html[data-mode="dark"] .edlink-session-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.07);
}
.edlink-session-card:hover {
  border-color: var(--t-primary, #2563eb) !important;
  box-shadow: 0 4px 14px var(--t-orb-1, rgba(0, 0, 0, 0.05)) !important;
}
.edlink-session-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.12)) !important;
  color: var(--t-primary, #2563eb) !important;
  margin-bottom: 6px;
}
html[data-mode="dark"] .edlink-session-tag {
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.2)) !important;
  color: var(--t-primary, #60a5fa) !important;
}
.edlink-session-ongoing {
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.04)) !important;
  border-color: var(--t-primary-soft, rgba(37, 99, 235, 0.25)) !important;
}
html[data-mode="dark"] .edlink-session-ongoing {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
.edlink-session-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--t-text-main, #0f172a);
  margin-bottom: 4px;
  line-height: 1.35;
}
html[data-mode="dark"] .edlink-session-title {
  color: #f1f5f9;
}
.edlink-session-meta {
  font-size: 11.5px;
  color: var(--t-text-muted, #64748b);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
html[data-mode="dark"] .edlink-session-meta {
  color: #94a3b8;
}

/* Auto-Absensi Pill */
.auto-absensi-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
}
.auto-absensi-pill.hadir {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}
html[data-mode="dark"] .auto-absensi-pill.hadir {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.auto-absensi-pill.belum {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}
html[data-mode="dark"] .auto-absensi-pill.belum {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
}
.auto-absensi-pill.diskusi {
  background: rgba(234, 179, 8, 0.12);
  color: #b45309;
}
html[data-mode="dark"] .auto-absensi-pill.diskusi {
  background: rgba(234, 179, 8, 0.18);
  color: #fde047;
}
.auto-absensi-pill.tugas {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
}
html[data-mode="dark"] .auto-absensi-pill.tugas {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
}

/* Edlink Action Buttons in Session Cards */
.edlink-session-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.edlink-btn-open {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  background: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
  border: none;
  box-shadow: 0 3px 10px var(--t-orb-1, rgba(37, 99, 235, 0.25)) !important;
  transition: all 0.2s ease;
  cursor: pointer;
}
.edlink-btn-open:hover {
  background: var(--t-primary-hover, #1d4ed8) !important;
  transform: translateY(-1px);
}
.edlink-btn-locked {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  background: var(--t-surface, #e2e8f0);
  color: var(--t-text-muted, #64748b) !important;
  border: 1px solid var(--t-surface-border, #cbd5e1);
  cursor: pointer;
  transition: all 0.2s ease;
}
html[data-mode="dark"] .edlink-btn-locked {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8 !important;
}

/* Right Main Section */
.edlink-main-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.edlink-tabs-nav {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  border-bottom: 2px solid var(--t-surface-border, #e2e8f0) !important;
  padding-bottom: 0px !important;
  margin-bottom: 18px !important;
  gap: 6px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.edlink-tabs-nav::-webkit-scrollbar {
  display: none !important;
}
html[data-mode="dark"] .edlink-tabs-nav {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
.edlink-tab-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  padding: 8px 14px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--t-text-muted, #64748b) !important;
  border-bottom: 2.5px solid transparent !important;
  margin-bottom: -2px !important;
  text-decoration: none !important;
  height: 40px !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}
html[data-mode="dark"] .edlink-tab-btn {
  color: #94a3b8 !important;
}
.edlink-tab-btn.active {
  color: var(--t-primary, #2563eb) !important;
  border-bottom-color: var(--t-primary, #2563eb) !important;
  font-weight: 700 !important;
}
.edlink-tab-btn:hover {
  color: var(--t-primary, #2563eb) !important;
}

/* Auto-Presensi Banner in lihatmateri.php */
.auto-presensi-banner {
  background: linear-gradient(135deg, var(--t-primary-soft, rgba(37, 99, 235, 0.1)) 0%, rgba(255, 255, 255, 0.5) 100%) !important;
  border: 1px solid var(--t-primary-soft, rgba(37, 99, 235, 0.3)) !important;
  border-radius: 16px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px var(--t-orb-1, rgba(37, 99, 235, 0.08)) !important;
}
html[data-mode="dark"] .auto-presensi-banner {
  background: linear-gradient(135deg, var(--t-primary-soft, rgba(37, 99, 235, 0.18)) 0%, rgba(255, 255, 255, 0.03) 100%) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ==========================================================================
   EDLINK MAPEL GROUPING (BERLANGSUNG)
   ========================================================================== */
.edlink-mapel-group {
  background: var(--t-surface, #ffffff);
  border: 1px solid var(--t-surface-border, #e2e8f0);
  border-radius: 14px;
  padding: 12px 14px !important;
  margin-bottom: 12px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
html[data-mode="dark"] .edlink-mapel-group {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.edlink-mapel-group:hover {
  border-color: var(--t-primary, #2563eb) !important;
  box-shadow: 0 4px 14px var(--t-orb-1, rgba(0, 0, 0, 0.07)) !important;
}

.edlink-mapel-subbar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  width: 100% !important;
  padding-top: 8px !important;
  margin-top: 6px !important;
  border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
  box-sizing: border-box !important;
}

html[data-mode="dark"] .edlink-mapel-subbar {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

.edlink-mapel-subbar > div:first-child,
.edlink-subbar-left {
  display: flex !important;
  align-items: center !important;
  flex: 0 1 auto !important;
  min-width: 0 !important;
}

.edlink-mapel-subbar > div:last-child,
.edlink-subbar-right {
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
}

.edlink-mapel-subbar .materi-status-pill {
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  padding: 0 10px !important;
  height: 24px !important;
  line-height: 24px !important;
  border-radius: 9999px !important;
  letter-spacing: 0.1px !important;
  text-transform: capitalize !important;
  box-sizing: border-box !important;
}

.edlink-mapel-subbar .btn-toggle-left-mapel {
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  padding: 0 10px !important;
  height: 24px !important;
  line-height: 24px !important;
  border-radius: 9999px !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

@media (max-width: 480px) {
  .edlink-mapel-subbar {
    gap: 4px !important;
    padding-top: 6px !important;
    margin-top: 4px !important;
  }
  .edlink-mapel-subbar .materi-status-pill {
    font-size: 9.5px !important;
    padding: 0 8px !important;
    height: 22px !important;
    line-height: 22px !important;
  }
  .edlink-mapel-subbar .btn-toggle-left-mapel {
    font-size: 9.5px !important;
    padding: 0 8px !important;
    height: 22px !important;
    line-height: 22px !important;
  }
}
.edlink-mapel-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}
.edlink-mapel-btn-wrap {
  flex-shrink: 0 !important;
  margin-left: auto !important;
  display: flex !important;
  justify-content: flex-end !important;
}
.edlink-mapel-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.edlink-mapel-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.edlink-mapel-icon svg,
.edlink-mapel-icon i {
  width: 18px !important;
  height: 18px !important;
  stroke-width: 2.2 !important;
  display: inline-block !important;
}

.edlink-mapel-icon i[data-lucide="book-open"]:empty {
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'%3E%3C/path%3E%3Cpath d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'%3E%3C/path%3E%3C/svg%3E");
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

html[data-mode="dark"] .edlink-mapel-icon {
  background: var(--mapel-dark-bg, rgba(255, 255, 255, 0.08)) !important;
  color: var(--mapel-dark-color, #e2e8f0) !important;
  border-color: var(--mapel-dark-border, rgba(255, 255, 255, 0.15)) !important;
}
.edlink-ongoing-header {
  color: #047857 !important;
}
html[data-mode="dark"] .edlink-ongoing-header {
  color: #34d399 !important;
}
.edlink-ongoing-header .pulse-dot {
  background: #10b981 !important;
}
html[data-mode="dark"] .edlink-ongoing-header .pulse-dot {
  background: #34d399 !important;
}
.edlink-mapel-title {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: var(--t-text-main, #0f172a) !important;
  margin: 0 !important;
  line-height: 1.35 !important;
  word-break: break-word !important;
}
html[data-mode="dark"] .edlink-mapel-title {
  color: #f8fafc !important;
}

/* Flexible Section Header Titles */
.edlink-hdr-ongoing { color: #047857 !important; }
html[data-mode="dark"] .edlink-hdr-ongoing { color: #34d399 !important; }

.edlink-hdr-finished { color: #059669 !important; }
html[data-mode="dark"] .edlink-hdr-finished { color: #34d399 !important; }

.edlink-hdr-scheduled { color: #2563eb !important; }
html[data-mode="dark"] .edlink-hdr-scheduled { color: #38bdf8 !important; }

.edlink-hdr-other { color: #64748b !important; }
html[data-mode="dark"] .edlink-hdr-other { color: #cbd5e1 !important; }

/* Filter Card Title & Subtitle */
.materi-header-title {
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  color: var(--t-text-main, #0f172a) !important;
  margin: 0 !important;
}
html[data-mode="dark"] .materi-header-title {
  color: #f8fafc !important;
}
.materi-header-sub {
  font-size: 12px !important;
  color: var(--t-text-muted, #64748b) !important;
}
html[data-mode="dark"] .materi-header-sub {
  color: #94a3b8 !important;
}

/* Ongoing Banner Text */
.edlink-ongoing-text {
  color: #0f172a !important;
}
html[data-mode="dark"] .edlink-ongoing-text {
  color: #f1f5f9 !important;
}
.edlink-mapel-drawer {
  border-top: 1px dashed var(--t-surface-border, #e2e8f0);
  margin-top: 14px;
  padding-top: 16px;
}
html[data-mode="dark"] .edlink-mapel-drawer {
  border-top-color: rgba(255, 255, 255, 0.1);
}
.btn-toggle-mapel {
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

/* Clean, Harmonized Dashboard Button for Toggle Sesi (Not Black Glassy, Anti-Meleber) */
.btn-mapel-accent,
.btn-toggle-left-mapel {
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 9999px !important;
  padding: 0 10px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  height: 24px !important;
  line-height: 24px !important;
  white-space: nowrap !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
  margin: 0 !important;
  cursor: pointer !important;
  text-decoration: none !important;
}
.btn-mapel-accent i,
.btn-toggle-left-mapel i {
  font-size: 8.5px !important;
  margin-top: 1px !important;
  transition: transform 0.2s ease !important;
}
.btn-mapel-accent:hover,
.btn-toggle-left-mapel:hover {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.22) !important;
}
.btn-mapel-accent.active-open,
.btn-toggle-left-mapel.active-open {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2) !important;
}
html[data-mode="dark"] .btn-mapel-accent,
html[data-mode="dark"] .btn-toggle-left-mapel {
  background: #334155 !important;
  color: #f1f5f9 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}
html[data-mode="dark"] .btn-mapel-accent:hover,
html[data-mode="dark"] .btn-toggle-left-mapel:hover,
html[data-mode="dark"] .btn-mapel-accent.active-open,
html[data-mode="dark"] .btn-toggle-left-mapel.active-open {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

/* Quick Ongoing Notice */
.edlink-ongoing-banner {
  background: linear-gradient(135deg, var(--t-primary-soft, rgba(37, 99, 235, 0.12)) 0%, rgba(255, 255, 255, 0.5) 100%) !important;
  border: 1px solid var(--t-primary-soft, rgba(37, 99, 235, 0.28)) !important;
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
html[data-mode="dark"] .edlink-ongoing-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(30, 41, 59, 0.6) 100%) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}
.edlink-ongoing-banner .btn-success,
.edlink-ongoing-banner .btn-primary {
  background: var(--t-primary, #2563eb) !important;
  border-color: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
}
.edlink-ongoing-banner .btn-success:hover,
.edlink-ongoing-banner .btn-primary:hover {
  background: var(--t-primary-hover, #1d4ed8) !important;
  border-color: var(--t-primary-hover, #1d4ed8) !important;
}

/* Filter Card Dark Mode Controls & Contrast */
html[data-mode="dark"] .materi-filter-card {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .materi-filter-card label,
html[data-mode="dark"] .materi-filter-card .text-muted {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .materi-filter-card .border-bottom,
html[data-mode="dark"] .materi-filter-card .border-top {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Day Pill Numbers & Status Pills Dark Mode Readability */
html[data-mode="dark"] .edlink-day-pill:not(.active) .edlink-day-num {
  color: #f1f5f9 !important;
}
html[data-mode="dark"] .edlink-day-pill:not(.active) .edlink-day-name {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .status-pill-past {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .edlink-alert-box {
  background: rgba(30, 58, 138, 0.25) !important;
  border-color: rgba(96, 165, 250, 0.3) !important;
  color: #93c5fd !important;
}
html[data-mode="dark"] .pagination .page-link {
  background-color: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .pagination .page-item.active .page-link {
  background-color: var(--t-primary, #059669) !important;
  border-color: var(--t-primary, #059669) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .pagination .page-link:hover {
  background-color: #334155 !important;
  color: #f8fafc !important;
}



/* ==========================================================================
   10. MOBILE-FIRST RESPONSIVE ENGINE FOR EDLINK MATERI (< 992px)
   - 100% Native Viewport Scaling (Zero horizontal scroll/overflow)
   - Calendar 7-Day Pill Strip Compressed & Perfectly Proportioned
   - Session Cards with Truncated Tags and Non-clipping Status Badges
   - Horizontal Scrollable Tabs Nav
   - Single-Column Mobile Card Grid with Full-Width Ergonomic Touch
   ========================================================================== */
@media (max-width: 991px) {
  /* 1. Main Container Bounds */
  .edlink-layout-container {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 16px !important;
    margin-bottom: 20px !important;
    box-sizing: border-box !important;
  }

  .edlink-calendar-widget,
  .edlink-main-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* 2. Calendar Widget: ergonomic compact mobile padding */
  .edlink-calendar-widget {
    padding: 14px 10px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  .edlink-widget-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
  }
  .edlink-widget-title {
    font-size: 15px !important;
    font-weight: 800 !important;
  }
  .edlink-widget-date {
    font-size: 11px !important;
  }

  /* 3. Week Strip: 7 days perfectly fitted on any mobile width (360px - 430px) */
  .edlink-week-strip {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 2px !important;
    margin-bottom: 12px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    justify-content: space-between !important;
  }
  .edlink-day-pill {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    padding: 6px 1px !important;
    border-radius: 10px !important;
    text-align: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  .edlink-day-name {
    font-size: 9.5px !important;
    line-height: 1.1 !important;
    margin-bottom: 2px !important;
    display: block !important;
  }
  .edlink-day-num {
    font-size: 12.5px !important;
    line-height: 1.2 !important;
    display: block !important;
  }
  .edlink-day-dot {
    width: 4px !important;
    height: 4px !important;
    margin: 3px auto 0 auto !important;
  }

  /* 4. Alert Box */
  .edlink-alert-box {
    padding: 8px 10px !important;
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    border-radius: 10px !important;
    margin-bottom: 12px !important;
    gap: 8px !important;
    word-break: break-word !important;
  }
  .edlink-alert-box i {
    font-size: 14px !important;
    flex-shrink: 0 !important;
  }

  /* 5. Session Cards inside Widget */
  .edlink-sessions-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .edlink-session-card {
    padding: 12px !important;
    border-radius: 12px !important;
    margin-bottom: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .edlink-session-card > .d-flex:first-child {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    width: 100% !important;
    margin-bottom: 6px !important;
  }
  .edlink-session-tag {
    min-width: 0 !important;
    max-width: calc(100% - 110px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 10px !important;
    padding: 3px 6px !important;
    margin-bottom: 0 !important;
  }
  .materi-status-pill {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 10px !important;
    padding: 2.5px 7px !important;
    border-radius: 6px !important;
  }
  .edlink-session-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    margin-bottom: 4px !important;
    word-break: break-word !important;
  }
  .edlink-session-meta {
    font-size: 11px !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
    flex-wrap: wrap !important;
  }
  .edlink-session-card > .d-flex.border-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    width: 100% !important;
    padding-top: 6px !important;
  }
  .auto-absensi-pill {
    font-size: 10.5px !important;
    padding: 3px 8px !important;
    white-space: nowrap !important;
  }
  .edlink-btn-open,
  .edlink-btn-locked {
    font-size: 11px !important;
    padding: 5px 10px !important;
    white-space: nowrap !important;
    border-radius: 8px !important;
  }

  /* 6. Tabs Nav in Main Panel (Horizontal scroll without overflowing screen) */
  .edlink-tabs-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-bottom: 2px !important;
    gap: 6px !important;
    scrollbar-width: none !important;
  }
  .edlink-tabs-nav::-webkit-scrollbar {
    display: none !important;
  }
  .edlink-tab-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-size: 12.5px !important;
    padding: 6px 12px !important;
  }

  /* 7. Materi Filter Card & Form Controls (iPhone & Mobile Uniform Height & Touch Target) */
  .materi-filter-card {
    padding: 14px 12px !important;
    border-radius: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .materi-filter-card .row {
    row-gap: 10px !important;
  }
  .materi-form-control {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    line-height: normal !important;
    font-size: 14px !important;
    border-radius: 12px !important;
    padding: 0 14px !important;
    box-sizing: border-box !important;
    -webkit-box-sizing: border-box !important;
  }
  select.materi-form-control {
    line-height: normal !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 14px !important;
    padding-right: 38px !important;
    vertical-align: middle !important;
    background-position: right 14px center !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }
  input[type="date"].materi-form-control {
    line-height: 42px !important;
    min-height: 44px !important;
    padding-right: 38px !important;
  }
  input[type="date"].materi-form-control::-webkit-date-and-time-value {
    line-height: 42px !important;
    min-height: 42px !important;
  }
  input[type="date"].materi-form-control::-webkit-calendar-picker-indicator {
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }
  .materi-filter-card .btn-primary,
  .materi-filter-card .btn-outline-secondary {
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 12px !important;
  }

  /* 8. Materi Grid in Main Panel: 1 full-width column on mobile */
  .materi-card-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .materi-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 14px 12px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
  }
  .materi-card-title {
    font-size: 13.5px !important;
    word-break: break-word !important;
  }
  .materi-meta-list {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px 10px !important;
  }
  .materi-meta-item {
    white-space: normal !important;
    word-break: break-word !important;
    font-size: 11.5px !important;
  }
  .materi-counters-bar {
    gap: 4px !important;
    flex-wrap: wrap !important;
  }
  .materi-counter-tag {
    font-size: 10.5px !important;
    padding: 2.5px 6px !important;
  }

  /* 9. Mapel Group Mobile */
  .edlink-mapel-header {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }
  .edlink-mapel-btn-wrap {
    margin-left: auto !important;
    display: flex !important;
    justify-content: flex-end !important;
  }
}

/* ==========================================================================
   11. ABSOLUTE ZERO-OVERFLOW SHIELD & MOBILE VIEWPORT PERFECTION (< 992px)
   - Eliminates all horizontal scroll/blank space on right side of mobile screen
   - Topbar right cluster & title auto-fit within 100vw on 360px - 430px viewports
   - Bootstrap .row margin cancellation on mobile to prevent -15px blowout
   - Universal strict viewport clipping on html, body, main, .main-content
   - Robust container bounding for DataTables, Card mode, and FAB
   ========================================================================== */

/* Universal Viewport Clamp */
html,
body {
  max-width: 100vw !important;
  width: 100% !important;
  overflow-x: clip !important;
  position: relative !important;
}

@media (max-width: 991px) {
  /* 1. Strict Container Clipping & Zero Horizontal Scroll */
  main,
  #app-main,
  .main-container,
  .main-content {
    max-width: 100vw !important;
    width: 100% !important;
    overflow: visible !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
    box-sizing: border-box !important;
  }

  .main-content {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  /* 2. Cancel Bootstrap Row Negative Margins on Mobile */
  .main-content > .row,
  .main-content .row,
  .dataTables_wrapper .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .main-content .col-xs-12,
  .main-content .col-sm-12,
  .main-content .col-md-12,
  .main-content .col-12 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .main-content .card {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  /* 3. Topbar Auto-Fit & Overflow Shield (< 992px) */
  header.topbar,
  .topbar {
    width: 100% !important;
    max-width: 100vw !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .topbar-left {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
    gap: 6px !important;
  }

  .topbar-left > div {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
  }

  .topbar-page-title {
    max-width: 100% !important;
    font-size: 13.5px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .topbar-right {
    flex-shrink: 0 !important;
    gap: 4px !important;
  }

  .topbar-btns {
    gap: 4px !important;
    margin: 0 !important;
  }

  .topbar-btns .topbar-glass-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
  }

  .topbar-btns .avatar {
    width: 30px !important;
    height: 30px !important;
  }

  /* 4. Table & Card View Overflow Protection */
  .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .table-responsive.mode-card-view {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .table-responsive.mode-card-view table.dataTable,
  .table-responsive.mode-card-view table.dataTable tbody,
  .table-responsive.mode-card-view table.dataTable tbody tr {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .dt-mobile-table-scroll {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }

  /* 5. Floating Action Button (FAB) Viewport Guard - Suppressed */
  .fab.fab-fixed, .btn-float {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* ==========================================================================
   STRICT SIDEBAR ANTI-HORIZONTAL DRIFT & ANTI-WIGGLE LOCK
   User issue: "sidebar jangan bisa tergeser ke pinggir, jiga longgar"
   Anchors sidebar navigation firmly with ZERO horizontal slack or panning.
   ========================================================================== */
.sidebar,
.sidebar-navigation,
.sidebar-header,
.sidebar-profile,
.sidebar-profile-card,
aside.sidebar,
#app-sidebar {
  overflow-x: hidden !important;
  overscroll-behavior-x: none !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch;
}

.sidebar-navigation {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Suppress all PerfectScrollbar horizontal elements */
.sidebar .ps-scrollbar-x-rail,
.sidebar-navigation .ps-scrollbar-x-rail,
.sidebar .ps-scrollbar-x,
.sidebar-navigation .ps-scrollbar-x {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Guarantee menu tree never exceeds container width */
.sidebar-navigation ul.menu,
.sidebar-navigation .menu,
.sidebar-navigation .menu-item,
.sidebar-navigation .menu-link,
.sidebar-navigation .menu-submenu,
.sidebar-navigation .menu-category {
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

.sidebar-navigation .menu-link {
  width: calc(100% - 20px) !important;
  max-width: calc(100% - 20px) !important;
  box-sizing: border-box !important;
}

.sidebar-navigation .menu-link .title {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: calc(100% - 40px) !important;
}

.sidebar-profile-card {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Desktop Sidebar Anchoring (>= 992px): Anchored tightly at left: 0 */
@media (min-width: 992px) {
  body:not(.sidebar-folded) .sidebar,
  .sidebar {
    left: 0 !important;
    right: auto !important;
    position: fixed !important;
    transform: none !important;
  }

  body.sidebar-folded .sidebar {
    left: 0 !important;
    right: auto !important;
    position: fixed !important;
    transform: none !important;
  }
}

/* Mobile Sidebar Drawer (< 992px): Firm 250px drawer, no horizontal wiggle */
@media (max-width: 991px) {
  .sidebar,
  body .sidebar,
  body:not(.sidebar-folded) .sidebar,
  body.sidebar-folded .sidebar {
    width: 250px !important;
    max-width: 80vw !important;
    min-width: 0 !important;
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: auto !important;
    touch-action: pan-y !important;
    overscroll-behavior-x: none !important;
    transform: translate3d(-100%, 0, 0) !important;
  }

  body.sidebar-open .sidebar,
  body.sidebar-open:not(.sidebar-folded) .sidebar,
  body.sidebar-open.sidebar-folded .sidebar {
    transform: translate3d(0, 0, 0) !important;
    left: 0 !important;
    right: auto !important;
  }
}

/* ==========================================================================
   UNIFIED MODULE DESIGN SYSTEM TOKENS (Academic Glassmorphism)
   ========================================================================== */

/* 1. Header Banner - Unified Modern Academic Layout */
/* 1. Header Banner - Unified Modern Academic Layout (Semi-Glassy) */
html:not([data-mode="dark"]) .module-header-banner {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(246, 250, 255, 0.70) 55%, rgba(255, 251, 242, 0.72) 100%) !important;
  background-color: rgba(255, 255, 255, 0.75) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: 16px !important;
  padding: 18px 22px !important;
  margin-bottom: 20px !important;
  box-shadow: 0 8px 30px -4px rgba(28, 81, 157, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 14px !important;
}

.module-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

/* Module Header Icon: Permanently Hidden for Clean Minimalist Header */
.module-header-icon,
.module-header-banner .module-header-icon,
.module-header-left .module-header-icon {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.module-header-icon.icon-emerald {
  background: #ecfdf5 !important;
  color: #059669 !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.12) !important;
}

.module-header-icon.icon-amber {
  background: #fffbeb !important;
  color: #d97706 !important;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.12) !important;
}

.module-header-icon.icon-purple {
  background: #faf5ff;
  color: #7c3aed;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.12);
}

.module-header-icon.icon-cyan {
  background: #ecfeff;
  color: #0891b2;
  box-shadow: 0 2px 6px rgba(8, 145, 178, 0.12);
}

.module-header-icon.icon-rose {
  background: #fff1f2;
  color: #e11d48;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.12);
}

.module-header-text h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.module-header-text p {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 3px 0 0 0;
}

.module-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Modern Primary Action Buttons matching Active Theme */
.module-header-actions .btn-primary,
.module-header-actions a.btn-primary,
.module-header-actions .btn-action-primary,
.module-filter-card .btn-primary,
.module-filter-card button[type="submit"].btn-primary,
.btn-action-primary {
  background-color: var(--t-primary, #2563eb) !important;
  border-color: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
  border-radius: 9px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 8px 16px !important;
  min-height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 2px 4px var(--t-primary-soft, rgba(37, 99, 235, 0.18)) !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.module-header-actions .btn-primary:hover,
.module-header-actions a.btn-primary:hover,
.module-header-actions .btn-action-primary:hover,
.module-filter-card .btn-primary:hover,
.module-filter-card button[type="submit"].btn-primary:hover,
.btn-action-primary:hover {
  background-color: var(--t-primary-hover, #1d4ed8) !important;
  border-color: var(--t-primary-hover, #1d4ed8) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px var(--t-primary-soft, rgba(37, 99, 235, 0.32)) !important;
  transform: translateY(-1px);
}

.module-header-actions .btn-outline-secondary,
.module-header-actions .btn-action-export {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  border-radius: 9px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 8px 16px !important;
  min-height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.module-header-actions .btn-outline-secondary:hover,
.module-header-actions .btn-action-export:hover {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
  transform: translateY(-1px);
}

/* 2. Filter Card - Unified Modern Styling (Semi-Glassy) */
html:not([data-mode="dark"]) .module-filter-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.70) 0%, rgba(248, 250, 252, 0.60) 100%) !important;
  background-color: rgba(255, 255, 255, 0.65) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(226, 232, 240, 0.80) !important;
  border-radius: 14px !important;
  padding: 16px 20px !important;
  margin-bottom: 20px !important;
  box-shadow: 0 4px 16px -2px rgba(28, 81, 157, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

html:not([data-mode="dark"]) .module-filter-card .form-control,
html:not([data-mode="dark"]) .module-filter-card select {
  background-color: rgba(255, 255, 255, 0.80) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(203, 213, 225, 0.85) !important;
}

.module-filter-card label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  display: block;
}

.module-filter-card .form-control,
.module-filter-card select,
.module-filter-card .btn {
  border-radius: 8px !important;
  font-size: 13px !important;
  min-height: 38px !important;
}

.module-filter-card .form-control {
  border: 1px solid #cbd5e1 !important;
  background-color: #ffffff !important;
}

.module-filter-card .form-control:focus {
  border-color: var(--t-primary, #2563eb) !important;
  box-shadow: 0 0 0 3px var(--t-primary-soft, rgba(37, 99, 235, 0.15)) !important;
}

/* 3. Data Card & Table - Applied to module-data-card and universal table cards (Semi-Glassy) */
html:not([data-mode="dark"]) .module-data-card,
html:not([data-mode="dark"]) .card:has(.table-responsive),
html:not([data-mode="dark"]) .card:has(table.dataTable),
html:not([data-mode="dark"]) .card:has(table),
html:not([data-mode="dark"]) .card.is-table-card,
html:not([data-mode="dark"]) .card-table-wrap,
html:not([data-mode="dark"]) .card:not(.card-welcome-hero) {
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.80) 0%, rgba(246, 250, 255, 0.72) 55%, rgba(255, 251, 242, 0.74) 100%) !important;
  background-color: rgba(255, 255, 255, 0.76) !important;
  /* backdrop-filter optimized */
  box-shadow: 0 8px 32px -4px rgba(28, 81, 157, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  overflow: hidden !important;
  margin-bottom: 24px !important;
}

html:not([data-mode="dark"]) .module-data-card .card-body,
html:not([data-mode="dark"]) .card:has(.table-responsive) .card-body,
html:not([data-mode="dark"]) .card:has(table.dataTable) .card-body,
html:not([data-mode="dark"]) .card-body.table-responsive {
  background: transparent !important;
  background-color: transparent !important;
  padding: 20px !important;
}

html:not([data-mode="dark"]) .module-data-card .table,
html:not([data-mode="dark"]) .card:has(.table-responsive) .table,
html:not([data-mode="dark"]) .card:has(table.dataTable) .table {
  background: transparent !important;
  background-color: transparent !important;
  margin-bottom: 0 !important;
}

html:not([data-mode="dark"]) .module-data-card .table thead th,
html:not([data-mode="dark"]) .module-data-card .table tr.bg-dark th,
html:not([data-mode="dark"]) .module-data-card .table tr.bg-primary th,
html:not([data-mode="dark"]) .card:has(.table-responsive) table thead th,
html:not([data-mode="dark"]) .card:has(table.dataTable) table thead th,
html:not([data-mode="dark"]) table.dataTable thead th,
html:not([data-mode="dark"]) table.table thead th {
  background: rgba(241, 245, 249, 0.75) !important;
  /* backdrop-filter optimized */
  color: #475569 !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85) !important;
  border-top: none !important;
  font-size: var(--tbl-th-size, 11px) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  padding: var(--tbl-th-pad, 12px 14px) !important;
}

html:not([data-mode="dark"]) .module-data-card .table tbody td,
html:not([data-mode="dark"]) .card:has(.table-responsive) table tbody td,
html:not([data-mode="dark"]) .card:has(table.dataTable) table tbody td {
  padding: var(--tbl-td-pad, 12px 14px) !important;
  vertical-align: middle !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.60) !important;
  font-size: var(--tbl-td-size, 13px) !important;
  color: #334155;
  background: transparent !important;
}

html:not([data-mode="dark"]) .module-data-card .table tbody tr:hover td,
html:not([data-mode="dark"]) .card:has(.table-responsive) table tbody tr:hover td,
html:not([data-mode="dark"]) .card:has(table.dataTable) table tbody tr:hover td {
  background-color: rgba(241, 245, 249, 0.55) !important;
}

/* Empty State / No Data in Table View */
table.dataTable tbody td.dataTables_empty {
  padding: 38px 20px !important;
  text-align: center !important;
  color: #64748b !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  border: 1px dashed #e2e8f0 !important;
  border-radius: 12px !important;
  background-color: #fafbfd !important;
}

/* Responsive Mobile Layout for Header & Filter */
@media (max-width: 767px) {
  .module-header-banner {
    padding: 14px 16px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
  }
  .module-header-left {
    width: 100% !important;
    gap: 12px !important;
  }
  .module-header-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 18px !important;
  }
  .module-header-text h3 {
    font-size: 1.05rem !important;
  }
  .module-header-actions {
    width: 100% !important;
    justify-content: flex-start !important;
    gap: 8px !important;
  }
  .module-header-actions .btn {
    font-size: 12px !important;
    padding: 6px 12px !important;
  }
  .module-filter-card {
    padding: 14px 14px 8px !important;
    margin-bottom: 14px !important;
  }
  .module-data-card .card-body,
  .card:has(.table-responsive) .card-body,
  .card:has(table.dataTable) .card-body {
    padding: 12px 10px !important;
  }
}

/* 4. Semantic Status Pills */
.status-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.status-pill-active {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}

.status-pill-active:hover {
  background: #d1fae5 !important;
  color: #065f46 !important;
}

.status-pill-inactive {
  background: #f8fafc !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
}

.status-pill-inactive:hover {
  background: #f1f5f9 !important;
  color: #334155 !important;
}

.status-pill-warning {
  background: #fffbeb !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
}

/* 5. Dark Mode Overrides (Semi-Glassy) */
html[data-mode="dark"] .module-header-banner,
html[data-mode="dark"] .module-filter-card,
html[data-mode="dark"] .module-data-card {
  background: rgba(30, 41, 59, 0.75) !important;
  /* backdrop-filter optimized */
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-mode="dark"] .module-header-text h3 {
  color: #f8fafc !important;
}

html[data-mode="dark"] .module-header-text p {
  color: #94a3b8 !important;
}

html[data-mode="dark"] .module-header-icon {
  background: rgba(37, 99, 235, 0.18) !important;
  color: #60a5fa !important;
}

html[data-mode="dark"] .module-header-icon.icon-emerald {
  background: rgba(5, 150, 105, 0.18) !important;
  color: #34d399 !important;
}

html[data-mode="dark"] .module-header-icon.icon-amber {
  background: rgba(217, 119, 6, 0.18) !important;
  color: #fbbf24 !important;
}

html[data-mode="dark"] .module-header-icon.icon-purple {
  background: rgba(124, 58, 237, 0.18) !important;
  color: #c084fc !important;
}

html[data-mode="dark"] .module-filter-card label {
  color: #94a3b8 !important;
}

html[data-mode="dark"] .module-filter-card .form-control {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}

html[data-mode="dark"] .module-data-card,
html[data-mode="dark"] .card:not(.card-welcome-hero) {
  background: #1e293b !important;
  background-color: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
}

html[data-mode="dark"] .module-data-card .card-body,
html[data-mode="dark"] .card:not(.card-welcome-hero) .card-body {
  background-color: transparent !important;
  background-image: none !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
}

/* DataTables Controls in Dark Mode */
html[data-mode="dark"] .dataTables_wrapper,
html[data-mode="dark"] div.dataTables_wrapper {
  background: transparent !important;
  color: #94a3b8 !important;
}

html[data-mode="dark"] div.dataTables_wrapper div.dataTables_length label,
html[data-mode="dark"] div.dataTables_wrapper div.dataTables_filter label,
html[data-mode="dark"] div.dataTables_wrapper div.dataTables_info {
  color: #cbd5e1 !important;
}

html[data-mode="dark"] div.dataTables_wrapper div.dataTables_length select {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

html[data-mode="dark"] div.dataTables_wrapper div.dataTables_filter input {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item a.page-link,
html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate .paginate_button {
  background-color: #0f172a !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item.active a.page-link,
html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate .paginate_button.current {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item.disabled a.page-link,
html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate .paginate_button.disabled {
  background-color: rgba(15, 23, 42, 0.4) !important;
  color: #64748b !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

/* Table Header, Rows, Cells & Hover */
html[data-mode="dark"] .module-data-card .table thead th,
html[data-mode="dark"] .module-data-card .table tr.bg-dark th,
html[data-mode="dark"] .module-data-card .table tr.bg-primary th,
html[data-mode="dark"] table.table thead th,
html[data-mode="dark"] table.dataTable thead th {
  background: #0f172a !important;
  background-color: #0f172a !important;
  color: #94a3b8 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-top: none !important;
}

html[data-mode="dark"] .module-data-card .table tbody td,
html[data-mode="dark"] table.table tbody td,
html[data-mode="dark"] table.dataTable tbody td {
  background-color: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .module-data-card .table tbody tr:hover td,
html[data-mode="dark"] table.table tbody tr:hover td,
html[data-mode="dark"] table.dataTable tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

html[data-mode="dark"] .module-data-card .table-striped tbody tr:nth-of-type(odd) td,
html[data-mode="dark"] table.table-striped tbody tr:nth-of-type(odd) td {
  background-color: rgba(255, 255, 255, 0.02) !important;
}

html[data-mode="dark"] table.dataTable tbody td.dataTables_empty {
  color: #94a3b8 !important;
  background-color: transparent !important;
}

/* Table Action Buttons & Dropdowns */
html[data-mode="dark"] table.dataTable td .dropdown a.text-lighter,
html[data-mode="dark"] table.dataTable td .dropdown > a,
html[data-mode="dark"] td .dropdown a.text-lighter,
html[data-mode="dark"] .btn-table-action {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
}
html[data-mode="dark"] table.dataTable td .dropdown a.text-lighter:hover,
html[data-mode="dark"] table.dataTable td .dropdown > a:hover,
html[data-mode="dark"] td .dropdown a.text-lighter:hover,
html[data-mode="dark"] .btn-table-action:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

html[data-mode="dark"] .module-header-actions .btn-outline-secondary,
html[data-mode="dark"] .btn-outline-secondary {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f1f5f9 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}
html[data-mode="dark"] .module-header-actions .btn-outline-secondary:hover,
html[data-mode="dark"] .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

html[data-mode="dark"] .badge-secondary {
  background: rgba(148, 163, 184, 0.2) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* 1. Custom Checkbox Modernization in Dark Mode */
html[data-mode="dark"] .custom-control.custom-checkbox .custom-control-indicator,
html[data-mode="dark"] .custom-checkbox .custom-control-indicator,
html[data-mode="dark"] .table .custom-control-indicator,
html[data-mode="dark"] .dataTable .custom-control-indicator {
  background-color: rgba(15, 23, 42, 0.85) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 4px !important;
}

html[data-mode="dark"] .custom-control.custom-checkbox .custom-control-input:checked ~ .custom-control-indicator,
html[data-mode="dark"] .custom-checkbox .custom-control-input:checked ~ .custom-control-indicator,
html[data-mode="dark"] .table .custom-control-input:checked ~ .custom-control-indicator,
html[data-mode="dark"] .dataTable .custom-control-input:checked ~ .custom-control-indicator {
  background-color: var(--t-primary, #2563eb) !important;
  border-color: var(--t-primary, #2563eb) !important;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E") !important;
}

html[data-mode="dark"] .custom-control.custom-checkbox .custom-control-input:focus ~ .custom-control-indicator,
html[data-mode="dark"] .custom-checkbox .custom-control-input:focus ~ .custom-control-indicator {
  box-shadow: 0 0 0 1px #0f172a, 0 0 0 3px rgba(37, 99, 235, 0.35) !important;
}

/* 2. Badge Light & Level Pills in Dark Mode */
html[data-mode="dark"] .badge-light,
html[data-mode="dark"] .badge.badge-light,
html[data-mode="dark"] .table .badge-light,
html[data-mode="dark"] .table .badge-tingkat {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: none !important;
}

/* 3. Links & User Names inside Dark Tables */
html[data-mode="dark"] .table a.text-dark,
html[data-mode="dark"] .table .text-dark,
html[data-mode="dark"] .table-user-link,
html[data-mode="dark"] a.text-dark {
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .table a.text-dark:hover,
html[data-mode="dark"] .table .text-dark:hover,
html[data-mode="dark"] .table-user-link:hover,
html[data-mode="dark"] a.text-dark:hover {
  color: var(--t-primary, #38bdf8) !important;
}

html[data-mode="dark"] table.table td a.text-primary,
html[data-mode="dark"] table.dataTable td a.text-primary {
  color: #38bdf8 !important;
}
html[data-mode="dark"] table.table td a.text-primary:hover,
html[data-mode="dark"] table.dataTable td a.text-primary:hover {
  color: #7dd3fc !important;
}

/* 4. DataTables Scroll Heads & Body in Dark Mode */
html[data-mode="dark"] .dataTables_scrollHead,
html[data-mode="dark"] .dataTables_scrollHeadInner {
  background-color: #0f172a !important;
}

html[data-mode="dark"] .dataTables_scrollHead table.dataTable,
html[data-mode="dark"] .dataTables_scrollHead table.table {
  background-color: #0f172a !important;
  margin-bottom: 0 !important;
}

html[data-mode="dark"] .dataTables_scrollBody {
  background-color: rgba(15, 23, 42, 0.65) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-mode="dark"] .dataTables_scrollBody::-webkit-scrollbar,
html[data-mode="dark"] .table-responsive::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

html[data-mode="dark"] .dataTables_scrollBody::-webkit-scrollbar-track,
html[data-mode="dark"] .table-responsive::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
  border-radius: 4px;
}

html[data-mode="dark"] .dataTables_scrollBody::-webkit-scrollbar-thumb,
html[data-mode="dark"] .table-responsive::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

html[data-mode="dark"] .dataTables_scrollBody::-webkit-scrollbar-thumb:hover,
html[data-mode="dark"] .table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 5. Scroll Hint Pill in Dark Mode */
html[data-mode="dark"] .scroll-hint-pill {
  background: rgba(15, 23, 42, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}

/* 6. Form Controls & Mass Action Bottom Area in Dark Mode */
html[data-mode="dark"] .border-top {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-mode="dark"] select.show-tick,
html[data-mode="dark"] select#aksi {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* 7. Action 3-dots Button & Dropdown in Tables */
html[data-mode="dark"] table.table td .dropdown a.text-lighter,
html[data-mode="dark"] table.dataTable td .dropdown a.text-lighter,
html[data-mode="dark"] td .dropdown a.text-lighter,
html[data-mode="dark"] .table .text-lighter {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
  border-radius: 8px !important;
  width: 32px !important;
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

html[data-mode="dark"] table.table td .dropdown a.text-lighter:hover,
html[data-mode="dark"] table.dataTable td .dropdown a.text-lighter:hover,
html[data-mode="dark"] td .dropdown a.text-lighter:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

html[data-mode="dark"] .table .dropdown-menu {
  background-color: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
  border-radius: 12px !important;
  padding: 6px !important;
}

html[data-mode="dark"] .table .dropdown-menu .dropdown-item {
  color: #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
}

html[data-mode="dark"] .table .dropdown-menu .dropdown-item:hover,
html[data-mode="dark"] .table .dropdown-menu .dropdown-item:focus {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

html[data-mode="dark"] .table .dropdown-menu .dropdown-divider {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
  margin: 4px 0 !important;
}

html[data-mode="dark"] .dropdown-menu {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
}
html[data-mode="dark"] .dropdown-item {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .dropdown-item:hover {
  background: #334155 !important;
  color: #f8fafc !important;
}
html[data-mode="dark"] .dropdown-divider {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-mode="dark"] .status-pill-active {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

html[data-mode="dark"] .status-pill-inactive {
  background: rgba(148, 163, 184, 0.12) !important;
  color: #94a3b8 !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
}

/* 8. Responsive Table Optimization (< 768px) */
@media (max-width: 767px) {
  .table-responsive {
    border-radius: 10px !important;
    margin-bottom: 12px !important;
  }

  div.dataTables_wrapper div.dataTables_filter {
    float: none !important;
    text-align: left !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 10px !important;
  }

  div.dataTables_wrapper div.dataTables_filter label {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    margin: 0 !important;
  }

  div.dataTables_wrapper div.dataTables_filter input {
    width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-top: 4px !important;
    height: 38px !important;
    border-radius: 10px !important;
    padding: 6px 12px !important;
  }

  .mobile-table-scroll-hint {
    margin-bottom: 8px !important;
  }

  /* Prevent bottom fixed dock overlap */
  .module-data-card {
    margin-bottom: 75px !important;
  }
}

@media (max-width: 767px) {
  .module-header-banner {
    padding: 14px 16px;
  }
  .module-header-actions {
    width: 100%;
  }
  .module-header-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   WIZARD NAVIGATION BUTTONS (MATERI & SOAL)
   ========================================================================== */
.d-none,
.wizard-nav-right [data-wizard="finish"].d-none,
.wizard-nav-right [data-wizard="next"].d-none,
.wizard-nav-left [data-wizard="prev"].d-none,
.wizard-nav-right [data-wizard="finish"].hidden,
.wizard-nav-right [data-wizard="next"].hidden,
.wizard-nav-left [data-wizard="prev"].hidden {
  display: none !important;
}

.wizard-footer-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-top: 20px !important;
  margin-top: 24px !important;
  border-top: 1px solid rgba(226, 232, 240, 0.8) !important;
  width: 100% !important;
}
html[data-mode="dark"] .wizard-footer-nav {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

.wizard-nav-left {
  display: flex !important;
  align-items: center !important;
}
.wizard-nav-right {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-left: auto !important;
}

/* Button aesthetics */
.wizard-nav-left .btn,
.wizard-nav-right .btn {
  border-radius: 12px !important;
  padding: 9px 24px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
}

.wizard-nav-right [data-wizard="next"] {
  background: var(--t-primary, #2563eb) !important;
  border-color: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px var(--t-primary-soft, rgba(37, 99, 235, 0.25)) !important;
}
.wizard-nav-right [data-wizard="next"]:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px var(--t-primary-soft, rgba(37, 99, 235, 0.35)) !important;
}

.wizard-nav-right [data-wizard="finish"] {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25) !important;
}
.wizard-nav-right [data-wizard="finish"]:hover {
  background: #059669 !important;
  border-color: #059669 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35) !important;
}

.wizard-nav-left [data-wizard="prev"] {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}
.wizard-nav-left [data-wizard="prev"]:hover {
  background: #e2e8f0 !important;
  color: #1e293b !important;
  transform: translateY(-1px) !important;
}
html[data-mode="dark"] .wizard-nav-left [data-wizard="prev"] {
  background: rgba(30, 41, 59, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .wizard-nav-left [data-wizard="prev"]:hover {
  background: rgba(51, 65, 85, 0.95) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   HANCA (QURAN BOOKMARK) FEATURE STYLES
   ========================================================================== */
.btn-verse-bookmark {
  transition: all 0.2s ease;
}
.btn-verse-bookmark.is-marked {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: #f59e0b !important;
  color: #b45309 !important;
  font-weight: 600;
}
.btn-verse-bookmark.is-marked i {
  color: #f59e0b !important;
}
html[data-mode="dark"] .btn-verse-bookmark.is-marked {
  background: rgba(245, 158, 11, 0.22) !important;
  border-color: #fbbf24 !important;
  color: #fbbf24 !important;
}
.quran-reader-btn-hanca {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 9px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.quran-reader-btn-hanca:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}
html[data-mode="dark"] .quran-reader-btn-hanca {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}
html[data-mode="dark"] .quran-reader-btn-hanca:hover {
  background: rgba(245, 158, 11, 0.25) !important;
  border-color: #f59e0b !important;
}
.quran-verse-card.active-hanca-pulse {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35), 0 8px 24px -4px rgba(245, 158, 11, 0.2) !important;
  background: #fffbeb !important;
  animation: hanca-glow-anim 2s infinite ease-in-out;
}
html[data-mode="dark"] .quran-verse-card.active-hanca-pulse {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.4), 0 8px 24px -4px rgba(0, 0, 0, 0.6) !important;
  background: #292524 !important;
}
@keyframes hanca-glow-anim {
  0%, 100% { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35); }
  50% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0.12); }
}
.quran-hanca-widget {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 18px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
html[data-mode="dark"] .quran-hanca-widget {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.4) !important;
}
.quran-hanca-content {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 300px;
  min-width: 0;
}
.quran-hanca-icon {
  display: none !important;
}
.quran-hanca-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 2px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
html[data-mode="dark"] .quran-hanca-title {
  color: #f8fafc !important;
}
.quran-hanca-meta {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}
html[data-mode="dark"] .quran-hanca-meta {
  color: #94a3b8 !important;
}
.quran-hanca-count-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}
html[data-mode="dark"] .quran-hanca-count-badge {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
}
.quran-hanca-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-hanca-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--t-primary, #1c519d);
  border: 1px solid var(--t-primary, #1c519d);
  color: #ffffff !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.btn-hanca-play:hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
}
.btn-hanca-list {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 36px;
  line-height: 1;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-hanca-list:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a !important;
}
html[data-mode="dark"] .btn-hanca-list {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .btn-hanca-list:hover {
  background: #1e293b !important;
  color: #ffffff !important;
}
.hanca-list-container {
  max-height: 440px;
  overflow-y: auto;
}
.hanca-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 10px;
  gap: 12px;
  transition: all 0.15s ease;
}
.hanca-item-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
html[data-mode="dark"] .hanca-item-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}
html[data-mode="dark"] .hanca-item-card:hover {
  background: #0f172a !important;
  border-color: #475569 !important;
}
.hanca-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.hanca-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 575px) {
  .hanca-toast {
    left: 16px;
    right: 16px;
    bottom: 74px;
    text-align: center;
    justify-content: center;
  }
  .quran-hanca-widget {
    padding: 12px 14px;
    gap: 10px;
  }
  .quran-hanca-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .quran-hanca-actions .btn,
  .quran-hanca-actions .btn-hanca-play,
  .quran-hanca-actions .btn-hanca-list {
    flex: 1 1 0;
    width: 50%;
    text-align: center;
    justify-content: center;
    padding: 0 8px;
    font-size: 12px;
  }
}
@media (max-width: 380px) {
  .quran-reader-btn-hanca .hanca-btn-text {
    display: none;
  }
  .quran-reader-btn-hanca {
    padding: 6px 8px;
  }
}

/* ==========================================================================
   HIGH-CONTRAST DARK MODE SIDEBAR READABILITY (v=18.0)
   Ensures WCAG AAA contrast for all sidebar elements in dark mode:
   - Category labels: crisp #94a3b8 (Slate 400)
   - Menu item titles: bright soft silver #cbd5e1 (Slate 300)
   - Icons & arrows: #94a3b8 (Slate 400)
   - Hover states: #ffffff with clean glassy highlight
   - Submenu items & dots: high contrast #cbd5e1
   - Profile footer card: crisp text & clear icons
   ========================================================================== */

/* Category Labels */
html[data-mode="dark"] .sidebar .menu-category,
html[data-mode="dark"] .sidebar-navigation .menu-category,
html[data-mode="dark"] aside.sidebar .menu-category,
html[data-mode="dark"] #app-sidebar .menu-category,
html[data-mode="dark"] body .sidebar .menu-category {
  color: #94a3b8 !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
}

/* Regular / Non-Active Menu Links & Titles */
html[data-mode="dark"] .sidebar .menu-link,
html[data-mode="dark"] .sidebar-navigation .menu-link,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) .menu-link,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item > .menu-link,
html[data-mode="dark"] .sidebar-navigation:not(.sidebar-folded) ul.menu > .menu-item > .menu-link,
html[data-mode="dark"] body .sidebar .menu-link,
html[data-mode="dark"] #app-sidebar .menu-link {
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .sidebar .menu-link .title,
html[data-mode="dark"] .sidebar-navigation .menu-link .title,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item > .menu-link .title,
html[data-mode="dark"] body .sidebar .menu-link .title,
html[data-mode="dark"] #app-sidebar .menu-link .title {
  color: #cbd5e1 !important;
}

/* Regular / Non-Active Menu Icons */
html[data-mode="dark"] .sidebar .menu-link .icon,
html[data-mode="dark"] .sidebar-navigation .menu-link .icon,
html[data-mode="dark"] .sidebar .menu-link i,
html[data-mode="dark"] .sidebar-navigation .menu-link i,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item > .menu-link .icon,
html[data-mode="dark"] #app-sidebar .menu-link .icon {
  color: #94a3b8 !important;
}

/* Chevron Arrows */
html[data-mode="dark"] .sidebar .menu-link .arrow,
html[data-mode="dark"] .sidebar-navigation .menu-link .arrow,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item > .menu-link .arrow,
html[data-mode="dark"] #app-sidebar .menu-link .arrow {
  color: #94a3b8 !important;
}

/* Hover States */
html[data-mode="dark"] .sidebar .menu-link:hover,
html[data-mode="dark"] .sidebar-navigation .menu-link:hover,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) .menu-link:hover,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item > .menu-link:hover,
html[data-mode="dark"] body .sidebar .menu-link:hover,
html[data-mode="dark"] #app-sidebar .menu-link:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

html[data-mode="dark"] .sidebar .menu-link:hover .title,
html[data-mode="dark"] .sidebar-navigation .menu-link:hover .title,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item > .menu-link:hover .title,
html[data-mode="dark"] #app-sidebar .menu-link:hover .title {
  color: #ffffff !important;
}

html[data-mode="dark"] .sidebar .menu-link:hover .icon,
html[data-mode="dark"] .sidebar-navigation .menu-link:hover .icon,
html[data-mode="dark"] .sidebar .menu-link:hover i,
html[data-mode="dark"] .sidebar-navigation .menu-link:hover i,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item > .menu-link:hover .icon,
html[data-mode="dark"] #app-sidebar .menu-link:hover .icon {
  color: #ffffff !important;
}

html[data-mode="dark"] .sidebar .menu-link:hover .arrow,
html[data-mode="dark"] .sidebar-navigation .menu-link:hover .arrow,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item > .menu-link:hover .arrow,
html[data-mode="dark"] #app-sidebar .menu-link:hover .arrow {
  color: #ffffff !important;
}

/* Active Menu Item */
html[data-mode="dark"] .sidebar .menu-item.active > .menu-link,
html[data-mode="dark"] .sidebar-navigation .menu-item.active > .menu-link,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item.active > .menu-link,
html[data-mode="dark"] #app-sidebar .menu-item.active > .menu-link {
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.2)) !important;
  color: var(--t-primary, #60a5fa) !important;
}

html[data-mode="dark"] .sidebar .menu-item.active > .menu-link .title,
html[data-mode="dark"] .sidebar-navigation .menu-item.active > .menu-link .title,
html[data-mode="dark"] .sidebar:not(.sidebar-folded) ul.menu > .menu-item.active > .menu-link .title,
html[data-mode="dark"] #app-sidebar .menu-item.active > .menu-link .title {
  color: var(--t-primary, #60a5fa) !important;
  font-weight: 700 !important;
}

html[data-mode="dark"] .sidebar .menu-item.active > .menu-link .icon,
html[data-mode="dark"] .sidebar-navigation .menu-item.active > .menu-link .icon,
html[data-mode="dark"] .sidebar .menu-item.active > .menu-link i,
html[data-mode="dark"] #app-sidebar .menu-item.active > .menu-link .icon {
  color: var(--t-primary, #60a5fa) !important;
}

/* Submenu */
html[data-mode="dark"] .sidebar .menu-submenu,
html[data-mode="dark"] .sidebar-navigation .menu-submenu {
  border-left-color: rgba(255, 255, 255, 0.14) !important;
}

html[data-mode="dark"] .sidebar .menu-submenu .menu-link,
html[data-mode="dark"] .sidebar-navigation .menu-submenu .menu-link {
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .sidebar .menu-submenu .menu-link .title,
html[data-mode="dark"] .sidebar-navigation .menu-submenu .menu-link .title {
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .sidebar .menu-submenu .menu-link:hover,
html[data-mode="dark"] .sidebar-navigation .menu-submenu .menu-link:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

html[data-mode="dark"] .sidebar .menu-submenu .menu-link:hover .title,
html[data-mode="dark"] .sidebar-navigation .menu-submenu .menu-link:hover .title {
  color: #ffffff !important;
}

html[data-mode="dark"] .sidebar .menu-submenu .menu-link:hover .dot {
  background-color: #ffffff !important;
}

html[data-mode="dark"] .sidebar .menu-submenu .menu-item.active > .menu-link {
  color: var(--t-primary, #60a5fa) !important;
  background: var(--t-primary-soft, rgba(37, 99, 235, 0.2)) !important;
}

html[data-mode="dark"] .sidebar .menu-submenu .menu-item.active > .menu-link .title {
  color: var(--t-primary, #60a5fa) !important;
  font-weight: 700 !important;
}

html[data-mode="dark"] .sidebar .menu-submenu .dot {
  background-color: #64748b !important;
}

html[data-mode="dark"] .sidebar .menu-submenu .menu-item.active > .menu-link .dot {
  background-color: var(--t-primary, #60a5fa) !important;
  box-shadow: 0 0 6px var(--t-primary, #60a5fa) !important;
}

/* Profile Card in Dark Mode */
html[data-mode="dark"] .sidebar-profile-card,
html[data-mode="dark"] .sidebar .sidebar-profile-card,
html[data-mode="dark"] #app-sidebar .sidebar-profile-card {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-mode="dark"] .sidebar-profile-card .profile-meta span:first-child,
html[data-mode="dark"] .sidebar-profile-card .profile-meta strong {
  color: #ffffff !important;
}

html[data-mode="dark"] .sidebar-profile-card .profile-meta span:last-child {
  color: #94a3b8 !important;
}

html[data-mode="dark"] .sidebar-profile-card .sidebar-profile-logout {
  color: #94a3b8 !important;
}

html[data-mode="dark"] .sidebar-profile-card .sidebar-profile-logout:hover {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.16) !important;
}

/* ==========================================================================
   FORUM DISKUSI AKADEMIK DARK MODE OPTIMIZATION (custom.css?v=19.0)
   - Eliminates stark white glare container and white post cards in Dark Mode
   - High-contrast, soft slate palette matching Langgam Invest design system
   - Legible typography for authors, post body, roles, and timestamps
   - Styled composer textarea, action buttons, threaded comments, and reply capsule
   ========================================================================== */

/* 1. Main Forum Discussion Container */
html[data-mode="dark"] .diskusi-section-card,
html[data-mode="dark"] div.diskusi-section-card,
html[data-mode="dark"] .bg-white.rounded-3xl:has(.diskusi-wrapper),
html[data-mode="dark"] .diskusi-wrapper {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.82) 0%, rgba(30, 41, 59, 0.78) 100%) !important;
  background-color: rgba(15, 23, 42, 0.80) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
}

/* Header inside Forum Section */
html[data-mode="dark"] .diskusi-section-card .border-b,
html[data-mode="dark"] .diskusi-section-card .border-slate-100 {
  border-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .diskusi-section-card .bg-primary\/10 {
  background: rgba(59, 130, 246, 0.18) !important;
  color: #60a5fa !important;
}
html[data-mode="dark"] .diskusi-section-card h4,
html[data-mode="dark"] .diskusi-wrapper h4 {
  color: #f8fafc !important;
}
html[data-mode="dark"] .diskusi-section-card p,
html[data-mode="dark"] .diskusi-section-card p.text-slate-400,
html[data-mode="dark"] .diskusi-wrapper p.text-slate-400,
html[data-mode="dark"] .diskusi-wrapper span.text-slate-400 {
  color: #94a3b8 !important;
}

/* 2. Composer Card ("Mulai Diskusi Baru") */
html[data-mode="dark"] .diskusi-composer-card {
  background: rgba(15, 23, 42, 0.65) !important;
  background-color: rgba(15, 23, 42, 0.65) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}
html[data-mode="dark"] .diskusi-composer-card h5 {
  color: #f8fafc !important;
}
html[data-mode="dark"] .diskusi-composer-card p {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .diskusi-composer-card span.bg-white,
html[data-mode="dark"] .diskusi-composer-card .border-slate-200\/80 {
  background: rgba(30, 41, 59, 0.85) !important;
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
html[data-mode="dark"] .diskusi-composer-card .border-t,
html[data-mode="dark"] .diskusi-composer-card .border-slate-200\/60 {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* 3. Textarea Composer */
html[data-mode="dark"] .diskusi-composer-textarea,
html[data-mode="dark"] textarea.diskusi-composer-textarea {
  background: rgba(30, 41, 59, 0.90) !important;
  background-color: #1e293b !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
}
html[data-mode="dark"] .diskusi-composer-textarea::placeholder,
html[data-mode="dark"] textarea.diskusi-composer-textarea::placeholder {
  color: #64748b !important;
}
html[data-mode="dark"] .diskusi-composer-textarea:focus,
html[data-mode="dark"] textarea.diskusi-composer-textarea:focus {
  background: rgba(30, 41, 59, 1) !important;
  background-color: #1e293b !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

/* 4. Discussion Post Cards */
html[data-mode="dark"] .diskusi-post-card,
html[data-mode="dark"] article.diskusi-post-card,
html[data-mode="dark"] .diskusi-feed-container > article {
  background: rgba(30, 41, 59, 0.75) !important;
  background-color: rgba(30, 41, 59, 0.75) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35) !important;
  color: #e2e8f0 !important;
}
html[data-mode="dark"] .diskusi-post-card:hover,
html[data-mode="dark"] article.diskusi-post-card:hover,
html[data-mode="dark"] .diskusi-feed-container > article:hover {
  background: rgba(30, 41, 59, 0.98) !important;
  background-color: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}
html[data-mode="dark"] .diskusi-post-card header {
  border-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .diskusi-post-card header a,
html[data-mode="dark"] .diskusi-post-card header span.font-bold {
  color: #f8fafc !important;
}
html[data-mode="dark"] .diskusi-post-card header a:hover {
  color: #60a5fa !important;
}
html[data-mode="dark"] .diskusi-post-card header time,
html[data-mode="dark"] .diskusi-post-card header time i {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .diskusi-post-card header p {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .diskusi-post-body {
  color: #e2e8f0 !important;
}

/* 5. Engagement Buttons (Sukai & Komentar) */
html[data-mode="dark"] .btn-action-diskusi {
  background: rgba(15, 23, 42, 0.65) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .btn-action-diskusi:hover {
  background: rgba(30, 41, 59, 0.95) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}
html[data-mode="dark"] .btn-action-diskusi.bg-rose-50 {
  background: rgba(244, 63, 94, 0.18) !important;
  color: #fb7185 !important;
  border-color: rgba(244, 63, 94, 0.35) !important;
}

/* 6. Comments List & Items */
html[data-mode="dark"] .diskusi-comments-wrapper {
  border-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] [id^="comment-item-"],
html[data-mode="dark"] .diskusi-comments-wrapper [id^="comment-item-"],
html[data-mode="dark"] div[id^="comment-item-"] {
  background: rgba(15, 23, 42, 0.60) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  color: #e2e8f0 !important;
}
html[data-mode="dark"] [id^="comment-item-"]:hover {
  background: rgba(15, 23, 42, 0.85) !important;
}
html[data-mode="dark"] [id^="comment-item-"] a,
html[data-mode="dark"] [id^="comment-item-"] span.font-bold {
  color: #f8fafc !important;
}
html[data-mode="dark"] [id^="comment-item-"] span.text-slate-500,
html[data-mode="dark"] [id^="comment-item-"] time {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .diskusi-comment-body {
  color: #cbd5e1 !important;
}

/* 7. Capsule Reply Input Form */
html[data-mode="dark"] .diskusi-reply-capsule {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
}
html[data-mode="dark"] .diskusi-reply-capsule input,
html[data-mode="dark"] .diskusi-reply-capsule input[type="text"] {
  background: transparent !important;
  color: #f8fafc !important;
}
html[data-mode="dark"] .diskusi-reply-capsule input::placeholder {
  color: #64748b !important;
}
html[data-mode="dark"] .diskusi-reply-capsule button {
  background: #3b82f6 !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .diskusi-reply-capsule button:hover {
  background: #2563eb !important;
}

/* 8. Pagination & Navigation Buttons */
html[data-mode="dark"] .diskusi-wrapper nav ul.bg-white,
html[data-mode="dark"] .diskusi-wrapper nav ul {
  background: rgba(15, 23, 42, 0.80) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
html[data-mode="dark"] .diskusi-wrapper nav ul a {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .diskusi-wrapper nav ul a:hover {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .diskusi-wrapper a.bg-slate-100 {
  background: rgba(30, 41, 59, 0.8) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
}
html[data-mode="dark"] .diskusi-wrapper a.bg-slate-100:hover {
  background: rgba(30, 41, 59, 1) !important;
  color: #ffffff !important;
}

/* 9. Disabled Notice & Empty State */
html[data-mode="dark"] .diskusi-disabled-notice {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fde68a !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
}
html[data-mode="dark"] .diskusi-wrapper .text-center.bg-slate-50\/80 {
  background: rgba(15, 23, 42, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .diskusi-wrapper .text-center h5 {
  color: #f8fafc !important;
}

/* ==========================================================================
   BROADCAST / ANNOUNCEMENT MARQUEE DARK MODE (v=22.0)
   - Deep slate container (#0f172a) with subtle warm border
   - Glowing amber megaphone icon container (#fbbf24)
   - High contrast golden "Pengumuman" badge (#fde68a)
   - Crisp, readable announcement text (#fef08a)
   ========================================================================== */
html[data-mode="dark"] .broadcast-marquee-card,
html[data-mode="dark"] div.broadcast-marquee-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.92)) !important;
  background-color: #0f172a !important;
  border: 1px solid rgba(245, 158, 11, 0.28) !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

html[data-mode="dark"] .broadcast-marquee-card .broadcast-icon-box,
html[data-mode="dark"] .broadcast-marquee-card .w-8.h-8 {
  background-color: rgba(245, 158, 11, 0.20) !important;
  color: #fbbf24 !important;
}

html[data-mode="dark"] .broadcast-marquee-card .broadcast-badge,
html[data-mode="dark"] .broadcast-marquee-card span.uppercase {
  background-color: rgba(245, 158, 11, 0.22) !important;
  color: #fde68a !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

html[data-mode="dark"] .broadcast-marquee-card .marquee-item,
html[data-mode="dark"] .marquee-item {
  color: #fef08a !important;
  font-weight: 600 !important;
}

/* ==========================================================================
   HERO AVATAR CAMERA BADGE DARK MODE (v=23.0)
   - High contrast camera badge on hero profile avatar
   - Prevents global dark text rule (.text-slate-800 -> white) from washing out the camera icon
   ========================================================================== */
html[data-mode="dark"] .hero-avatar-camera,
html[data-mode="dark"] .card-welcome-hero a[title="Ubah Foto Profil"] span,
html[data-mode="dark"] .card-welcome-hero a[data-url="akun/ubahfoto.php"] span {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #0f172a !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45) !important;
}

html[data-mode="dark"] .hero-avatar-camera i,
html[data-mode="dark"] .hero-avatar-camera .fa,
html[data-mode="dark"] .card-welcome-hero a[title="Ubah Foto Profil"] span i,
html[data-mode="dark"] .card-welcome-hero a[data-url="akun/ubahfoto.php"] span i {
  color: #0f172a !important;
}

html[data-mode="dark"] .hero-avatar-camera:hover,
html[data-mode="dark"] .card-welcome-hero a[title="Ubah Foto Profil"]:hover span,
html[data-mode="dark"] .card-welcome-hero a[data-url="akun/ubahfoto.php"]:hover span {
  background-color: #38bdf8 !important;
  color: #0f172a !important;
  border-color: #0f172a !important;
}

html[data-mode="dark"] .hero-avatar-camera:hover i,
html[data-mode="dark"] .card-welcome-hero a[title="Ubah Foto Profil"]:hover span i,
html[data-mode="dark"] .card-welcome-hero a[data-url="akun/ubahfoto.php"]:hover span i {
  color: #0f172a !important;
}

/* Quick Action Ubah Foto Card Dark Mode */
html[data-mode="dark"] .quick-action-card .bg-rose-50 {
  background: rgba(244, 63, 94, 0.18) !important;
  color: #fb7185 !important;
}
html[data-mode="dark"] .quick-action-card:hover .bg-rose-50,
html[data-mode="dark"] .quick-action-card .group-hover\:bg-rose-100 {
  background: rgba(244, 63, 94, 0.28) !important;
  color: #fda4af !important;
}

/* ==========================================================================
   SIDEBAR ACADEMIC PERIOD SELECTOR (Tahun Ajar & Semester)
   ========================================================================== */
.sidebar-period-wrapper {
  padding: 10px 14px 6px 14px;
  position: relative;
  z-index: 5;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.sidebar-period-card {
  background: rgba(255, 255, 255, 0.55) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03) !important;
  transition: all 0.2s ease;
}

.sidebar-period-card.is-custom-period {
  border-color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.06) !important;
}

.sidebar-period-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.sidebar-period-icon {
  display: none !important;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.sidebar-period-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sidebar-period-caption {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #475569;
  line-height: 1.2;
  text-transform: uppercase;
}

.sidebar-period-summary {
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-period-reset {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.15s ease;
  text-decoration: none;
}
.sidebar-period-reset:hover {
  background: #ef4444;
  color: #ffffff !important;
}

.sidebar-period-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-period-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-period-label {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 1px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.sidebar-period-label i {
  display: none !important;
  color: #0284c7;
  font-size: 10px;
}

.sidebar-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.sidebar-period-select {
  width: 100%;
  height: 32px !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  background-color: rgba(255, 255, 255, 0.75) !important;
  color: #0f172a !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  padding: 0 24px 0 9px !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sidebar-period-select:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15) !important;
}

.sidebar-select-wrapper .select-chevron {
  position: absolute;
  right: 8px;
  pointer-events: none;
  font-size: 9px;
  color: #64748b;
}

/* Folded State Handling */
.sidebar-period-folded {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  cursor: pointer;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 8px;
  color: #2563eb;
  transition: all 0.2s ease;
  margin: 0 auto;
}
.sidebar-period-folded:hover {
  background: rgba(37, 99, 235, 0.16);
}
.sidebar-period-folded i {
  font-size: 16px;
}
.sidebar-period-folded .folded-period-pill {
  font-size: 9px;
  font-weight: 700;
  margin-top: 2px;
  line-height: 1;
}

body.sidebar-folded .sidebar-period-wrapper {
  padding: 8px 6px;
}
body.sidebar-folded .sidebar-period-card {
  display: none !important;
}
body.sidebar-folded .sidebar-period-folded {
  display: flex !important;
}

body:not(.sidebar-folded) .sidebar-period-card {
  display: block !important;
}
body:not(.sidebar-folded) .sidebar-period-folded {
  display: none !important;
}

/* ==========================================================================
   DARK MODE ADJUSTMENTS FOR SIDEBAR PERIOD SELECTOR
   ========================================================================== */
html[data-mode="dark"] .sidebar-period-wrapper {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-mode="dark"] .sidebar-period-card {
  background: rgba(30, 41, 59, 0.55) !important;
  /* backdrop-filter optimized */
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

html[data-mode="dark"] .sidebar-period-card.is-custom-period {
  border-color: #38bdf8 !important;
  background: rgba(14, 165, 233, 0.12) !important;
}

html[data-mode="dark"] .sidebar-period-icon {
  background: rgba(56, 189, 248, 0.18) !important;
  color: #38bdf8 !important;
}

html[data-mode="dark"] .sidebar-period-caption {
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .sidebar-period-summary {
  color: #f1f5f9 !important;
}

html[data-mode="dark"] .sidebar-period-label {
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .sidebar-period-label i {
  color: #38bdf8 !important;
}

html[data-mode="dark"] .sidebar-period-select {
  background-color: #1e293b !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: none !important;
}

html[data-mode="dark"] .sidebar-period-select option {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
}

html[data-mode="dark"] .sidebar-period-select:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25) !important;
}

html[data-mode="dark"] .sidebar-select-wrapper .select-chevron {
  color: #94a3b8 !important;
}

html[data-mode="dark"] .sidebar-period-folded {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
}
html[data-mode="dark"] .sidebar-period-folded:hover {
  background: rgba(56, 189, 248, 0.25) !important;
}

/* ==========================================================================
   DETAIL MATERI PEMBELAJARAN (lihatmateri.php) - MODERN DESIGN SYSTEM
   ========================================================================== */

/* 1. Hero Card - Harmonized with Dashboard Style */
.materi-detail-hero {
  background: var(--t-surface, #ffffff);
  border: 1px solid var(--t-surface-border, #e2e8f0);
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: visible !important;
  z-index: 25;
  transition: all 0.25s ease;
}
.materi-detail-hero::before {
  display: none !important;
  content: none !important;
}
.materi-detail-hero .dropdown {
  position: relative;
}
.materi-detail-hero .dropdown-menu {
  z-index: 1060 !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.1) !important;
}
html[data-mode="dark"] .materi-detail-hero {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
html[data-mode="dark"] .materi-detail-hero .dropdown-menu {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
}

.detail-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--t-surface-border, #f1f5f9);
}
html[data-mode="dark"] .detail-top-nav {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.detail-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--t-text-muted, #475569);
  background: var(--t-surface, #ffffff);
  border: 1px solid var(--t-surface-border, #e2e8f0);
  padding: 6px 14px;
  border-radius: 10px;
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}
.detail-back-btn:hover {
  background: var(--t-surface-subtle, #f8fafc);
  border-color: #cbd5e1;
  color: var(--t-text-main, #0f172a);
}
html[data-mode="dark"] .detail-back-btn {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}
html[data-mode="dark"] .detail-back-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.detail-top-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.materi-hero-code {
  display: inline-flex;
  align-items: center;
  background: var(--t-surface-subtle, #f8fafc);
  color: var(--t-text-muted, #64748b);
  border: 1px solid var(--t-surface-border, #e2e8f0);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  line-height: 1.4;
  letter-spacing: 0.01em;
}
html[data-mode="dark"] .materi-hero-code {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.08);
}

.materi-hero-period {
  display: inline-flex;
  align-items: center;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  line-height: 1.4;
}
html[data-mode="dark"] .materi-hero-period {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.25);
}

.materi-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
  line-height: 1.4 !important;
}

.materi-detail-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--t-text-main, #0f172a);
  line-height: 1.35;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
html[data-mode="dark"] .materi-detail-title {
  color: #f8fafc;
}

.materi-detail-meta-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--t-surface-border, #f1f5f9);
}
html[data-mode="dark"] .materi-detail-meta-grid {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.detail-meta-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-meta-item {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  color: var(--t-text-muted, #64748b);
}
html[data-mode="dark"] .detail-meta-item {
  color: #94a3b8;
}
.detail-meta-item strong {
  color: var(--t-text-main, #1e293b);
  font-weight: 600;
  margin-left: 3px;
}
html[data-mode="dark"] .detail-meta-item strong {
  color: #f1f5f9;
}

.meta-dot {
  color: #cbd5e1;
  font-size: 11px;
}
html[data-mode="dark"] .meta-dot {
  color: #475569;
}

.detail-actions-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-contact-act {
  border-radius: 8px !important;
  font-size: 11.5px !important;
  padding: 5px 12px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.4 !important;
}

/* 2. Modern Detail Tabs */
.materi-detail-tabs-wrapper {
  background: rgba(255, 255, 255, 0.85);
  /* backdrop-filter optimized */
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 16px;
  padding: 8px 10px;
  margin-top: 30px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.04);
  scrollbar-width: none;
}
.materi-detail-tabs-wrapper::-webkit-scrollbar {
  display: none;
}
html[data-mode="dark"] .materi-detail-tabs-wrapper {
  background: rgba(30, 41, 59, 0.82);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.materi-detail-tab-btn {
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  color: var(--t-text-muted, #64748b);
  background: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap !important;
}
.materi-detail-tab-btn:hover {
  background: var(--t-surface-subtle, rgba(0, 0, 0, 0.04));
  color: var(--t-text-main, #0f172a);
}
html[data-mode="dark"] .materi-detail-tab-btn {
  color: #94a3b8;
}
html[data-mode="dark"] .materi-detail-tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}
.materi-detail-tab-btn.active {
  background: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px var(--t-orb-1, rgba(37, 99, 235, 0.35)) !important;
}
html[data-mode="dark"] .materi-detail-tab-btn.active {
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45) !important;
}

.detail-tab-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  margin-left: 5px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
}
.materi-detail-tab-btn.active .detail-tab-counter {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* 3. Modern Content Cards */
.materi-detail-card {
  background: rgba(255, 255, 255, 0.85);
  /* backdrop-filter optimized */
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 18px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  transition: all 0.25s ease;
}
html[data-mode="dark"] .materi-detail-card {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.materi-detail-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
  background: rgba(255, 255, 255, 0.6);
  /* backdrop-filter optimized */
}
html[data-mode="dark"] .materi-detail-card-header {
  background: rgba(30, 41, 59, 0.6);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.detail-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
@media (max-width: 767px) {
  .materi-detail-card-header {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 14px 16px !important;
  }
  .materi-detail-card-header .detail-card-title-wrap {
    width: 100% !important;
    flex: 1 1 100% !important;
    display: block !important;
  }
  .materi-detail-card-header .detail-card-title {
    font-size: 15px !important;
    line-height: 1.35 !important;
    word-break: break-word !important;
  }
  .materi-detail-card-header .detail-card-subtitle {
    font-size: 12px !important;
    margin-top: 3px !important;
    line-height: 1.4 !important;
    word-break: break-word !important;
  }
  .materi-detail-card-header .badge {
    align-self: flex-start !important;
    margin-top: 2px !important;
  }
}
.detail-card-icon {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.detail-back-btn > i,
.detail-back-btn > .ti {
  font-size: 12px;
  margin-right: 2px;
  color: inherit;
  display: inline-block !important;
  transition: transform 0.2s ease;
}
.detail-back-btn:hover > i,
.detail-back-btn:hover > .ti {
  transform: translateX(-2px);
}
.detail-meta-item > i,
.detail-meta-item > .ti,
.detail-meta-item > .fa {
  font-size: 13px;
  margin-right: 4px;
  display: inline-block !important;
}
.materi-detail-tab-btn > i,
.materi-detail-tab-btn > .ti,
.materi-detail-tab-btn > .fa {
  font-size: 14px;
  display: inline-block !important;
}
.detail-card-icon.blue { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.detail-card-icon.amber { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.detail-card-icon.emerald { background: rgba(16, 185, 129, 0.12); color: #059669; }
.detail-card-icon.rose { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.detail-card-icon.purple { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }

html[data-mode="dark"] .detail-card-icon.blue { background: rgba(56, 189, 248, 0.18); color: #38bdf8; }
html[data-mode="dark"] .detail-card-icon.amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
html[data-mode="dark"] .detail-card-icon.emerald { background: rgba(16, 185, 129, 0.2); color: #34d399; }
html[data-mode="dark"] .detail-card-icon.rose { background: rgba(239, 68, 68, 0.2); color: #f87171; }
html[data-mode="dark"] .detail-card-icon.purple { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }

.detail-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--t-text-main, #0f172a);
  margin: 0;
}
html[data-mode="dark"] .detail-card-title {
  color: #f1f5f9;
}

.materi-detail-card-body {
  padding: 22px;
  color: var(--t-text-main, #334155);
  font-size: 14.5px;
  line-height: 1.7;
}
html[data-mode="dark"] .materi-detail-card-body {
  color: #cbd5e1;
}

/* PDF Attachment Card */
.materi-pdf-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px 20px;
  background: var(--t-surface-subtle, #f8fafc);
  border: 1.5px dashed var(--t-surface-border, #cbd5e1);
  border-radius: 14px;
  margin-top: 14px;
}
html[data-mode="dark"] .materi-pdf-attachment {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
}

.pdf-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
html[data-mode="dark"] .pdf-icon-box {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.detail-card-subtitle {
  font-size: 12px;
  color: var(--t-text-muted, #64748b);
  margin-top: 2px;
}
html[data-mode="dark"] .detail-card-subtitle {
  color: #94a3b8;
}

/* Materi Class Chip (Bersih tanpa badge) */
.materi-class-chip {
  display: inline;
  padding: 0;
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  box-shadow: none !important;
  font-size: inherit;
  font-weight: 600;
  color: var(--t-text-main, #334155);
}
html[data-mode="dark"] .materi-class-chip {
  background: transparent !important;
  border: none !important;
  color: #cbd5e1;
}

/* Media List inside Detail Cards */
.materi-detail-card .media-list-divided > .media {
  padding: 16px 20px;
  border-color: var(--t-surface-border, #f1f5f9) !important;
  transition: background 0.2s ease;
}
html[data-mode="dark"] .materi-detail-card .media-list-divided > .media {
  border-color: rgba(255, 255, 255, 0.06) !important;
}
html[data-mode="dark"] .materi-detail-card .media-list-hover > .media:hover {
  background: rgba(255, 255, 255, 0.03);
}
.materi-detail-card .media-body span.fw-600 {
  color: var(--t-text-main, #0f172a);
}
html[data-mode="dark"] .materi-detail-card .media-body span.fw-600 {
  color: #f8fafc;
}
.materi-detail-card .media-body .sidetitle {
  display: inline-block;
  padding: 2px 7px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--t-text-muted, #64748b);
  margin-left: 6px;
}
html[data-mode="dark"] .materi-detail-card .media-body .sidetitle {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}
.materi-detail-card .media-body p.fs-12 {
  color: var(--t-text-muted, #64748b);
  margin-top: 4px;
  margin-bottom: 6px;
}
html[data-mode="dark"] .materi-detail-card .media-body p.fs-12 {
  color: #94a3b8;
}
.materi-detail-card nav.nav .nav-link {
  color: var(--t-text-muted, #64748b);
  font-size: 12.5px;
  padding: 4px 10px 4px 0;
}
html[data-mode="dark"] .materi-detail-card nav.nav .nav-link {
  color: #94a3b8;
}
html[data-mode="dark"] .materi-detail-card nav.nav .nav-link:hover {
  color: #38bdf8;
}

/* Tables inside Detail Cards */
.materi-detail-card .table {
  margin-bottom: 0;
  color: var(--t-text-main, #334155);
}
html[data-mode="dark"] .materi-detail-card .table {
  color: #cbd5e1;
}
html[data-mode="dark"] .materi-detail-card .table thead tr.bg-dark {
  background-color: #0f172a !important;
  color: #f8fafc;
}
html[data-mode="dark"] .materi-detail-card .table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.02);
}
html[data-mode="dark"] .materi-detail-card .table-hover tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}
html[data-mode="dark"] .materi-detail-card .table td,
html[data-mode="dark"] .materi-detail-card .table th {
  border-color: rgba(255, 255, 255, 0.06);
}
html[data-mode="dark"] .materi-detail-card .table code {
  background: rgba(255, 255, 255, 0.08);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ==========================================================================
   FLOATING ACTION BUTTONS (FAB) PERMANENT GLOBAL SUPPRESSION
   Eliminates all circular floating action buttons (+, print, excel, upload, etc.)
   All primary actions are integrated into top header toolbars.
   ========================================================================== */
.fab,
.fab-fixed,
.fab.fab-fixed,
.btn-float,
.btn-float-container,
.fab-buttons,
.fab-buttons li,
.fab-icon-default,
.fab-icon-active,
a.btn-float,
button.btn-float {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  position: absolute !important;
  z-index: -9999 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
}

/* Modal Dark Mode Theme Adaptation */
html[data-mode="dark"] .modal-content {
  background-color: #1e293b !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}
html[data-mode="dark"] .modal-header {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .modal-header .modal-title {
  color: #f8fafc !important;
}
html[data-mode="dark"] .modal-header .close {
  color: #94a3b8 !important;
  text-shadow: none !important;
}
html[data-mode="dark"] .modal-footer {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .modal-body {
  color: #cbd5e1 !important;
}

/* ==========================================================================
   LBSOAL DARK MODE THEME ADAPTATION
   ========================================================================== */
html[data-mode="dark"] .lbsoal-card {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}
html[data-mode="dark"] .lbsoal-card:hover {
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
}

html[data-mode="dark"] .lbsoal-card-title,
html[data-mode="dark"] .lbsoal-card-title a {
  color: #f8fafc !important;
}
html[data-mode="dark"] .lbsoal-card-title a:hover {
  color: #38bdf8 !important;
}

/* Quick Metrics Strip in Dark Mode */
html[data-mode="dark"] .lbsoal-metrics-strip {
  background: rgba(15, 23, 42, 0.65) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .lbsoal-metric-col {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .lbsoal-metric-col strong {
  color: #f1f5f9 !important;
}

/* Pills & Badges in Dark Mode */
html[data-mode="dark"] .lbsoal-pill-success {
  background: rgba(16, 185, 129, 0.16) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}
html[data-mode="dark"] .lbsoal-pill-warning {
  background: rgba(245, 158, 11, 0.16) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}
html[data-mode="dark"] .lbsoal-pill-danger {
  background: rgba(239, 68, 68, 0.16) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}
html[data-mode="dark"] .lbsoal-pill-running {
  background: rgba(59, 130, 246, 0.18) !important;
  color: #60a5fa !important;
  border-color: rgba(59, 130, 246, 0.35) !important;
}
html[data-mode="dark"] .lbsoal-pill-muted {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
html[data-mode="dark"] .lbsoal-pill-scope {
  background: rgba(255, 255, 255, 0.09) !important;
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

/* Code Badge & Tags in Dark Mode */
html[data-mode="dark"] .lbsoal-code-badge {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.25) !important;
}
html[data-mode="dark"] .lbsoal-mapel-badge {
  background: rgba(37, 99, 235, 0.2) !important;
  color: #93c5fd !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
}
html[data-mode="dark"] .lbsoal-tag-kelas {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #e2e8f0 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
html[data-mode="dark"] .lbsoal-sesi-tag {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
}

/* Description & Schedule in Dark Mode */
html[data-mode="dark"] .lbsoal-desc {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .lbsoal-schedule-item {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .lbsoal-schedule-item i {
  color: #64748b !important;
}

/* Card Footer & Action Buttons in Dark Mode */
html[data-mode="dark"] .lbsoal-card-footer {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .lbsoal-card-footer .btn-outline-success {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
}
html[data-mode="dark"] .lbsoal-card-footer .btn-outline-success:hover {
  background: #10b981 !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .lbsoal-card-footer .btn-outline-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
}
html[data-mode="dark"] .lbsoal-card-footer .btn-outline-danger:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .lbsoal-card-footer .btn-warning {
  background: #f59e0b !important;
  color: #ffffff !important;
  border-color: #d97706 !important;
}

/* 3-dots Menu Button & Dropdown in Dark Mode */
html[data-mode="dark"] .lbsoal-opt-btn {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .lbsoal-opt-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}
html[data-mode="dark"] .lbsoal-card .dropdown-menu {
  background-color: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}
html[data-mode="dark"] .lbsoal-card .dropdown-item {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .lbsoal-card .dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}
html[data-mode="dark"] .lbsoal-card .dropdown-divider {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* Filter Card in Dark Mode */
html[data-mode="dark"] .lbsoal-filter-card {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}
html[data-mode="dark"] .lbsoal-filter-card h4 {
  color: #f8fafc !important;
}
html[data-mode="dark"] .lbsoal-header-icon {
  background: rgba(37, 99, 235, 0.18) !important;
  color: #38bdf8 !important;
}
html[data-mode="dark"] .lbsoal-filter-form label {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .lbsoal-filter-form .form-control {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
html[data-mode="dark"] .lbsoal-filter-form .form-control:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15) !important;
}

/* Pagination in Dark Mode */
html[data-mode="dark"] .pagination .page-item .page-link {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .pagination .page-item.active .page-link {
  background: var(--t-primary, #059669) !important;
  border-color: var(--t-primary, #059669) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .pagination .page-item.disabled .page-link {
  background: rgba(30, 41, 59, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  color: #64748b !important;
}

/* Empty State Card in Dark Mode */
.lbsoal-empty-card {
  background: var(--t-surface, #ffffff);
}
html[data-mode="dark"] .lbsoal-empty-card {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
html[data-mode="dark"] .lbsoal-empty-card h5 {
  color: #f8fafc !important;
}
html[data-mode="dark"] .lbsoal-empty-card p {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .lbsoal-empty-card div > div {
  background: rgba(255, 255, 255, 0.06) !important;
}





/* ==========================================================================
   Universal Outside Border Removal & Frameless Tables
   ========================================================================== */
.module-data-card,
.card:has(table),
.card:has(.table-responsive),
.card:has(.dataTables_wrapper),
.card.is-table-card,
.card-table-wrap {
  border: none !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05), 0 4px 20px rgba(15, 23, 42, 0.03) !important;
}

html[data-mode="dark"] .module-data-card,
html[data-mode="dark"] .card:has(table),
html[data-mode="dark"] .card:has(.table-responsive),
html[data-mode="dark"] .card:has(.dataTables_wrapper),
html[data-mode="dark"] .card.is-table-card {
  border: none !important;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.25) !important;
}

/* Outside borders removed on ALL tables across the application */
table.table,
table.dataTable,
.table-bordered,
.table-responsive,
div.dataTables_wrapper {
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
}
table.dataTable.no-footer,
table.table.no-footer {
  border-bottom: none !important;
}
table.table thead th:first-child,
table.dataTable thead th:first-child,
table.table tbody td:first-child,
table.dataTable tbody td:first-child,
.table-bordered thead th:first-child,
.table-bordered tbody td:first-child {
  border-left: none !important;
}
table.table thead th:last-child,
table.dataTable thead th:last-child,
table.table tbody td:last-child,
table.dataTable tbody td:last-child,
.table-bordered thead th:last-child,
.table-bordered tbody td:last-child {
  border-right: none !important;
}
table.table tbody tr:last-child td,
table.dataTable tbody tr:last-child td,
.table-bordered tbody tr:last-child td {
  border-bottom: none !important;
}

/* Universal Generic Card Mode Enhancements */
.table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-tugas-table):not(.is-hasiltes-table) table.dataTable tbody tr:not(:has(input[type="checkbox"])) td:first-child,
.table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-tugas-table):not(.is-hasiltes-table) table.table tbody tr:not(:has(input[type="checkbox"])) td:first-child {
  position: static !important;
  display: inline-block !important;
  margin-bottom: 6px !important;
  padding: 0 !important;
}

.table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-tugas-table):not(.is-hasiltes-table) table.dataTable tbody tr:not(:has(input[type="checkbox"])) td:nth-child(2),
.table-responsive.mode-card-view:not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-tugas-table):not(.is-hasiltes-table) table.table tbody tr:not(:has(input[type="checkbox"])) td:nth-child(2) {
  display: block !important;
  padding: 0 44px 6px 0 !important;
  width: 100% !important;
}

.table-responsive.mode-card-view:not(.is-siswa-table):not(.is-guru-table):not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-tugas-table):not(.is-hasiltes-table) table.dataTable tbody td:not(:first-child):not(:nth-child(2)):not(:last-child),
.table-responsive.mode-card-view:not(.is-siswa-table):not(.is-guru-table):not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-tugas-table):not(.is-hasiltes-table) table.table tbody td:not(:first-child):not(:nth-child(2)):not(:last-child) {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 12px !important;
  color: #64748b !important;
  margin-right: 8px !important;
  margin-top: 4px !important;
}

html[data-mode="dark"] .table-responsive.mode-card-view:not(.is-siswa-table):not(.is-guru-table):not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-tugas-table):not(.is-hasiltes-table) table.dataTable tbody td:not(:first-child):not(:nth-child(2)):not(:last-child),
html[data-mode="dark"] .table-responsive.mode-card-view:not(.is-siswa-table):not(.is-guru-table):not(.is-survey-table):not(.is-hasilsurvey-table):not(.is-tugas-table):not(.is-hasiltes-table) table.table tbody td:not(:first-child):not(:nth-child(2)):not(:last-child) {
  color: #94a3b8 !important;
}

/* ==========================================================================
   UNIVERSAL PASSWORD VISIBILITY EYE TOGGLE
   ========================================================================== */
.input-password-wrapper {
  position: relative !important;
  display: block !important;
  width: 100% !important;
}
.input-password-wrapper .form-control {
  padding-right: 42px !important;
}
.btn-toggle-password {
  position: absolute !important;
  right: 2px !important;
  top: 1px !important;
  height: 36px !important;
  width: 38px !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  z-index: 5 !important;
  border-radius: 0 8px 8px 0 !important;
  transition: color 0.15s ease !important;
  outline: none !important;
}
.btn-toggle-password:hover,
.btn-toggle-password:focus {
  color: #2563eb !important;
  background: transparent !important;
  outline: none !important;
}
.btn-toggle-password i {
  font-size: 15px !important;
  line-height: 1 !important;
  pointer-events: none !important;
}
html[data-mode="dark"] .btn-toggle-password {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .btn-toggle-password:hover,
html[data-mode="dark"] .btn-toggle-password:focus {
  color: #60a5fa !important;
}

/* Hide Quran Hero Icon Box */
.quran-hero-icon-box {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
}

/* ==========================================================================
   AL-QUR'AN FLOATING NAVIGATION & GO TO AYAT (v=35.6)
   - Go to Ayat button (positioned above Back to Top)
   - Smooth Back to Top button with scroll threshold
   - Responsive placement above mobile bottom navigation bar
   - Dark mode support
   ========================================================================== */
.quran-float-nav {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.quran-btn-float {
  pointer-events: auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18), 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.quran-btn-float:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
}
.quran-btn-float:active {
  transform: translateY(0) scale(0.95);
}
.quran-btn-goto {
  background: linear-gradient(135deg, #1e50a2 0%, #0d3880 100%);
  color: #ffffff !important;
}
.quran-btn-goto:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff !important;
}
.quran-btn-top {
  background: #ffffff;
  color: #1e293b !important;
  border: 1px solid rgba(226, 232, 240, 0.9);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
}
.quran-btn-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.quran-btn-top:hover {
  background: #f8fafc;
  color: #1e50a2 !important;
  border-color: #cbd5e1;
}
.quran-btn-float-tooltip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #0f172a;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.quran-btn-float:hover .quran-btn-float-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(-2px);
}
.goto-ayat-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.btn-preset-ayat {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 5px 11px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-preset-ayat:hover {
  background: #e2e8f0;
  color: #1e50a2;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
html[data-mode="dark"] .quran-btn-top {
  background: #1e293b;
  color: #f1f5f9 !important;
  border-color: #334155;
}
html[data-mode="dark"] .quran-btn-top:hover {
  background: #334155;
  color: #60a5fa !important;
  border-color: #475569;
}
html[data-mode="dark"] #goToAyatModal .modal-content {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}
html[data-mode="dark"] #goToAyatModal .modal-header,
html[data-mode="dark"] #goToAyatModal .modal-footer {
  background: #0f172a !important;
  border-color: #334155 !important;
}
html[data-mode="dark"] #goToAyatModal .modal-title {
  color: #f8fafc !important;
}
html[data-mode="dark"] #goToAyatModal label {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] #goToAyatModal input {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}
html[data-mode="dark"] .btn-preset-ayat {
  background: #0f172a;
  border-color: #334155;
  color: #94a3b8;
}
html[data-mode="dark"] .btn-preset-ayat:hover {
  background: #334155;
  color: #60a5fa;
  border-color: #475569;
}
@media (max-width: 767px) {
  .quran-float-nav {
    right: 16px !important;
    bottom: calc(75px + env(safe-area-inset-bottom, 0px)) !important;
    gap: 10px;
  }
  .quran-btn-float {
    width: 44px;
    height: 44px;
    font-size: 15px;
  }
  .quran-btn-float-tooltip {
    display: none !important;
  }
}

/* ==========================================================================
   MATERI HEADER & TAHUN AJARAN MOBILE OPTIMIZATION (v=35.8)
   - Hide book icon at top on mobile
   - Clean balanced row for Tahun Ajaran & Buat Materi button
   - Prevent dropdown text truncation or arrow overlap
   ========================================================================== */
@media (max-width: 767px) {
  .materi-header-icon {
    display: none !important;
  }
  .materi-header-actions {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 6px !important;
  }
  .materi-th-wrap {
    flex: 1 1 0% !important;
    min-width: 135px !important;
  }
  .materi-th-select {
    width: 100% !important;
    min-width: 135px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    line-height: normal !important;
    padding: 0 30px 0 10px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    vertical-align: middle !important;
    background-position: right 10px center !important;
    font-size: 12px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  .materi-btn-add-wrap {
    flex: 0 0 auto !important;
  }
  .materi-btn-buat {
    height: 38px !important;
    padding: 0 12px !important;
    white-space: nowrap !important;
    font-size: 12.5px !important;
    gap: 5px !important;
  }
}


/* ==========================================================================
   COMPACT SIDEBAR TYPOGRAPHY & TIGHT LINE-HEIGHT (v=37.3)
   - Tighter line-height and compact padding for sidebar items
   - Reduced category heading margins & padding
   - Streamlined submenu item spacing
   ========================================================================== */
.sidebar .sidebar-navigation ul.menu > .menu-category,
#app-sidebar .sidebar-navigation ul.menu > .menu-category,
.sidebar .menu-category {
  display: block !important;
  padding: 8px 14px 2px 14px !important;
  margin: 0 !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  line-height: 1.2 !important;
  color: #64748b !important;
}

.sidebar .sidebar-navigation ul.menu > .menu-item,
#app-sidebar .sidebar-navigation ul.menu > .menu-item,
.sidebar .menu-item {
  margin: 0 !important;
  padding: 0 !important;
}

.sidebar .sidebar-navigation .menu-link,
.sidebar:not(.sidebar-folded) .menu-link,
#app-sidebar:not(.sidebar-folded) .menu-link,
.sidebar .menu-link {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 4px 10px !important;
  margin: 1px 8px !important;
  height: auto !important;
  min-height: 32px !important;
  max-height: none !important;
  line-height: 1.2 !important;
  border-radius: 8px !important;
  font-size: 12.5px !important;
}

.sidebar .menu-link .title,
.sidebar-navigation .menu-link .title,
#app-sidebar .menu-link .title {
  font-size: 12.5px !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.sidebar .menu-link .icon,
.sidebar-navigation .menu-link .icon,
#app-sidebar .menu-link .icon {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  max-width: 14px !important;
  font-size: 10.5px !important;
  line-height: 14px !important;
  margin-right: 9px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: translateY(0.5px) !important;
}

.sidebar .menu-link .arrow,
.sidebar-navigation .menu-link .arrow,
#app-sidebar .menu-link .arrow {
  font-size: 11px !important;
  line-height: 1 !important;
  margin-left: auto !important;
}

/* Submenu Compact Spacing */
.sidebar .menu-submenu,
.sidebar-navigation .menu-submenu,
#app-sidebar .menu-submenu {
  padding: 1px 0 2px 0 !important;
  margin: 0 0 2px 0 !important;
}

.sidebar .menu-submenu .menu-item,
.sidebar-navigation .menu-submenu .menu-item,
#app-sidebar .menu-submenu .menu-item {
  margin: 0 !important;
  padding: 0 !important;
}

.sidebar .menu-submenu .menu-link,
.sidebar-navigation .menu-submenu .menu-link,
#app-sidebar .menu-submenu .menu-link {
  padding: 3px 10px 3px 12px !important;
  margin: 1px 6px !important;
  min-height: 26px !important;
  height: auto !important;
  line-height: 1.2 !important;
  font-size: 11.5px !important;
  border-radius: 6px !important;
}

.sidebar .menu-submenu .menu-link .title,
.sidebar-navigation .menu-submenu .menu-link .title,
#app-sidebar .menu-submenu .menu-link .title {
  font-size: 11.5px !important;
  line-height: 1.2 !important;
}

.sidebar .menu-submenu .dot,
.sidebar-navigation .menu-submenu .dot,
#app-sidebar .menu-submenu .dot {
  width: 5px !important;
  height: 5px !important;
  margin-right: 8px !important;
}

/* Sidebar Period Card Compact Spacing */
.sidebar-period-wrapper {
  padding: 6px 10px 4px 10px !important;
}

.sidebar-period-card {
  padding: 7px 9px !important;
  border-radius: 10px !important;
}

.sidebar-period-header {
  margin-bottom: 5px !important;
}

.sidebar-period-form {
  gap: 3px !important;
}

.sidebar-period-select {
  height: 28px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  border-radius: 6px !important;
}



/* ==========================================================================
   SURVEY MODULE: CARD VIEW & ANALYTICS STYLING
   ========================================================================== */

/* 1. Analytics KPI & Chart Cards */
.survey-analytics-section {
  margin-bottom: 24px !important;
}
.survey-kpi-card,
.module-kpi-card,
.hasiltes-kpi-card {
  display: flex !important;
  align-items: center !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 16px 18px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  transition: all 0.2s ease !important;
  height: 100% !important;
  box-sizing: border-box !important;
}
.survey-kpi-card:hover,
.module-kpi-card:hover,
.hasiltes-kpi-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08) !important;
}
.survey-kpi-icon-wrap,
.module-kpi-icon-wrap,
.hasiltes-kpi-icon-wrap {
  width: 46px !important;
  height: 46px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px !important;
  color: #ffffff !important;
  margin-right: 14px !important;
  flex-shrink: 0 !important;
}
.survey-kpi-icon-wrap.icon-blue,
.module-kpi-icon-wrap.icon-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important; }
.survey-kpi-icon-wrap.icon-emerald,
.module-kpi-icon-wrap.icon-emerald { background: linear-gradient(135deg, #10b981, #059669) !important; }
.survey-kpi-icon-wrap.icon-amber,
.module-kpi-icon-wrap.icon-amber { background: linear-gradient(135deg, #f59e0b, #d97706) !important; }
.survey-kpi-icon-wrap.icon-purple,
.module-kpi-icon-wrap.icon-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important; }

.survey-kpi-label,
.module-kpi-label,
.hasiltes-kpi-label {
  display: block !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: #64748b !important;
  margin-bottom: 2px !important;
}
.survey-kpi-val,
.module-kpi-val,
.hasiltes-kpi-val {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}
.survey-kpi-desc,
.module-kpi-desc,
.hasiltes-kpi-desc {
  font-size: 11px !important;
  color: #94a3b8 !important;
  display: block !important;
  margin-top: 2px !important;
}

html[data-mode="dark"] .survey-kpi-card,
html[data-mode="dark"] .module-kpi-card,
html[data-mode="dark"] .hasiltes-kpi-card {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}
html[data-mode="dark"] .survey-kpi-val,
html[data-mode="dark"] .module-kpi-val,
html[data-mode="dark"] .hasiltes-kpi-val {
  color: #f8fafc !important;
}
html[data-mode="dark"] .survey-kpi-label,
html[data-mode="dark"] .module-kpi-label,
html[data-mode="dark"] .hasiltes-kpi-label {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .survey-kpi-desc,
html[data-mode="dark"] .module-kpi-desc,
html[data-mode="dark"] .hasiltes-kpi-desc {
  color: #64748b !important;
}

.survey-chart-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  transition: all 0.2s ease !important;
  overflow: hidden !important;
}
.survey-chart-card .card-header {
  background: transparent !important;
  padding: 16px 20px 8px 20px !important;
  border-bottom: none !important;
}
.survey-chart-card .card-body {
  padding: 12px 20px 20px 20px !important;
}
html[data-mode="dark"] .survey-chart-card {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}
html[data-mode="dark"] .survey-chart-card .card-title {
  color: #f1f5f9 !important;
}

.dot-legend {
  display: inline-block !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  margin-right: 4px !important;
}
.bg-purple { background-color: #8b5cf6 !important; }
.badge-subtle-primary { background: rgba(59, 130, 246, 0.12) !important; color: #2563eb !important; font-weight: 600 !important; padding: 4px 8px !important; border-radius: 6px !important; }
.badge-subtle-info { background: rgba(14, 165, 233, 0.12) !important; color: #0284c7 !important; font-weight: 600 !important; padding: 4px 8px !important; border-radius: 6px !important; }
.badge-subtle-success { background: rgba(16, 185, 129, 0.12) !important; color: #059669 !important; font-weight: 600 !important; padding: 4px 8px !important; border-radius: 6px !important; }
.badge-subtle-warning { background: rgba(245, 158, 11, 0.12) !important; color: #d97706 !important; font-weight: 600 !important; padding: 4px 8px !important; border-radius: 6px !important; }

/* 2. Survey Target Badges */
.badge-target-guru {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  letter-spacing: 0.3px !important;
}
.badge-target-siswa {
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  letter-spacing: 0.3px !important;
}
.badge-target-umum {
  background: #f5f3ff !important;
  color: #7c3aed !important;
  border: 1px solid #ddd6fe !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  letter-spacing: 0.3px !important;
}

html[data-mode="dark"] .badge-target-guru {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}
html[data-mode="dark"] .badge-target-siswa {
  background: rgba(59, 130, 246, 0.18) !important;
  color: #60a5fa !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}
html[data-mode="dark"] .badge-target-umum {
  background: rgba(139, 92, 246, 0.18) !important;
  color: #a78bfa !important;
  border-color: rgba(139, 92, 246, 0.3) !important;
}

.badge-pill-quest {
  background: #f0f9ff !important;
  color: #0369a1 !important;
  border: 1px solid #bae6fd !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  padding: 5px 10px !important;
  border-radius: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
}
.badge-pill-resp {
  background: #f0fdf4 !important;
  color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  padding: 5px 10px !important;
  border-radius: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}
.badge-pill-resp:hover {
  background: #dcfce7 !important;
  color: #166534 !important;
}

html[data-mode="dark"] .badge-pill-quest {
  background: rgba(14, 165, 233, 0.15) !important;
  color: #38bdf8 !important;
  border-color: rgba(14, 165, 233, 0.25) !important;
}
html[data-mode="dark"] .badge-pill-resp {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #4ade80 !important;
  border-color: rgba(34, 197, 94, 0.25) !important;
}

/* 3. Survey Card View Layout */
.table-responsive.is-survey-table.mode-card-view table.dataTable,
.table-responsive.is-survey-table.mode-card-view table.table {
  display: block !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 100% !important;
  margin: 0 !important;
}

.table-responsive.is-survey-table.mode-card-view table.dataTable thead,
.table-responsive.is-survey-table.mode-card-view table.table thead {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  padding: 0 !important;
}

.table-responsive.is-survey-table.mode-card-view table.dataTable tbody,
.table-responsive.is-survey-table.mode-card-view table.table tbody {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 767px) {
  .table-responsive.is-survey-table.mode-card-view table.dataTable tbody,
  .table-responsive.is-survey-table.mode-card-view table.table tbody {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

.table-responsive.is-survey-table.mode-card-view table.dataTable tbody,
.table-responsive.is-survey-table.mode-card-view table.table tbody {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 991px) {
  .table-responsive.is-survey-table.mode-card-view table.dataTable tbody,
  .table-responsive.is-survey-table.mode-card-view table.table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }
}

.table-responsive.is-survey-table.mode-card-view table.dataTable tbody tr,
.table-responsive.is-survey-table.mode-card-view table.table tbody tr {
  display: flex !important;
  flex-wrap: wrap !important;
  flex-direction: row !important;
  align-content: flex-start !important;
  position: relative !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 16px 18px 14px 18px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.02) !important;
  transition: all 0.2s ease-in-out !important;
  min-height: auto !important;
  box-sizing: border-box !important;
  margin-bottom: 0 !important;
  width: 100% !important;
}

.table-responsive.is-survey-table.mode-card-view table.dataTable tbody tr:hover,
.table-responsive.is-survey-table.mode-card-view table.table tbody tr:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
  border-color: #93c5fd !important;
}

html[data-mode="dark"] .table-responsive.is-survey-table.mode-card-view table.dataTable tbody tr,
html[data-mode="dark"] .table-responsive.is-survey-table.mode-card-view table.table tbody tr {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

html[data-mode="dark"] .table-responsive.is-survey-table.mode-card-view table.dataTable tbody tr:hover,
html[data-mode="dark"] .table-responsive.is-survey-table.mode-card-view table.table tbody tr:hover {
  border-color: rgba(59, 130, 246, 0.5) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45) !important;
}

/* Reset all TD cells inside survey cards */
.table-responsive.is-survey-table.mode-card-view table.dataTable tbody td,
.table-responsive.is-survey-table.mode-card-view table.table tbody td,
.table-responsive.is-survey-table.mode-card-view table tbody tr > td:first-child,
.table-responsive.is-survey-table.mode-card-view table tbody tr > td:nth-child(2),
.table-responsive.is-survey-table.mode-card-view table.dataTable.table-wide-mobile > tbody > tr > td:first-child,
.table-responsive.is-survey-table.mode-card-view table.table.table-wide-mobile > tbody > tr > td:first-child {
  position: static !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Line 1: Target Badge (order 1) & Status Badge (order 2) */
.table-responsive.is-survey-table.mode-card-view td.survey-cell-target {
  order: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  margin-bottom: 10px !important;
  margin-right: 6px !important;
  width: auto !important;
  position: static !important;
}

.table-responsive.is-survey-table.mode-card-view td.survey-cell-status {
  order: 2 !important;
  display: inline-flex !important;
  align-items: center !important;
  margin-bottom: 10px !important;
  margin-right: auto !important;
  width: auto !important;
  position: static !important;
}

/* 3-Dot Action Button Top-Right */
.table-responsive.is-survey-table.mode-card-view td.survey-cell-actions {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 32px !important;
  height: 32px !important;
  z-index: 10 !important;
}

.table-responsive.is-survey-table.mode-card-view .btn-survey-action {
  width: 32px !important;
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
  background: #f1f5f9 !important;
  color: #64748b !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
  border: 1px solid #e2e8f0 !important;
}
.table-responsive.is-survey-table.mode-card-view .btn-survey-action:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
html[data-mode="dark"] .table-responsive.is-survey-table.mode-card-view .btn-survey-action {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
}
html[data-mode="dark"] .table-responsive.is-survey-table.mode-card-view .btn-survey-action:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}

/* Line 2: Title & Description (order 3, full-width) */
.table-responsive.is-survey-table.mode-card-view td.survey-cell-main {
  order: 3 !important;
  display: block !important;
  width: 100% !important;
  flex: 0 0 100% !important;
  padding: 0 36px 0 0 !important;
  margin-bottom: 12px !important;
  position: static !important;
}

.table-responsive.is-survey-table.mode-card-view .survey-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.4 !important;
  margin-bottom: 6px !important;
  display: block !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}
.table-responsive.is-survey-table.mode-card-view .survey-title:hover {
  color: #2563eb !important;
}
html[data-mode="dark"] .table-responsive.is-survey-table.mode-card-view .survey-title {
  color: #f1f5f9 !important;
}
html[data-mode="dark"] .table-responsive.is-survey-table.mode-card-view .survey-title:hover {
  color: #60a5fa !important;
}

.table-responsive.is-survey-table.mode-card-view .survey-desc {
  font-size: 12.5px !important;
  color: #64748b !important;
  line-height: 1.5 !important;
  display: block !important;
}
html[data-mode="dark"] .table-responsive.is-survey-table.mode-card-view .survey-desc {
  color: #94a3b8 !important;
}

/* Line 3: Stats Chips (Quest & Responden side-by-side) */
.table-responsive.is-survey-table.mode-card-view td.survey-cell-quest {
  order: 4 !important;
  display: inline-flex !important;
  align-items: center !important;
  margin-right: 8px !important;
  margin-bottom: 14px !important;
  width: auto !important;
  position: static !important;
}

.table-responsive.is-survey-table.mode-card-view td.survey-cell-resp {
  order: 5 !important;
  display: inline-flex !important;
  align-items: center !important;
  margin-bottom: 14px !important;
  width: auto !important;
  position: static !important;
}

/* Line 4: Card Footer (Updated timestamp, pinned to bottom) */
.table-responsive.is-survey-table.mode-card-view td.survey-cell-updated {
  order: 6 !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  flex: 0 0 100% !important;
  margin-top: auto !important;
  padding-top: 10px !important;
  border-top: 1px solid #f1f5f9 !important;
  font-size: 11.5px !important;
  color: #94a3b8 !important;
  position: static !important;
}
html[data-mode="dark"] .table-responsive.is-survey-table.mode-card-view td.survey-cell-updated {
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: #64748b !important;
}

/* ==========================================================================
   HASIL & ANALISIS SURVEY (IS-HASILSURVEY-TABLE) STYLING
   High-contrast, elegant layout for both Table View and Card View
   ========================================================================== */

/* Overview Banner & Stats Chips */
.survey-info-card {
  border-radius: 16px !important;
  border: 1px solid #e2e8f0 !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  background: #ffffff !important;
}

.survey-info-card .card-body {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(248, 250, 252, 0.9) 100%) !important;
}

html[data-mode="dark"] .survey-info-card {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

html[data-mode="dark"] .survey-info-card .card-body {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
}

.survey-info-main {
  flex: 1 1 300px !important;
  min-width: 0 !important;
}

.survey-headline-title {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.4 !important;
}

html[data-mode="dark"] .survey-headline-title {
  color: #f8fafc !important;
}

.survey-headline-desc {
  font-size: 13.5px !important;
  color: #64748b !important;
  line-height: 1.5 !important;
}

html[data-mode="dark"] .survey-headline-desc {
  color: #94a3b8 !important;
}

.survey-stats-chips {
  gap: 10px !important;
}

.survey-stat-chip {
  display: inline-flex !important;
  align-items: center !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  gap: 10px !important;
}

html[data-mode="dark"] .survey-stat-chip {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.survey-stat-chip i {
  font-size: 18px !important;
}

.survey-stat-label {
  display: block !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: #64748b !important;
}

html[data-mode="dark"] .survey-stat-label {
  color: #94a3b8 !important;
}

.survey-stat-val {
  display: block !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.2 !important;
}

html[data-mode="dark"] .survey-stat-val {
  color: #f8fafc !important;
}

/* 1. TABLE VIEW (DEFAULT / DESKTOP) */
.table-responsive.is-hasilsurvey-table table.survey-result-table {
  width: 100% !important;
  margin-bottom: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.table-responsive.is-hasilsurvey-table table.survey-result-table thead th {
  background: #f8fafc !important;
  color: #334155 !important;
  font-weight: 700 !important;
  font-size: 12.5px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  padding: 12px 16px !important;
  border-bottom: 2px solid #e2e8f0 !important;
  border-top: none !important;
}

html[data-mode="dark"] .table-responsive.is-hasilsurvey-table table.survey-result-table thead th {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

.table-responsive.is-hasilsurvey-table table.survey-result-table tbody tr.survey-quest-row {
  border-bottom: 1px solid #f1f5f9 !important;
  transition: background-color 0.15s ease !important;
}

.table-responsive.is-hasilsurvey-table table.survey-result-table tbody tr.survey-quest-row:hover {
  background-color: rgba(248, 250, 252, 0.8) !important;
}

html[data-mode="dark"] .table-responsive.is-hasilsurvey-table table.survey-result-table tbody tr.survey-quest-row {
  border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

html[data-mode="dark"] .table-responsive.is-hasilsurvey-table table.survey-result-table tbody tr.survey-quest-row:hover {
  background-color: rgba(255, 255, 255, 0.03) !important;
}

.table-responsive.is-hasilsurvey-table:not(.mode-card-view) table.survey-result-table tbody td {
  padding: 16px !important;
  vertical-align: top !important;
  background: transparent !important;
}

.table-responsive.is-hasilsurvey-table .survey-badge-no {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}

html[data-mode="dark"] .table-responsive.is-hasilsurvey-table .survey-badge-no {
  background: #334155 !important;
  color: #e2e8f0 !important;
}

.table-responsive.is-hasilsurvey-table .survey-quest-title {
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  line-height: 1.55 !important;
  white-space: normal !important;
  word-break: break-word !important;
}

html[data-mode="dark"] .table-responsive.is-hasilsurvey-table .survey-quest-title {
  color: #f1f5f9 !important;
}

/* Survey Options Container & Items */
.survey-options-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  width: 100% !important;
}

.survey-option-item {
  display: flex !important;
  flex-direction: column !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  transition: all 0.15s ease !important;
}

.survey-option-item:hover {
  border-color: #cbd5e1 !important;
  background: #f1f5f9 !important;
}

html[data-mode="dark"] .survey-option-item {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-mode="dark"] .survey-option-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.survey-option-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 6px !important;
  gap: 12px !important;
}

.survey-option-label {
  display: flex !important;
  align-items: baseline !important;
  gap: 6px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.survey-option-idx {
  font-weight: 700 !important;
  color: #64748b !important;
  font-size: 13px !important;
  flex-shrink: 0 !important;
}

html[data-mode="dark"] .survey-option-idx {
  color: #94a3b8 !important;
}

.survey-option-text {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  line-height: 1.4 !important;
  word-break: break-word !important;
}

html[data-mode="dark"] .survey-option-text {
  color: #f1f5f9 !important;
}

.survey-option-stats {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.survey-stat-count {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #475569 !important;
}

html[data-mode="dark"] .survey-stat-count {
  color: #94a3b8 !important;
}

.survey-stat-badge {
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  min-width: 52px !important;
  text-align: center !important;
}

.survey-progress-wrap {
  width: 100% !important;
  height: 7px !important;
  background: #e2e8f0 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
}

html[data-mode="dark"] .survey-progress-wrap {
  background: #334155 !important;
}

.survey-progress-bar {
  height: 100% !important;
  border-radius: 999px !important;
  transition: width 0.4s ease !important;
}

/* 2. CARD VIEW (MODE KARTU) - SCOPED TO IS-HASILSURVEY-TABLE */
.table-responsive.is-hasilsurvey-table.mode-card-view table.survey-result-table {
  display: block !important;
  width: 100% !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.table-responsive.is-hasilsurvey-table.mode-card-view table.survey-result-table thead {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  padding: 0 !important;
}

.table-responsive.is-hasilsurvey-table.mode-card-view table.survey-result-table tbody {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)) !important;
  gap: 20px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 991px) {
  .table-responsive.is-hasilsurvey-table.mode-card-view table.survey-result-table tbody {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

.table-responsive.is-hasilsurvey-table.mode-card-view table.survey-result-table tbody tr.survey-quest-row {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  position: relative !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 20px 22px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.02) !important;
  transition: all 0.2s ease-in-out !important;
  min-height: auto !important;
  box-sizing: border-box !important;
  margin-bottom: 0 !important;
  width: 100% !important;
}

.table-responsive.is-hasilsurvey-table.mode-card-view table.survey-result-table tbody tr.survey-quest-row:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
  border-color: #93c5fd !important;
}

html[data-mode="dark"] .table-responsive.is-hasilsurvey-table.mode-card-view table.survey-result-table tbody tr.survey-quest-row {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

html[data-mode="dark"] .table-responsive.is-hasilsurvey-table.mode-card-view table.survey-result-table tbody tr.survey-quest-row:hover {
  border-color: rgba(59, 130, 246, 0.5) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45) !important;
}

/* Reset all TD cells inside survey-result-table in Card View */
.table-responsive.is-hasilsurvey-table.mode-card-view table.survey-result-table tbody td {
  position: static !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.table-responsive.is-hasilsurvey-table.mode-card-view td.survey-col-no {
  order: 1 !important;
  display: flex !important;
  align-items: center !important;
  margin-bottom: 10px !important;
  width: 100% !important;
}

.table-responsive.is-hasilsurvey-table.mode-card-view td.survey-col-no .survey-badge-no {
  height: 26px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  background: rgba(37, 99, 235, 0.1) !important;
  color: #2563eb !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
}

html[data-mode="dark"] .table-responsive.is-hasilsurvey-table.mode-card-view td.survey-col-no .survey-badge-no {
  background: rgba(59, 130, 246, 0.18) !important;
  color: #93c5fd !important;
}

.table-responsive.is-hasilsurvey-table.mode-card-view td.survey-col-quest {
  order: 2 !important;
  display: block !important;
  margin-bottom: 16px !important;
  width: 100% !important;
}

.table-responsive.is-hasilsurvey-table.mode-card-view td.survey-col-quest .survey-quest-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.5 !important;
}

html[data-mode="dark"] .table-responsive.is-hasilsurvey-table.mode-card-view td.survey-col-quest .survey-quest-title {
  color: #f8fafc !important;
}

.table-responsive.is-hasilsurvey-table.mode-card-view td.survey-col-options {
  order: 3 !important;
  display: block !important;
  width: 100% !important;
}


/* ==========================================================================
   UNIVERSAL MOBILE DATA TABLES PAGINATION ENHANCEMENT
   ========================================================================== */
@media (max-width: 767px) {
  div.dataTables_wrapper div.dataTables_info {
    text-align: center !important;
    font-size: 11.5px !important;
    color: #94a3b8 !important;
    margin: 12px 0 6px 0 !important;
    float: none !important;
  }

  div.dataTables_wrapper div.dataTables_paginate {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 6px 0 16px 0 !important;
    float: none !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 4px 0 !important;
    box-sizing: border-box !important;
  }
  div.dataTables_wrapper div.dataTables_paginate::-webkit-scrollbar {
    display: none !important;
  }

  div.dataTables_wrapper div.dataTables_paginate ul.pagination {
    display: inline-flex !important;
    flex-wrap: nowrap !important; /* NEVER wrap Next to second row */
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    margin: 0 auto !important;
    padding: 0 4px !important;
  }

  div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item,
  div.dataTables_wrapper div.dataTables_paginate ul.pagination li {
    flex-shrink: 0 !important;
    display: inline-flex !important;
    margin: 0 !important;
  }

  div.dataTables_wrapper div.dataTables_paginate ul.pagination li a.page-link,
  div.dataTables_wrapper div.dataTables_paginate ul.pagination li a,
  div.dataTables_wrapper div.dataTables_paginate .paginate_button {
    min-width: 28px !important;
    height: 30px !important;
    line-height: 30px !important;
    padding: 0 6px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #475569 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
  }

  /* Active Page */
  div.dataTables_wrapper div.dataTables_paginate ul.pagination li.active a,
  div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item.active a.page-link,
  div.dataTables_wrapper div.dataTables_paginate .paginate_button.current {
    background: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.35) !important;
  }

  /* Previous & Next Button */
  div.dataTables_wrapper div.dataTables_paginate ul.pagination li:first-child a,
  div.dataTables_wrapper div.dataTables_paginate ul.pagination li:last-child a,
  div.dataTables_wrapper div.dataTables_paginate .paginate_button.previous,
  div.dataTables_wrapper div.dataTables_paginate .paginate_button.next {
    padding: 0 10px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
  }

  /* Disabled State */
  div.dataTables_wrapper div.dataTables_paginate ul.pagination li.disabled a,
  div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item.disabled a.page-link,
  div.dataTables_wrapper div.dataTables_paginate .paginate_button.disabled {
    opacity: 0.45 !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    pointer-events: none !important;
    box-shadow: none !important;
  }

  /* Dark Mode Pagination */
  html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate ul.pagination li a.page-link,
  html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate ul.pagination li a,
  html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate .paginate_button {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
  }
  html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate ul.pagination li.active a,
  html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item.active a.page-link,
  html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate .paginate_button.current {
    background: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
  }
  html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate ul.pagination li.disabled a,
  html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate .paginate_button.disabled {
    background: rgba(30, 41, 59, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: #64748b !important;
  }
}


/* ==========================================================================
   HASIL TES & LATIHAN CARD VIEW & TABLE VIEW UNIFIED STYLING
   ========================================================================== */
.table-responsive:not(.mode-card-view) .hasiltes-label {
  display: none !important;
}

/* Base Styles for Table View & Card View Elements */
.hasiltes-status-badge,
.hasiltes-kkm-badge {
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 3px 9px !important;
  border-radius: 6px !important;
  line-height: 1.3 !important;
  display: inline-block !important;
  white-space: nowrap !important;
  text-align: center !important;
}

.hasiltes-status-badge i,
.hasiltes-kkm-badge i,
.hasiltes-time-box i {
  display: none !important;
}

.hasiltes-time-box {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 11.5px !important;
  font-family: var(--font-mono, "SF Mono", Menlo, Consolas, monospace), inherit !important;
  background: rgba(241, 245, 249, 0.7) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: 6px !important;
  padding: 2px 8px !important;
  gap: 5px !important;
  white-space: nowrap !important;
}

.hasiltes-actions-td {
  vertical-align: middle !important;
  text-align: center !important;
}

.hasiltes-action-btns {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

.hasiltes-action-btns .btn,
.btn-action-buka,
.btn-action-hapus {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 25px !important;
  height: 25px !important;
  padding: 2px 9px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  line-height: 1 !important;
  transition: all 0.15s ease !important;
  text-decoration: none !important;
}

.hasiltes-action-btns .btn-primary,
.btn-action-buka {
  background: rgba(37, 99, 235, 0.1) !important;
  color: #2563eb !important;
  border: 1px solid rgba(37, 99, 235, 0.25) !important;
  box-shadow: none !important;
}
.hasiltes-action-btns .btn-primary:hover,
.btn-action-buka:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

.hasiltes-action-btns .btn-danger,
.btn-action-hapus {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  box-shadow: none !important;
}
.hasiltes-action-btns .btn-danger:hover,
.btn-action-hapus:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}

.hasiltes-uncorrected {
  font-size: 10px !important;
  font-weight: 600 !important;
  padding: 2px 7px !important;
  border-radius: 5px !important;
  background: rgba(245, 158, 11, 0.12) !important;
  color: #d97706 !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  display: block !important;
  width: fit-content !important;
  margin: 4px auto 0 auto !important;
}

/* Card View Layout (.mode-card-view) */
.table-responsive.is-hasiltes-table.mode-card-view {
  overflow-x: hidden !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.table-responsive.is-hasiltes-table.mode-card-view .dataTables_wrapper {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.table-responsive.is-hasiltes-table.mode-card-view table.dataTable,
.table-responsive.is-hasiltes-table.mode-card-view table.table {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  border: none !important;
  box-sizing: border-box !important;
}

.table-responsive.is-hasiltes-table.mode-card-view table.dataTable thead,
.table-responsive.is-hasiltes-table.mode-card-view table.table thead {
  display: none !important;
}

.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody,
.table-responsive.is-hasiltes-table.mode-card-view table.table tbody {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 4px 0 16px 0 !important;
}

@media (max-width: 640px) {
  .table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody,
  .table-responsive.is-hasiltes-table.mode-card-view table.table tbody {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody tr,
.table-responsive.is-hasiltes-table.mode-card-view table.table tbody tr {
  position: relative !important;
  display: block !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 14px 14px 12px 14px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.2s ease !important;
  margin-bottom: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody tr:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08) !important;
  border-color: #cbd5e1 !important;
}

.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td,
.table-responsive.is-hasiltes-table.mode-card-view table.table tbody td {
  border: none !important;
  padding: 0 !important;
  background: transparent !important;
}

/* Col 1: Nama Siswa (Full-width with reserved space for Belum Dikoreksi badge on top-right) */
.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:first-child {
  display: block !important;
  padding-right: 105px !important;
  margin-bottom: 6px !important;
  position: static !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:first-child a.cell-primary-title,
.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:first-child a {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.35 !important;
  text-decoration: none !important;
  display: block !important;
  white-space: normal !important;
  word-break: break-word !important;
}

.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:first-child a:hover {
  color: #2563eb !important;
}

/* Top-Right Badge: Belum Dikoreksi (Pinned cleanly to top right of the card) */
.table-responsive.is-hasiltes-table.mode-card-view .hasiltes-uncorrected {
  position: absolute !important;
  top: 13px !important;
  right: 13px !important;
  margin: 0 !important;
  z-index: 5 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  padding: 2.5px 8px !important;
  border-radius: 6px !important;
  background: rgba(245, 158, 11, 0.12) !important;
  color: #d97706 !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  display: inline-block !important;
  white-space: nowrap !important;
}

/* Col 2: NISN */
.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:nth-child(2) {
  display: inline-block !important;
  vertical-align: middle !important;
  font-size: 12px !important;
  color: #64748b !important;
  margin-right: 8px !important;
  margin-bottom: 8px !important;
  padding: 0 !important;
  width: auto !important;
}

/* Col 3: Kelas */
.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:nth-child(3) {
  display: inline-block !important;
  vertical-align: middle !important;
  margin-right: 6px !important;
  margin-bottom: 8px !important;
  width: auto !important;
}

.table-responsive.is-hasiltes-table.mode-card-view .hasiltes-kelas {
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  background: #e0f2fe !important;
  color: #0369a1 !important;
  display: inline-block !important;
}

/* Col 4: Status Tes */
.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:nth-child(4) {
  display: inline-block !important;
  vertical-align: middle !important;
  margin-bottom: 8px !important;
  width: auto !important;
}

/* Col 5: Mulai & Batas Waktu Box */
.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:nth-child(5) {
  display: block !important;
  margin-bottom: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.table-responsive.is-hasiltes-table.mode-card-view .hasiltes-time-box {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 5px 10px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Col 6: Benar */
.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:nth-child(6) {
  display: inline-block !important;
  vertical-align: middle !important;
  background: #f1f5f9 !important;
  padding: 3px 9px !important;
  border-radius: 6px !important;
  font-size: 11.5px !important;
  color: #334155 !important;
  margin-right: 6px !important;
  margin-top: 2px !important;
  margin-bottom: 4px !important;
}

/* Col 7: Nilai */
.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:nth-child(7) {
  display: inline-block !important;
  vertical-align: middle !important;
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  padding: 2px 10px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  margin-right: 6px !important;
  margin-top: 2px !important;
  margin-bottom: 4px !important;
}

/* Col 8: KKM */
.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:nth-child(8) {
  display: inline-block !important;
  vertical-align: middle !important;
  margin-right: 6px !important;
  margin-top: 2px !important;
  margin-bottom: 4px !important;
}

/* Col 9: Pelanggaran */
.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:nth-child(9) {
  display: inline-block !important;
  vertical-align: middle !important;
  margin-top: 2px !important;
  margin-bottom: 4px !important;
}

/* Col 10: Action Footer Bar at bottom of card */
.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td.hasiltes-actions-td,
.table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:last-child {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 10px !important;
  padding-top: 10px !important;
  border-top: 1px dashed #e2e8f0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.table-responsive.is-hasiltes-table.mode-card-view .hasiltes-action-btns {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin-left: auto !important;
  flex-wrap: nowrap !important;
}

.table-responsive.is-hasiltes-table.mode-card-view .hasiltes-action-btns .btn,
.table-responsive.is-hasiltes-table.mode-card-view .btn-action-buka,
.table-responsive.is-hasiltes-table.mode-card-view .btn-action-hapus,
.table-responsive.is-hasiltes-table.mode-card-view a.btn.btn-xs.btn-danger.btn-action-hapus,
.table-responsive.is-hasiltes-table.mode-card-view table td a.btn.btn-xs.btn-danger.confirm.btn-action-hapus {
  min-height: 28px !important;
  height: 28px !important;
  padding: 4px 14px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
  line-height: 1 !important;
}

.table-responsive.is-hasiltes-table.mode-card-view .btn-action-buka {
  background: rgba(37, 99, 235, 0.1) !important;
  color: #2563eb !important;
  border: 1px solid rgba(37, 99, 235, 0.25) !important;
  box-shadow: none !important;
}
.table-responsive.is-hasiltes-table.mode-card-view .btn-action-buka:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

.table-responsive.is-hasiltes-table.mode-card-view .btn-action-hapus,
.table-responsive.is-hasiltes-table.mode-card-view a.btn.btn-xs.btn-danger.btn-action-hapus,
.table-responsive.is-hasiltes-table.mode-card-view table td a.btn.btn-xs.btn-danger.confirm.btn-action-hapus {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  box-shadow: none !important;
}
.table-responsive.is-hasiltes-table.mode-card-view .btn-action-hapus:hover,
.table-responsive.is-hasiltes-table.mode-card-view a.btn.btn-xs.btn-danger.btn-action-hapus:hover,
.table-responsive.is-hasiltes-table.mode-card-view table td a.btn.btn-xs.btn-danger.confirm.btn-action-hapus:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}

.table-responsive.is-hasiltes-table.mode-card-view .btn-action-hapus::before,
.table-responsive.is-hasiltes-table.mode-card-view a.btn.btn-xs.btn-danger.btn-action-hapus::before,
.table-responsive.is-hasiltes-table.mode-card-view table td a.btn.btn-xs.btn-danger.confirm.btn-action-hapus::before {
  display: none !important;
  content: none !important;
}

/* Dark Mode for Hasil Tes Card View */
html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody tr,
html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view table.table tbody tr {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody tr:hover {
  border-color: #475569 !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
}

html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:first-child a.cell-primary-title,
html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:first-child a {
  color: #f1f5f9 !important;
}

html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view .hasiltes-uncorrected {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view .hasiltes-time-box {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #94a3b8 !important;
}

html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:nth-child(6) {
  background: #334155 !important;
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td.hasiltes-actions-td,
html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view table.dataTable tbody td:last-child {
  border-top-color: #334155 !important;
}

html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view .btn-action-buka {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}
html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view .btn-action-buka:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view .btn-action-hapus,
html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view a.btn.btn-xs.btn-danger.btn-action-hapus,
html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view table td a.btn.btn-xs.btn-danger.confirm.btn-action-hapus {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}
html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view .btn-action-hapus:hover,
html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view a.btn.btn-xs.btn-danger.btn-action-hapus:hover,
html[data-mode="dark"] .table-responsive.is-hasiltes-table.mode-card-view table td a.btn.btn-xs.btn-danger.confirm.btn-action-hapus:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}

/* ==========================================================================
   UNIVERSAL SOFT BADGES SYSTEM (ALL MODULES & TABLES)
   Consistent modern styling: subtle background, crisp text, 1px border, 6px radius
   ========================================================================== */
.badge-soft-success,
.badge-subtle-success,
table td .badge-success,
.table td .badge-success,
.table td span.badge-success {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #059669 !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

.badge-soft-danger,
.badge-subtle-danger,
table td .badge-danger,
.table td .badge-danger,
.table td span.badge-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

.badge-soft-warning,
.badge-subtle-warning,
table td .badge-warning,
.table td .badge-warning,
.table td span.badge-warning {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #d97706 !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

.badge-soft-info,
.badge-subtle-info,
table td .badge-info,
.table td .badge-info,
.table td span.badge-info {
  background: rgba(14, 165, 233, 0.12) !important;
  color: #0284c7 !important;
  border: 1px solid rgba(14, 165, 233, 0.25) !important;
}

.badge-soft-primary,
.badge-subtle-primary,
table td .badge-primary,
.table td .badge-primary,
.table td span.badge-primary,
.table td .badge-pelangi {
  background: rgba(37, 99, 235, 0.12) !important;
  color: #2563eb !important;
  border: 1px solid rgba(37, 99, 235, 0.25) !important;
}

.badge-soft-secondary,
.badge-subtle-secondary,
table td .badge-secondary,
.table td .badge-secondary,
.table td span.badge-secondary,
table td .badge-dark,
.table td .badge-dark,
.table td .badge-default {
  background: rgba(100, 116, 139, 0.12) !important;
  color: #64748b !important;
  border: 1px solid rgba(100, 116, 139, 0.2) !important;
}

/* Universal table badge sizing & geometry */
table td .badge,
.table td .badge {
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  line-height: 1.3 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  display: inline-block !important;
}

/* Suppress clutter icons inside table badges across all modules (preserves action badges like WhatsApp) */
table td .badge:not(.badge-whatsapp) i:not(.fa-whatsapp),
.table td .badge:not(.badge-whatsapp) i:not(.fa-whatsapp),
table td .badge:not(.badge-whatsapp) .fa:not(.fa-whatsapp),
.table td .badge:not(.badge-whatsapp) .fa:not(.fa-whatsapp),
table td .badge:not(.badge-whatsapp) .ti,
.table td .badge:not(.badge-whatsapp) .ti {
  display: none !important;
}

/* Dark Mode Universal Soft Badges */
html[data-mode="dark"] .badge-soft-success,
html[data-mode="dark"] .badge-subtle-success,
html[data-mode="dark"] table td .badge-success,
html[data-mode="dark"] .table td .badge-success,
html[data-mode="dark"] .table td span.badge-success {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

html[data-mode="dark"] .badge-soft-danger,
html[data-mode="dark"] .badge-subtle-danger,
html[data-mode="dark"] table td .badge-danger,
html[data-mode="dark"] .table td .badge-danger,
html[data-mode="dark"] .table td span.badge-danger {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

html[data-mode="dark"] .badge-soft-warning,
html[data-mode="dark"] .badge-subtle-warning,
html[data-mode="dark"] table td .badge-warning,
html[data-mode="dark"] .table td .badge-warning,
html[data-mode="dark"] .table td span.badge-warning {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}

html[data-mode="dark"] .badge-soft-info,
html[data-mode="dark"] .badge-subtle-info,
html[data-mode="dark"] table td .badge-info,
html[data-mode="dark"] .table td .badge-info,
html[data-mode="dark"] .table td span.badge-info {
  background: rgba(14, 165, 233, 0.18) !important;
  color: #38bdf8 !important;
  border-color: rgba(14, 165, 233, 0.35) !important;
}

html[data-mode="dark"] .badge-soft-primary,
html[data-mode="dark"] .badge-subtle-primary,
html[data-mode="dark"] table td .badge-primary,
html[data-mode="dark"] .table td .badge-primary,
html[data-mode="dark"] .table td span.badge-primary,
html[data-mode="dark"] .table td .badge-pelangi {
  background: rgba(59, 130, 246, 0.18) !important;
  color: #60a5fa !important;
  border-color: rgba(59, 130, 246, 0.35) !important;
}

html[data-mode="dark"] .badge-soft-secondary,
html[data-mode="dark"] .badge-subtle-secondary,
html[data-mode="dark"] table td .badge-secondary,
html[data-mode="dark"] .table td .badge-secondary,
html[data-mode="dark"] .table td span.badge-secondary,
html[data-mode="dark"] table td .badge-dark,
html[data-mode="dark"] .table td .badge-dark,
html[data-mode="dark"] table td .badge-default {
  background: rgba(148, 163, 184, 0.15) !important;
  color: #cbd5e1 !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
}

/* ==========================================================================
   SMOOTH SIDEBAR ACCORDION & ARROW TRANSITION
   ========================================================================== */
.sidebar .menu-link .arrow::before {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sidebar:not(.sidebar-folded) .menu-item.open > .menu-link .arrow::before,
.sidebar:not(.sidebar-folded) .menu-item.open > .menu-link .arrow,
.sidebar:not(.sidebar-folded) .menu-link.open .arrow::before,
.sidebar:not(.sidebar-folded) .menu-link.open .arrow {
  transform: rotate(90deg) !important;
}


/* ==========================================================================
   AUTHORITATIVE COMPACT SIDEBAR ICONS & SUBMENU DOTS
   ========================================================================== */
/* Main Menu Icons */
.sidebar .menu-link .icon,
.sidebar-navigation .menu-link .icon,
#app-sidebar .menu-link .icon,
.sidebar .sidebar-icons-boxed .menu-link .icon,
.sidebar-icons-boxed .menu-link .icon {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  max-width: 14px !important;
  font-size: 10.5px !important;
  line-height: 14px !important;
  margin-right: 9px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  transform: translateY(0.5px) !important;
}

.sidebar .menu-link .icon::before,
.sidebar-navigation .menu-link .icon::before,
#app-sidebar .menu-link .icon::before,
.sidebar .menu-link i,
.sidebar-navigation .menu-link i,
#app-sidebar .menu-link i,
.sidebar .menu-link .fa,
.sidebar .menu-link .ti,
.sidebar .menu-link [class*="fa-"],
.sidebar .menu-link [class*="ti-"] {
  font-size: 10.5px !important;
  line-height: 1 !important;
}

/* Submenu Dots */
.sidebar .menu-submenu .menu-link .dot,
.sidebar-navigation .menu-submenu .menu-link .dot,
#app-sidebar .menu-submenu .menu-link .dot,
.menu-submenu .menu-link .dot {
  width: 4px !important;
  height: 4px !important;
  min-width: 4px !important;
  max-width: 4px !important;
  border-radius: 50% !important;
  margin-right: 8px !important;
  margin-left: 2px !important;
  display: inline-block !important;
  box-shadow: none !important;
  transition: all 0.15s ease !important;
}

.sidebar .menu-submenu .menu-item.active > .menu-link .dot,
.sidebar-navigation .menu-submenu .menu-item.active > .menu-link .dot,
#app-sidebar .menu-submenu .menu-item.active > .menu-link .dot {
  width: 4.5px !important;
  height: 4.5px !important;
  min-width: 4.5px !important;
  max-width: 4.5px !important;
  transform: none !important;
  box-shadow: 0 0 3px rgba(2, 132, 199, 0.4) !important;
}

.sidebar .menu-submenu .menu-link:hover .dot {
  transform: scale(1.1) !important;
}

/* Menu Arrows */
.sidebar .menu-link .arrow,
.sidebar-navigation .menu-link .arrow,
#app-sidebar .menu-link .arrow {
  font-size: 9.5px !important;
  line-height: 1 !important;
  opacity: 0.65 !important;
}

.sidebar .menu-link .arrow::before,
.sidebar-navigation .menu-link .arrow::before,
#app-sidebar .menu-link .arrow::before {
  font-size: 9.5px !important;
}


/* =========================================================
   UNIVERSAL BATCH ACTIONS FOOTER (Desktop & Mobile - Semi Glassy)
   Menjamin jarak horizontal (padding kiri-kanan aman 16px di mobile, 20px di desktop)
   ========================================================= */
html:not([data-mode="dark"]) .batch-action-footer,
html:not([data-mode="dark"]) .card-footer.batch-action-footer,
html:not([data-mode="dark"]) .card > form > .row.m-10,
html:not([data-mode="dark"]) .card > .row.m-10,
html:not([data-mode="dark"]) form > .row.m-10 {
  display: block !important;
  padding: 16px 20px !important;
  margin: 0 !important;
  background-color: rgba(255, 255, 255, 0.60) !important;
  /* backdrop-filter optimized */
  border-top: 1px solid rgba(226, 232, 240, 0.70) !important;
  border-radius: 0 0 14px 14px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

html[data-mode="dark"] .batch-action-footer,
html[data-mode="dark"] .card-footer.batch-action-footer,
html[data-mode="dark"] .card > form > .row.m-10,
html[data-mode="dark"] .card > .row.m-10,
html[data-mode="dark"] form > .row.m-10 {
  background-color: #1e293b !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

.batch-action-footer .row,
.batch-action-footer .row.m-10,
.card > form > .row.m-10,
.card > .row.m-10,
form > .row.m-10 {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  gap: 12px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border: none !important;
  background: transparent !important;
}

.batch-action-footer [class*="col-"],
.card > form > .row.m-10 [class*="col-"],
form > .row.m-10 [class*="col-"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.batch-action-footer label,
.card > form > .row.m-10 label,
form > .row.m-10 label {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  margin-bottom: 6px !important;
  display: block !important;
  color: #ef4444 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.batch-action-footer select,
.card > form > .row.m-10 select,
form > .row.m-10 select {
  height: 38px !important;
  border-radius: 8px !important;
  border: 1.5px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #1e293b !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 6px 12px !important;
  min-width: 200px !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  line-height: normal !important;
}

html[data-mode="dark"] .batch-action-footer select,
html[data-mode="dark"] .card > form > .row.m-10 select,
html[data-mode="dark"] form > .row.m-10 select {
  background-color: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #f8fafc !important;
}

.batch-action-footer button,
.card > form > .row.m-10 button,
form > .row.m-10 button {
  height: 38px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 0 20px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

.batch-action-footer label[for="submit"],
.card > form > .row.m-10 label[for="submit"],
form > .row.m-10 label[for="submit"],
.batch-action-footer br,
.card > form > .row.m-10 br,
form > .row.m-10 br {
  display: none !important;
}

.batch-action-footer .mb-50,
.card > form > .row.m-10 .mb-50,
form > .row.m-10 .mb-50 {
  margin-bottom: 0 !important;
}

/* Mobile Responsive Optimization (<= 767px, iPhone 393px) */
@media (max-width: 767px) {
  .batch-action-footer,
  .card-footer.batch-action-footer,
  .card > form > .row.m-10,
  .card > .row.m-10,
  form > .row.m-10 {
    padding: 14px 16px 16px 16px !important; /* Presisi jarak 16px kiri dan kanan */
    box-sizing: border-box !important;
  }

  .batch-action-footer .row,
  .batch-action-footer .row.m-10,
  .card > form > .row.m-10,
  .card > .row.m-10,
  form > .row.m-10 {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
  }

  .batch-action-footer [class*="col-"],
  .card > form > .row.m-10 [class*="col-"],
  form > .row.m-10 [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .batch-action-footer select,
  .card > form > .row.m-10 select,
  form > .row.m-10 select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .batch-action-footer button,
  .card > form > .row.m-10 button,
  form > .row.m-10 button {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 2px !important;
    box-sizing: border-box !important;
  }
}

/* ==========================================================================
   PATEN RESPONSIVE FILTER & HEADER ACTIONS (NO CLIPPING / TRUNCATION)
   ========================================================================== */
.module-header-banner {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.module-header-actions {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  max-width: 100% !important;
  flex-shrink: 0 !important;
}

.module-header-actions .btn,
.module-header-actions .btn-primary,
.module-header-actions .btn-action-primary,
.module-header-actions a.btn-primary,
.module-header-actions .table-view-switcher {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.module-filter-card {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.module-filter-card form.row {
  margin-left: -6px !important;
  margin-right: -6px !important;
}

.module-filter-card form.row > [class*="col-"] {
  padding-left: 6px !important;
  padding-right: 6px !important;
}

.module-filter-card #btnBukaData,
.module-filter-card #btnBukaDataGuru,
.module-filter-card button[type="submit"] {
  white-space: nowrap !important;
  min-width: 90px !important;
  width: 100% !important;
  height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 0 14px !important;
  box-sizing: border-box !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
}

.module-filter-card #btnBukaData i,
.module-filter-card #btnBukaDataGuru i,
.module-filter-card button[type="submit"] i {
  margin-right: 6px !important;
  font-size: 13px !important;
  flex-shrink: 0 !important;
}

@media (max-width: 991.98px) {
  .module-header-banner {
    padding: 16px 18px !important;
    gap: 12px !important;
  }
  .module-header-left {
    min-width: 0 !important;
  }
  .module-header-actions {
    width: 100% !important;
    justify-content: flex-start !important;
  }
}

@media (max-width: 767.98px) {
  .module-header-banner {
    padding: 14px 16px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .module-header-left {
    width: 100% !important;
  }
  .module-header-actions {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
  }
  .module-header-actions .table-view-switcher {
    flex: 1 !important;
  }
  .module-header-actions .btn,
  .module-header-actions a.btn-primary {
    flex: 1 !important;
    justify-content: center !important;
  }
  .module-filter-card {
    padding: 14px 14px 8px !important;
  }
}


/* ==========================================================================
   MOBILE SIDEBAR SINGLE-TAP FIX (v39.7)
   iOS Safari needs 2 taps when :hover changes transform/opacity.
   Neutralize hover motion on touch devices & remove tap delay.
   ========================================================================== */
.sidebar .menu-link,
.sidebar .menu-submenu .menu-link,
.sidebar-navigation a {
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

@media (hover: none), (pointer: coarse) {
  .sidebar .menu-link:hover,
  .sidebar-navigation .menu-link:hover,
  .sidebar:not(.sidebar-folded) .menu-link:hover,
  .sidebar-navigation:not(.sidebar-folded) .menu-link:hover,
  .sidebar .menu-submenu .menu-link:hover,
  body.sidebar-folded .sidebar .menu-link:hover,
  .sidebar .menu-link:hover .icon,
  .sidebar .menu-link:hover i,
  .sidebar .menu-submenu .menu-link:hover .dot {
    transform: none !important;
    transition: none !important;
  }
  .sidebar .menu-link .arrow,
  .sidebar .menu-link:hover .arrow {
    opacity: 1 !important;
    transition: none !important;
  }
}


/* ==========================================================================
   ERGONOMIC BOTTOM SPACING & MOBILE BACK BUTTON (v40.2)
   Feedback: Teguh GM (Jarak bawah terlalu tinggi & Back button mobile)
   ========================================================================== */
.topbar-back-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 26px !important;
  min-width: 26px !important;
  height: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  background: transparent;
  border: none;
}
@media (min-width: 992px) {
  .topbar-back-btn {
    display: none !important;
  }
}

/* Eliminate excessive bottom spacing across all viewport levels */
body,
.main-container,
main,
#app-main {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

@media (max-width: 991px) {
  .main-content {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    margin-bottom: 0 !important;
  }
}

@media (min-width: 992px) {
  .main-content {
    padding-bottom: 18px !important;
    margin-bottom: 0 !important;
  }
}


/* Forum Diskusi Academic Header Responsive Layout */
.diskusi-header-bar {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

.diskusi-header-tabs-wrapper {
  width: 100% !important;
}

.diskusi-header-tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  width: auto !important;
  max-width: 100% !important;
  gap: 6px !important;
}

@media (max-width: 639px) {
  .diskusi-header-tabs-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .diskusi-header-tabs {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
  }
}

@media (min-width: 992px) {
  .diskusi-header-bar {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .diskusi-header-tabs-wrapper {
    width: auto !important;
    flex-shrink: 0 !important;
    overflow-x: visible !important;
  }
  .diskusi-header-tabs {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    width: auto !important;
  }
}

/* Mobile Nav Group: Arrow & Hamburger Closer Together */
@media (max-width: 768px) {
  .topbar-back-btn {
    width: 28px !important;
    min-width: 28px !important;
    height: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .topbar-btn.sidebar-toggler {
    width: 28px !important;
    min-width: 28px !important;
    height: 32px !important;
    padding: 0 !important;
    margin: 0 4px 0 0 !important;
  }
}


/* ==========================================================================
   MASTER UNIVERSAL DARK MODE PERFECTION (v=42.0)
   Comprehensive Dark Theme Styling Across ALL Application Modules
   ========================================================================== */

/* 1. Theme Picker & Topbar Components */
html[data-mode="dark"] .theme-picker-menu {
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.75) !important;
  color: #f8fafc !important;
}
html[data-mode="dark"] .theme-picker-label {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .theme-picker-sublabel {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .theme-picker-divider {
  border-color: rgba(255, 255, 255, 0.09) !important;
}
html[data-mode="dark"] .theme-mode-segmented {
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
html[data-mode="dark"] .theme-mode-btn {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .theme-mode-btn:hover {
  color: #f8fafc !important;
}
html[data-mode="dark"] .theme-mode-btn.active {
  background: rgba(15, 23, 42, 0.95) !important;
  color: #f8fafc !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}
html[data-mode="dark"] #fontSizeControlGroup .theme-mode-btn {
  color: #94a3b8 !important;
}
html[data-mode="dark"] #fontSizeControlGroup .theme-mode-btn.active {
  background: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .theme-fullscreen-btn,
html[data-mode="dark"] #btnThemeFullscreen {
  background: rgba(30, 41, 59, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #f1f5f9 !important;
}
html[data-mode="dark"] .theme-fullscreen-btn i,
html[data-mode="dark"] #btnThemeFullscreen i {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .theme-swatch-card {
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.10) !important;
}
html[data-mode="dark"] .theme-swatch-card:hover {
  background: rgba(30, 41, 59, 0.98) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45) !important;
}
html[data-mode="dark"] .theme-swatch-card.active {
  background: rgba(30, 41, 59, 0.98) !important;
  border-color: var(--t-primary, #3b82f6) !important;
  box-shadow: 0 6px 20px var(--t-primary-soft, rgba(59, 130, 246, 0.3)) !important;
}
html[data-mode="dark"] .theme-swatch-name {
  color: #f8fafc !important;
}
html[data-mode="dark"] .theme-swatch-desc {
  color: #94a3b8 !important;
}

/* 2. Universal File Upload & Dropify in Dark Mode */
html[data-mode="dark"] .dropify-wrapper {
  background-color: rgba(15, 23, 42, 0.75) !important;
  border: 2px dashed rgba(255, 255, 255, 0.18) !important;
  color: #cbd5e1 !important;
  border-radius: 14px !important;
}
html[data-mode="dark"] .dropify-wrapper:hover {
  background-color: rgba(15, 23, 42, 0.9) !important;
  border-color: var(--t-primary, #3b82f6) !important;
}
html[data-mode="dark"] .dropify-wrapper .dropify-preview {
  background-color: rgba(15, 23, 42, 0.95) !important;
}
html[data-mode="dark"] .dropify-wrapper .dropify-message p {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .dropify-wrapper .dropify-message .dropify-error {
  color: #f87171 !important;
}
html[data-mode="dark"] .dropify-wrapper .dropify-clear {
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  background: rgba(30, 41, 59, 0.8) !important;
}
html[data-mode="dark"] .dropify-wrapper .dropify-clear:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .dropify-wrapper .dropify-infos {
  background: rgba(15, 23, 42, 0.88) !important;
}
html[data-mode="dark"] .dropify-wrapper .dropify-infos .dropify-infos-inner p {
  color: #cbd5e1 !important;
}

/* 3. Universal Modals & Overlays */
html[data-mode="dark"] .modal-content {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 18px !important;
  color: #f1f5f9 !important;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.65) !important;
}
html[data-mode="dark"] .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: transparent !important;
  color: #f8fafc !important;
}
html[data-mode="dark"] .modal-header .modal-title,
html[data-mode="dark"] .modal-title {
  color: #f8fafc !important;
  font-weight: 700 !important;
}
html[data-mode="dark"] .modal-header .close,
html[data-mode="dark"] .close {
  color: #94a3b8 !important;
  text-shadow: none !important;
  opacity: 0.8 !important;
}
html[data-mode="dark"] .modal-header .close:hover,
html[data-mode="dark"] .close:hover {
  color: #ffffff !important;
  opacity: 1 !important;
}
html[data-mode="dark"] .modal-body {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: transparent !important;
}
html[data-mode="dark"] .modal-backdrop.show {
  opacity: 0.72 !important;
}

/* 4. Custom Controls, Radios & Checkboxes */
html[data-mode="dark"] .custom-control-label {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .custom-control-description {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .custom-control-indicator,
html[data-mode="dark"] .custom-control-label::before {
  background-color: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
}
html[data-mode="dark"] .custom-control-input:checked ~ .custom-control-indicator,
html[data-mode="dark"] .custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--t-primary, #2563eb) !important;
  border-color: var(--t-primary, #2563eb) !important;
}
html[data-mode="dark"] .custom-control-input:focus ~ .custom-control-indicator,
html[data-mode="dark"] .custom-control-input:focus ~ .custom-control-label::before {
  box-shadow: 0 0 0 3px var(--t-primary-soft, rgba(37, 99, 235, 0.25)) !important;
}

/* 5. Universal Cards & Data Containers */
html[data-mode="dark"] .card,
html[data-mode="dark"] .module-data-card,
html[data-mode="dark"] .module-filter-card {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
}
html[data-mode="dark"] .card-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}
html[data-mode="dark"] .card-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .card-title {
  color: #f8fafc !important;
}
html[data-mode="dark"] .card-subtitle {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .text-muted {
  color: #94a3b8 !important;
}

/* 6. Universal Form Inputs */
html[data-mode="dark"] .form-control,
html[data-mode="dark"] input[type="text"],
html[data-mode="dark"] input[type="time"],
html[data-mode="dark"] input[type="date"],
html[data-mode="dark"] input[type="password"],
html[data-mode="dark"] input[type="number"],
html[data-mode="dark"] input[type="search"],
html[data-mode="dark"] input[type="email"],
html[data-mode="dark"] textarea.form-control,
html[data-mode="dark"] select.form-control,
html[data-mode="dark"] .custom-select {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #f8fafc !important;
}
html[data-mode="dark"] .form-control:focus,
html[data-mode="dark"] input:focus,
html[data-mode="dark"] textarea:focus,
html[data-mode="dark"] select:focus {
  background: rgba(15, 23, 42, 0.95) !important;
  border-color: var(--t-primary, #3b82f6) !important;
  box-shadow: 0 0 0 3px var(--t-primary-soft, rgba(59, 130, 246, 0.25)) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] select.form-control option {
  background: #0f172a !important;
  color: #f8fafc !important;
}
html[data-mode="dark"] .form-control-label,
html[data-mode="dark"] label.col-form-label,
html[data-mode="dark"] label {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] input[type="time"]::-webkit-calendar-picker-indicator,
html[data-mode="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8) !important;
  cursor: pointer;
}

/* 7. Universal Tables & DataTables */
html[data-mode="dark"] table.table,
html[data-mode="dark"] table.dataTable,
html[data-mode="dark"] .table-responsive > table {
  color: #e2e8f0 !important;
}
html[data-mode="dark"] table.table thead th,
html[data-mode="dark"] table.dataTable thead th,
html[data-mode="dark"] .table th {
  background: rgba(30, 41, 59, 0.95) !important;
  color: #cbd5e1 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-top: none !important;
  font-weight: 700 !important;
}
html[data-mode="dark"] table.table tbody tr,
html[data-mode="dark"] table.dataTable tbody tr,
html[data-mode="dark"] .table tbody tr {
  background: rgba(15, 23, 42, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: #e2e8f0 !important;
}
html[data-mode="dark"] table.table tbody tr:hover,
html[data-mode="dark"] table.dataTable tbody tr:hover,
html[data-mode="dark"] .table tbody tr:hover {
  background: rgba(30, 41, 59, 0.75) !important;
}
html[data-mode="dark"] table.table tbody td,
html[data-mode="dark"] table.dataTable tbody td,
html[data-mode="dark"] .table td {
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: #e2e8f0 !important;
}
html[data-mode="dark"] .dataTables_info {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .dataTables_length label,
html[data-mode="dark"] .dataTables_filter label {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .dataTables_paginate .paginate_button {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .dataTables_paginate .paginate_button:hover {
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .dataTables_paginate .paginate_button.current,
html[data-mode="dark"] .dataTables_paginate .paginate_button.current:hover {
  background: var(--t-primary, #2563eb) !important;
  border-color: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--t-primary-soft, rgba(37, 99, 235, 0.3)) !important;
}
html[data-mode="dark"] .dataTables_paginate .paginate_button.disabled,
html[data-mode="dark"] .dataTables_paginate .paginate_button.disabled:hover {
  background: rgba(15, 23, 42, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  color: #475569 !important;
}

/* 8. Tailwind Glass Utility Classes in Dark Mode */
html[data-mode="dark"] .bg-white\/80,
html[data-mode="dark"] .bg-white\/90,
html[data-mode="dark"] .bg-white {
  background-color: rgba(30, 41, 59, 0.8) !important;
}
html[data-mode="dark"] .bg-slate-50\/80,
html[data-mode="dark"] .bg-slate-50,
html[data-mode="dark"] .bg-slate-100 {
  background-color: rgba(15, 23, 42, 0.7) !important;
}
html[data-mode="dark"] .border-slate-200\/80,
html[data-mode="dark"] .border-slate-200\/60,
html[data-mode="dark"] .border-slate-200,
html[data-mode="dark"] .border-slate-100 {
  border-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .text-slate-900,
html[data-mode="dark"] .text-slate-800 {
  color: #f8fafc !important;
}
html[data-mode="dark"] .text-slate-700,
html[data-mode="dark"] .text-slate-600 {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .text-slate-500,
html[data-mode="dark"] .text-slate-400 {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .hover\:bg-slate-50:hover,
html[data-mode="dark"] .hover\:bg-slate-100:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .hover\:text-slate-900:hover {
  color: #ffffff !important;
}

/* 9. Forum & Discussion Dark Mode Refinement */
html[data-mode="dark"] .diskusi-composer-card {
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
}
html[data-mode="dark"] .diskusi-composer-textarea {
  background: rgba(15, 23, 42, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}
html[data-mode="dark"] .diskusi-composer-textarea::placeholder {
  color: #64748b !important;
}
html[data-mode="dark"] .diskusi-post-card,
html[data-mode="dark"] article.diskusi-post-card {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f1f5f9 !important;
}

/* 10. Card Mode Across Siswa, Guru, Akses Waktu, Materi */
html[data-mode="dark"] .siswa-card,
html[data-mode="dark"] .guru-card,
html[data-mode="dark"] .akseswaktu-card,
html[data-mode="dark"] .materi-card,
html[data-mode="dark"] .lbsoal-card,
html[data-mode="dark"] .edlink-session-card {
  background: rgba(30, 41, 59, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3) !important;
}
html[data-mode="dark"] .siswa-card:hover,
html[data-mode="dark"] .guru-card:hover,
html[data-mode="dark"] .akseswaktu-card:hover,
html[data-mode="dark"] .materi-card:hover,
html[data-mode="dark"] .lbsoal-card:hover {
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45) !important;
}

/* 11. Select2 Dropdowns in Dark Mode */
html[data-mode="dark"] .select2-container--default .select2-selection--single {
  background-color: rgba(15, 23, 42, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}
html[data-mode="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #f8fafc !important;
}
html[data-mode="dark"] .select2-dropdown {
  background-color: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}
html[data-mode="dark"] .select2-results__option {
  background-color: #0f172a !important;
  color: #e2e8f0 !important;
}
html[data-mode="dark"] .select2-results__option--highlighted[aria-selected] {
  background-color: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .select2-search--dropdown .select2-search__field {
  background-color: rgba(30, 41, 59, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #f8fafc !important;
}

/* 12. Badges & Alerts in Dark Mode */
html[data-mode="dark"] .badge-light,
html[data-mode="dark"] .badge-secondary,
html[data-mode="dark"] .badge-default {
  background-color: rgba(51, 65, 85, 0.7) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
html[data-mode="dark"] .alert-info {
  background-color: rgba(14, 116, 144, 0.25) !important;
  border-color: rgba(6, 182, 212, 0.3) !important;
  color: #bae6fd !important;
}
html[data-mode="dark"] .alert-success {
  background-color: rgba(5, 150, 105, 0.25) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: #a7f3d0 !important;
}
html[data-mode="dark"] .alert-warning {
  background-color: rgba(217, 119, 6, 0.25) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: #fde68a !important;
}
html[data-mode="dark"] .alert-danger {
  background-color: rgba(220, 38, 38, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #fecaca !important;
}

/* 13. Dropdowns & Navigation in Dark Mode */
html[data-mode="dark"] .dropdown-menu {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6) !important;
}
html[data-mode="dark"] .dropdown-item {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .dropdown-item:hover,
html[data-mode="dark"] .dropdown-item:focus {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .dropdown-divider {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* 14. Switches & Toggles */
html[data-mode="dark"] .switch-indicator {
  background-color: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
html[data-mode="dark"] input:checked + .switch-indicator {
  background-color: var(--t-primary, #10b981) !important;
  border-color: var(--t-primary, #10b981) !important;
}

/* 15. Scrollbars in Dark Mode */
html[data-mode="dark"] ::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.8) !important;
}
html[data-mode="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 6px;
}
html[data-mode="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32) !important;
}


/* ==========================================================================
   MASTER DARK MODE POSITION & COLOR CONSISTENCY (v43.0)
   Pixel-Perfect Layout Alignment & Harmonic Palette Across All Modules
   ========================================================================== */

/* A. Topbar Dropdown Caret / Triangle in Dark Mode */
html[data-mode="dark"] .topbar .dropdown-menu::before,
html[data-mode="dark"] .topbar .dropdown-grid::before {
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}
html[data-mode="dark"] .topbar .dropdown-menu::after,
html[data-mode="dark"] .topbar .dropdown-grid::after {
  border-bottom-color: rgba(15, 23, 42, 0.96) !important;
}

@media (max-width: 768px) {
  .topbar .dropdown-menu::before,
  .topbar .dropdown-menu::after,
  .topbar .dropdown-grid::before,
  .topbar .dropdown-grid::after {
    display: none !important;
  }
}

/* B. Topbar Action Buttons Consistency */
html[data-mode="dark"] .topbar-glass-btn,
html[data-mode="dark"] .topbar .topbar-btn {
  background: rgba(30, 41, 59, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .topbar-glass-btn:hover,
html[data-mode="dark"] .topbar .topbar-btn:hover {
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}

/* C. View Switcher (Kartu vs Tabel) Dark Mode Alignment */
html[data-mode="dark"] .table-view-switcher {
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 10px !important;
  padding: 3px !important;
}
html[data-mode="dark"] .table-view-switcher .btn-table-mode {
  background: transparent !important;
  color: #94a3b8 !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  padding: 6px 13px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  transition: all 0.15s ease !important;
}
html[data-mode="dark"] .table-view-switcher .btn-table-mode:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.06) !important;
}
html[data-mode="dark"] .table-view-switcher .btn-table-mode.active {
  background: #1e293b !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35) !important;
  font-weight: 700 !important;
}
html[data-mode="dark"] .table-view-switcher .btn-table-mode.active i {
  color: #38bdf8 !important;
}

/* D. Semantic Status Pills in Dark Mode */
html[data-mode="dark"] .status-pill-badge {
  text-decoration: none !important;
}
html[data-mode="dark"] .status-pill-active {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
}
html[data-mode="dark"] .status-pill-active:hover {
  background: rgba(16, 185, 129, 0.32) !important;
  color: #6ee7b7 !important;
}
html[data-mode="dark"] .status-pill-inactive {
  background: rgba(100, 116, 139, 0.2) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
}
html[data-mode="dark"] .status-pill-inactive:hover {
  background: rgba(100, 116, 139, 0.32) !important;
  color: #e2e8f0 !important;
}
html[data-mode="dark"] .status-pill-warning {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

/* E. Typography & Helper Text Classes in Dark Mode */
html[data-mode="dark"] .text-dark {
  color: #f8fafc !important;
}
html[data-mode="dark"] .text-secondary {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .text-muted {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .text-lighter {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .font-weight-bold.text-dark {
  color: #f8fafc !important;
}

/* F. Border Utilities in Dark Mode */
html[data-mode="dark"] .border-bottom,
html[data-mode="dark"] .border-top,
html[data-mode="dark"] .border-left,
html[data-mode="dark"] .border-right,
html[data-mode="dark"] .border {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* G. Soft Translucent Badge Boxes in Dark Mode */
html[data-mode="dark"] .bg-amber-50 {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
}
html[data-mode="dark"] .bg-blue-50 {
  background: rgba(59, 130, 246, 0.18) !important;
  color: #60a5fa !important;
}
html[data-mode="dark"] .bg-emerald-50,
html[data-mode="dark"] .bg-green-50 {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
}
html[data-mode="dark"] .bg-rose-50,
html[data-mode="dark"] .bg-red-50 {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #f87171 !important;
}
html[data-mode="dark"] .bg-purple-50 {
  background: rgba(168, 85, 247, 0.18) !important;
  color: #c084fc !important;
}
html[data-mode="dark"] .bg-sky-50,
html[data-mode="dark"] .bg-cyan-50 {
  background: rgba(14, 165, 233, 0.18) !important;
  color: #38bdf8 !important;
}

/* H. Table Hover & Row Action Precision */
html[data-mode="dark"] table.dataTable tbody tr:hover,
html[data-mode="dark"] .table-hover tbody tr:hover,
html[data-mode="dark"] table.dataTable tbody tr:hover td,
html[data-mode="dark"] .table-hover tbody tr:hover td {
  background-color: rgba(30, 41, 59, 0.85) !important;
}
html[data-mode="dark"] td .dropdown a.text-lighter:hover,
html[data-mode="dark"] .btn-table-action:hover {
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #38bdf8 !important;
}

/* I. Theme Modal Fullscreen & Swatch Neat Grid */
html[data-mode="dark"] .theme-fullscreen-btn {
  background: rgba(30, 41, 59, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 6px 14px !important;
  border-radius: 9px !important;
}
html[data-mode="dark"] .theme-fullscreen-btn:hover {
  background: rgba(30, 41, 59, 0.98) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .theme-fullscreen-btn.active {
  background: var(--t-primary, #2563eb) !important;
  border-color: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--t-primary-soft, rgba(37, 99, 235, 0.35)) !important;
}

/* J. Days Checkboxes in Dark Mode */
html[data-mode="dark"] .custom-checkbox .custom-control-description {
  color: #cbd5e1 !important;
  font-weight: 600 !important;
}
html[data-mode="dark"] .custom-checkbox .custom-control-indicator {
  background-color: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
}
html[data-mode="dark"] .custom-control-input:checked ~ .custom-control-indicator {
  background-color: var(--t-primary, #2563eb) !important;
  border-color: var(--t-primary, #2563eb) !important;
}

/* ==========================================================================
   PERFORMANCE & 60FPS RENDERING BOOST
   ========================================================================== */
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure smooth GPU scrolling on touch devices */
.main-content, .content-wrapper, .dashboard-container {
  -webkit-overflow-scrolling: touch;
}

/* Guarantee 60fps on mobile by turning off heavy compositor filters */
@media (max-width: 768px) {
  .card, 
  .quick-action-card, 
  .diskusi-post-card, 
  .module-header-banner, 
  .module-filter-card, 
  .grid > a.bg-white,
  .materi-detail-card,
  .materi-detail-hero {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* ==========================================================================
   INPUT GROUP UNIFIED STYLING & BORDER-RADIUS FIX
   ========================================================================== */
.input-group,
.card-body .input-group {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  position: relative !important;
  width: 100% !important;
}

/* 1. All form controls inside input-group (High specificity override) */
.input-group > .form-control,
.card-body .input-group > .form-control,
.card-body .input-group > input.form-control,
.card-body .input-group > select.form-control,
.card-body .input-group > textarea.form-control {
  position: relative !important;
  flex: 1 1 auto !important;
  width: 1% !important;
  min-width: 0 !important;
  margin-bottom: 0 !important;
  height: 38px !important;
  padding: 8px 12px !important;
  font-size: 13.5px !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

/* 2. Form control as FIRST child (followed by addon/button) */
.input-group > .form-control:not(:last-child),
.card-body .input-group > .form-control:not(:last-child),
.input-group > input.form-control:not(:last-child),
.card-body .input-group > input.form-control:not(:last-child),
.input-group > select.form-control:not(:last-child),
.card-body .input-group > select.form-control:not(:last-child) {
  border-top-left-radius: 8px !important;
  border-bottom-left-radius: 8px !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-right: 0 !important;
}

/* 3. Form control as LAST child (preceded by addon/button) */
.input-group > .form-control:not(:first-child),
.card-body .input-group > .form-control:not(:first-child),
.input-group > input.form-control:not(:first-child),
.card-body .input-group > input.form-control:not(:first-child),
.input-group > select.form-control:not(:first-child),
.card-body .input-group > select.form-control:not(:first-child) {
  border-top-right-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-left: 0 !important;
}

/* 4. Form control in MIDDLE (between addons) */
.input-group > .form-control:not(:first-child):not(:last-child),
.card-body .input-group > .form-control:not(:first-child):not(:last-child),
.card-body .input-group > input.form-control:not(:first-child):not(:last-child) {
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
}

/* 5. Focus state for form control in input-group */
.input-group > .form-control:focus,
.card-body .input-group > input.form-control:focus,
.card-body .input-group > .form-control:focus {
  border-color: #3b82f6 !important;
  border-right: 1px solid #3b82f6 !important;
  z-index: 3 !important;
  margin-right: -1px !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15) !important;
}

/* 6. Input Group Addon general styling */
.input-group > .input-group-addon,
.card-body .input-group > .input-group-addon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 14px !important;
  height: 38px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  background-color: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* 7. Input Group Addon as LAST child (after input) */
.input-group > .input-group-addon:last-child,
.input-group > .input-group-addon:not(:first-child),
.card-body .input-group > .input-group-addon:last-child,
.card-body .input-group > .input-group-addon:not(:first-child) {
  border-top-right-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-left: 1px solid #cbd5e1 !important;
}

/* 8. Input Group Addon as FIRST child (before input) */
.input-group > .input-group-addon:first-child,
.input-group > .input-group-addon:not(:last-child),
.card-body .input-group > .input-group-addon:first-child,
.card-body .input-group > .input-group-addon:not(:last-child) {
  border-top-left-radius: 8px !important;
  border-bottom-left-radius: 8px !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-right: 1px solid #cbd5e1 !important;
}

/* 9. Input Group Buttons (.input-group-btn) */
.input-group > .input-group-btn,
.card-body .input-group > .input-group-btn {
  display: flex !important;
  align-items: stretch !important;
  flex-shrink: 0 !important;
}
.input-group > .input-group-btn:last-child > .btn,
.card-body .input-group > .input-group-btn:last-child > .btn {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
}
.input-group > .input-group-btn:first-child > .btn,
.card-body .input-group > .input-group-btn:first-child > .btn {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-top-left-radius: 8px !important;
  border-bottom-left-radius: 8px !important;
}

/* 10. Dark Mode Support */
html[data-mode="dark"] .input-group > .form-control,
html[data-mode="dark"] .card-body .input-group > input.form-control,
html[data-mode="dark"] .card-body .input-group > .form-control {
  background-color: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #f1f5f9 !important;
}
html[data-mode="dark"] .input-group > .input-group-addon,
html[data-mode="dark"] .card-body .input-group > .input-group-addon {
  background-color: #334155 !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #94a3b8 !important;
}
html[data-mode="dark"] .input-group > .form-control:focus,
html[data-mode="dark"] .card-body .input-group > input.form-control:focus {
  border-color: #60a5fa !important;
  border-right-color: #60a5fa !important;
}

/* Modern Divider & Form Spacing in Setting */
.module-data-card .form-group.row {
  margin-bottom: 1.25rem !important;
}

.module-data-card .form-group.row .col-form-label {
  font-weight: 600 !important;
  font-size: 13px !important;
  color: #334155 !important;
  padding-top: 8px !important;
}

html[data-mode="dark"] .module-data-card .form-group.row .col-form-label {
  color: #cbd5e1 !important;
}

.module-data-card .divider {
  display: flex !important;
  align-items: center !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  margin: 32px 0 22px 0 !important;
}

.module-data-card .divider::before,
.module-data-card .divider::after {
  content: "" !important;
  flex: 1 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.module-data-card .divider::before {
  margin-right: 14px !important;
}

.module-data-card .divider::after {
  margin-left: 14px !important;
}

html[data-mode="dark"] .module-data-card .divider::before,
html[data-mode="dark"] .module-data-card .divider::after {
  border-bottom-color: rgba(255, 255, 255, 0.10) !important;
}

html[data-mode="dark"] .module-data-card .divider {
  color: #94a3b8 !important;
}

/* ==========================================================================
   SIDEBAR DYNAMIC FONT & DENSITY SCALING (Synchronized with Theme Picker)
   ========================================================================== */
:root {
  --sb-scale: calc(var(--app-scale, 0.9) / 0.9);
}

/* Category header */
#app-sidebar .sidebar-navigation ul.menu > .menu-category,
.sidebar .menu-category,
.sidebar-navigation .menu-category {
  font-size: calc(9.5px * var(--sb-scale, 1)) !important;
  padding-top: calc(8px * var(--sb-scale, 1)) !important;
  padding-bottom: calc(2px * var(--sb-scale, 1)) !important;
}

/* Menu items & links */
.sidebar .sidebar-navigation .menu-link,
.sidebar:not(.sidebar-folded) .menu-link,
#app-sidebar:not(.sidebar-folded) .menu-link,
#app-sidebar .menu-link,
.sidebar .menu-link,
.sidebar-navigation .menu-link {
  font-size: calc(12.5px * var(--sb-scale, 1)) !important;
  padding-top: calc(5px * var(--sb-scale, 1)) !important;
  padding-bottom: calc(5px * var(--sb-scale, 1)) !important;
  min-height: calc(32px * var(--sb-scale, 1)) !important;
}

.sidebar .menu-link .title,
.sidebar-navigation .menu-link .title,
#app-sidebar .menu-link .title,
#app-sidebar:not(.sidebar-folded) .menu-link .title {
  font-size: calc(12.5px * var(--sb-scale, 1)) !important;
}

.sidebar .menu-link .icon,
.sidebar-navigation .menu-link .icon,
#app-sidebar .menu-link .icon,
.sidebar .sidebar-icons-boxed .menu-link .icon,
.sidebar-icons-boxed .menu-link .icon,
.sidebar .menu-link i,
.sidebar .menu-link .fa,
.sidebar .menu-link .icon::before,
.sidebar-navigation .menu-link .icon::before,
#app-sidebar .menu-link .icon::before,
.sidebar .menu-link i::before,
.sidebar-navigation .menu-link i::before,
#app-sidebar .menu-link i::before,
.sidebar .menu-link .fa::before,
.sidebar .menu-link [class*="fa-"]::before {
  font-size: calc(10.5px * var(--sb-scale, 1)) !important;
}
.sidebar .menu-link .icon,
.sidebar-navigation .menu-link .icon,
#app-sidebar .menu-link .icon,
.sidebar .sidebar-icons-boxed .menu-link .icon,
.sidebar-icons-boxed .menu-link .icon {
  width: calc(14px * var(--sb-scale, 1)) !important;
  height: calc(14px * var(--sb-scale, 1)) !important;
  min-width: calc(14px * var(--sb-scale, 1)) !important;
  max-width: calc(14px * var(--sb-scale, 1)) !important;
  line-height: calc(14px * var(--sb-scale, 1)) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: translateY(0.5px) !important;
}

body.sidebar-folded .sidebar .menu-link .icon,
body.sidebar-folded .sidebar-navigation .menu-link .icon,
body.sidebar-folded #app-sidebar .menu-link .icon,
body.sidebar-folded .menu-link .icon {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  font-size: 15px !important;
  line-height: 44px !important;
  margin: 0 auto !important;
  transform: none !important;
}
body.sidebar-folded .menu-link .icon::before,
body.sidebar-folded .menu-link i::before,
body.sidebar-folded .menu-link .fa::before {
  font-size: 15px !important;
  line-height: 1 !important;
}

/* Submenu items */
.sidebar .menu-submenu .menu-link,
.sidebar-navigation .menu-submenu .menu-link,
#app-sidebar .menu-submenu .menu-link {
  font-size: calc(11.5px * var(--sb-scale, 1)) !important;
  padding-top: calc(4px * var(--sb-scale, 1)) !important;
  padding-bottom: calc(4px * var(--sb-scale, 1)) !important;
  min-height: calc(28px * var(--sb-scale, 1)) !important;
}

.sidebar .menu-submenu .menu-link .title,
.sidebar-navigation .menu-submenu .menu-link .title,
#app-sidebar .menu-submenu .menu-link .title {
  font-size: calc(11.5px * var(--sb-scale, 1)) !important;
}

/* Sidebar Period Card */
.sidebar-period-card label,
#app-sidebar .sidebar-period-card label {
  font-size: calc(10px * var(--sb-scale, 1)) !important;
}

.sidebar-period-card select,
#app-sidebar .sidebar-period-card select {
  font-size: calc(11.5px * var(--sb-scale, 1)) !important;
  height: calc(30px * var(--sb-scale, 1)) !important;
}

/* Sidebar Profile Card */
.sidebar-profile-card h6,
#app-sidebar .sidebar-profile-card h6 {
  font-size: calc(12.5px * var(--sb-scale, 1)) !important;
}

.sidebar-profile-card small,
.sidebar-profile-card span,
#app-sidebar .sidebar-profile-card small,
#app-sidebar .sidebar-profile-card span {
  font-size: calc(10.5px * var(--sb-scale, 1)) !important;
}

/* Hide broadcast announcement marquee as requested */
.broadcast-marquee-card {
  display: none !important;
}

/* ==========================================================================
   MOBILE TOUCH SINGLE-TAP & INSTANT FEEDBACK OPTIMIZATION
   ========================================================================== */
@media (hover: none), (max-width: 991px) {
  .sidebar-toggler,
  .mobile-bottom-nav .mobile-nav-item,
  .topbar-btn,
  .sidebar .menu-link,
  .mobile-sidebar-close,
  .backdrop-sidebar {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }
}

/* ==========================================================================
   MODERN GLASSY INFO CARDS (DASHBOARD & INFO MODULE)
   ========================================================================== */
.info-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 16px !important;
  margin-bottom: 20px !important;
  position: relative !important;
}

@media (max-width: 640px) {
  .info-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

.info-card-item {
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.85) !important;
  border-radius: 18px !important;
  padding: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
  position: relative !important;
}

.info-card-item:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08) !important;
  border-color: var(--t-primary, #3b82f6) !important;
}

html[data-mode="dark"] .info-card-item {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}

html[data-mode="dark"] .info-card-item:hover {
  border-color: var(--t-primary, #60a5fa) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55) !important;
}

.info-card-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 10px !important;
  gap: 8px !important;
}

.info-badge-target {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  letter-spacing: normal !important;
}

.info-badge-target i,
.info-badge-publish i {
  display: none !important;
}

.badge-target-semua {
  background: transparent !important;
  color: #2563eb !important;
}

html[data-mode="dark"] .badge-target-semua {
  background: transparent !important;
  color: #60a5fa !important;
}

.badge-target-guru {
  background: transparent !important;
  color: #d97706 !important;
}

html[data-mode="dark"] .badge-target-guru {
  background: transparent !important;
  color: #fbbf24 !important;
}

.badge-target-siswa {
  background: transparent !important;
  color: #059669 !important;
}

html[data-mode="dark"] .badge-target-siswa {
  background: transparent !important;
  color: #34d399 !important;
}

.info-card-date {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 11.5px !important;
  color: #94a3b8 !important;
  font-weight: 500 !important;
  margin-bottom: 8px !important;
}

html[data-mode="dark"] .info-card-date {
  color: #64748b !important;
}

.info-card-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  margin: 0 0 8px 0 !important;
  color: #0f172a !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.info-card-title a {
  color: inherit !important;
  text-decoration: none !important;
}

.info-card-title a:hover {
  color: var(--t-primary, #3b82f6) !important;
}

html[data-mode="dark"] .info-card-title {
  color: #f8fafc !important;
}

html[data-mode="dark"] .info-card-title a:hover {
  color: var(--t-primary, #60a5fa) !important;
}

.info-card-excerpt {
  font-size: 12.5px !important;
  color: #64748b !important;
  line-height: 1.6 !important;
  margin: 0 0 14px 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  flex-grow: 1 !important;
}

html[data-mode="dark"] .info-card-excerpt {
  color: #94a3b8 !important;
}

.info-card-footer {
  padding-top: 12px !important;
  border-top: 1px solid rgba(226, 232, 240, 0.7) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

html[data-mode="dark"] .info-card-footer {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

.info-btn-read {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--t-primary, #3b82f6) !important;
  background: var(--t-primary-soft, rgba(59, 130, 246, 0.08)) !important;
  padding: 5px 12px !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}

.info-btn-read:hover {
  background: var(--t-primary, #3b82f6) !important;
  color: #ffffff !important;
  transform: translateX(2px) !important;
}

.info-badge-publish {
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 5px 12px !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  line-height: 1.4 !important;
}

.badge-pub-active {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #059669 !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

.badge-pub-active:hover {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #047857 !important;
  transform: translateY(-1px) !important;
}

.badge-pub-draft {
  background: rgba(245, 158, 11, 0.1) !important;
  color: #d97706 !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

.badge-pub-draft:hover {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #b45309 !important;
  transform: translateY(-1px) !important;
}

html[data-mode="dark"] .badge-pub-active {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

html[data-mode="dark"] .badge-pub-active:hover {
  background: rgba(16, 185, 129, 0.28) !important;
  color: #6ee7b7 !important;
}

html[data-mode="dark"] .badge-pub-draft {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}

html[data-mode="dark"] .badge-pub-draft:hover {
  background: rgba(245, 158, 11, 0.28) !important;
  color: #fde68a !important;
}

/* Modal detail styling in dark mode */
html[data-mode="dark"] .info-detail-modal-body h3 {
  color: #f8fafc !important;
}

html[data-mode="dark"] .info-detail-modal-body hr {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-mode="dark"] .info-content-rich {
  color: #cbd5e1 !important;
}


/* ==========================================================================
   ACADEMIC MODERN UNIFIED BUTTON SYSTEM
   Harmonizes button dimensions, radiuses, typography, and states across all modules
   ========================================================================== */

/* 1. Base Button Standardization */
.btn:not(.btn-xs):not(.btn-sm):not(.btn-lg):not(.topbar-btn):not(.topbar-glass-btn):not(.btn-pure):not(.close):not(.btn-close):not(.btn-float):not(.quran-btn-float):not(.quran-resizer-btn):not(.btn-table-mode):not(.quran-action-btn) {
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  line-height: 1.4 !important;
  border-radius: 9px !important;
  min-height: 38px !important;
  padding: 8px 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border-width: 1px !important;
  border-style: solid !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  cursor: pointer !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Base Icon inside Buttons */
.btn:not(.topbar-btn):not(.topbar-glass-btn):not(.btn-pure):not(.btn-float) > i,
.btn:not(.topbar-btn):not(.topbar-glass-btn):not(.btn-pure):not(.btn-float) > .fa,
.btn:not(.topbar-btn):not(.topbar-glass-btn):not(.btn-pure):not(.btn-float) > .ti {
  font-size: 13px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

/* 2. Button Size Variants */
/* Extra Small Button (Compact Table Cells & Badges) */
.btn-xs,
.btn.btn-xs,
a.btn.btn-xs,
button.btn.btn-xs,
table .btn-xs,
table.dataTable .btn-xs,
.table td .btn,
.module-data-card table td .btn {
  font-size: 11px !important;
  font-weight: 600 !important;
  min-height: 24px !important;
  height: 24px !important;
  max-height: 26px !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  gap: 3px !important;
  line-height: 1.25 !important;
}
.btn-xs > i, .btn-xs > .fa, .btn-xs > .ti,
table .btn-xs > i, table .btn-xs > .fa, table .btn-xs > .ti,
.table td .btn > i, .table td .btn > .fa, .table td .btn > .ti {
  font-size: 11px !important;
}

/* Small Button (Secondary Action, Card Sub-actions) */
.btn-sm,
.btn.btn-sm,
a.btn.btn-sm,
button.btn.btn-sm,
table .btn-sm,
table.dataTable .btn-sm {
  font-size: 12px !important;
  font-weight: 600 !important;
  min-height: 32px !important;
  height: 32px !important;
  max-height: 34px !important;
  padding: 4px 12px !important;
  border-radius: 8px !important;
  gap: 5px !important;
  line-height: 1.35 !important;
}
.btn-sm > i, .btn-sm > .fa, .btn-sm > .ti {
  font-size: 12px !important;
}

/* Large Button (Hero Actions, Login, Primary Callouts) */
.btn-lg {
  font-size: 14.5px !important;
  font-weight: 600 !important;
  min-height: 44px !important;
  padding: 10px 22px !important;
  border-radius: 11px !important;
  gap: 8px !important;
}
.btn-lg > i, .btn-lg > .fa, .btn-lg > .ti {
  font-size: 15px !important;
}

/* Block Buttons */
.btn-block {
  display: flex !important;
  width: 100% !important;
  text-align: center !important;
  justify-content: center !important;
}

/* Table general action button consistency */
table td > .btn:not(.btn-xs):not(.btn-sm):not(.topbar-btn) {
  min-height: 30px !important;
  padding: 4px 10px !important;
  font-size: 11.5px !important;
  border-radius: 6px !important;
  gap: 4px !important;
}

/* Caret for dropdown toggle */
.btn.dropdown-toggle::after {
  margin-left: 6px !important;
  vertical-align: middle !important;
}

/* 3. Button Color Tokens & Variants (Light Mode) */

/* Primary Button */
.btn-primary,
.btn-action-primary,
.btn-primary-dark {
  background-color: var(--t-primary, #2563eb) !important;
  border-color: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 2px 4px var(--t-primary-soft, rgba(37, 99, 235, 0.18)) !important;
}
.btn-primary:hover,
.btn-action-primary:hover,
.btn-primary-dark:hover,
.btn-primary:focus,
.btn-action-primary:focus,
.btn-primary-dark:focus {
  background-color: var(--t-primary-hover, #1d4ed8) !important;
  border-color: var(--t-primary-hover, #1d4ed8) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px var(--t-primary-soft, rgba(37, 99, 235, 0.32)) !important;
  transform: translateY(-1px);
}
.btn-primary:active,
.btn-action-primary:active,
.btn-primary-dark:active,
.show > .btn-primary.dropdown-toggle,
.show > .btn-action-primary.dropdown-toggle {
  background-color: var(--t-primary-hover, #1d4ed8) !important;
  border-color: var(--t-primary-hover, #1d4ed8) !important;
  color: #ffffff !important;
  transform: translateY(0);
  box-shadow: 0 1px 3px var(--t-primary-soft, rgba(37, 99, 235, 0.2)) !important;
}

/* Secondary Button (Neutral solid) */
.btn-secondary {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}
.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08) !important;
  transform: translateY(-1px);
}
.btn-secondary:active,
.show > .btn-secondary.dropdown-toggle {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
  transform: translateY(0);
}

/* Outline Secondary / Export Button */
.btn-outline-secondary,
.btn-action-export {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}
.btn-outline-secondary:hover,
.btn-action-export:hover,
.btn-outline-secondary:focus,
.btn-action-export:focus {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08) !important;
  transform: translateY(-1px);
}
.btn-outline-secondary:active,
.btn-action-export:active,
.show > .btn-outline-secondary.dropdown-toggle,
.show > .btn-action-export.dropdown-toggle {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
  transform: translateY(0);
}

/* Outline Primary */
.btn-outline-primary {
  background-color: transparent !important;
  border-color: var(--t-primary, #2563eb) !important;
  color: var(--t-primary, #2563eb) !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--t-primary, #2563eb) !important;
  border-color: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px var(--t-primary-soft, rgba(37, 99, 235, 0.28)) !important;
  transform: translateY(-1px);
}

/* Success Button */
.btn-success {
  background-color: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.15) !important;
}
.btn-success:hover,
.btn-success:focus {
  background-color: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
  transform: translateY(-1px);
}
.btn-success:active,
.show > .btn-success.dropdown-toggle {
  background-color: #047857 !important;
  transform: translateY(0);
}

/* Danger Button */
.btn-danger {
  background-color: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(239, 68, 68, 0.15) !important;
}
.btn-danger:hover,
.btn-danger:focus {
  background-color: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
  transform: translateY(-1px);
}
.btn-danger:active,
.show > .btn-danger.dropdown-toggle {
  background-color: #b91c1c !important;
  transform: translateY(0);
}

/* Warning Button */
.btn-warning {
  background-color: #f59e0b !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.15) !important;
}
.btn-warning:hover,
.btn-warning:focus {
  background-color: #d97706 !important;
  border-color: #d97706 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
  transform: translateY(-1px);
}
.btn-warning:active,
.show > .btn-warning.dropdown-toggle {
  background-color: #b45309 !important;
  transform: translateY(0);
}

/* Info Button */
.btn-info {
  background-color: #0ea5e9 !important;
  border-color: #0ea5e9 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(14, 165, 233, 0.15) !important;
}
.btn-info:hover,
.btn-info:focus {
  background-color: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3) !important;
  transform: translateY(-1px);
}
.btn-info:active,
.show > .btn-info.dropdown-toggle {
  background-color: #0369a1 !important;
  transform: translateY(0);
}

/* Dark Button */
.btn-dark {
  background-color: #1e293b !important;
  border-color: #0f172a !important;
  color: #f8fafc !important;
}
.btn-dark:hover,
.btn-dark:focus {
  background-color: #0f172a !important;
  border-color: #020617 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* Light Button */
.btn-light {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}
.btn-light:hover,
.btn-light:focus {
  background-color: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* 4. Dark Mode Button Synchronization */
html[data-mode="dark"] .btn-primary,
html[data-mode="dark"] .btn-action-primary,
html[data-mode="dark"] .btn-primary-dark,
html[data-mode="dark"] .module-header-actions .btn-primary,
html[data-mode="dark"] .module-header-actions a.btn-primary,
html[data-mode="dark"] .module-filter-card .btn-primary {
  background-color: var(--t-primary, #3b82f6) !important;
  border-color: var(--t-primary, #3b82f6) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 2px 6px var(--t-primary-soft, rgba(59, 130, 246, 0.3)) !important;
}
html[data-mode="dark"] .btn-primary:hover,
html[data-mode="dark"] .btn-action-primary:hover,
html[data-mode="dark"] .btn-primary-dark:hover,
html[data-mode="dark"] .module-header-actions .btn-primary:hover,
html[data-mode="dark"] .module-header-actions a.btn-primary:hover,
html[data-mode="dark"] .module-filter-card .btn-primary:hover {
  background-color: var(--t-primary-hover, #2563eb) !important;
  border-color: var(--t-primary-hover, #2563eb) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px var(--t-primary-soft, rgba(59, 130, 246, 0.45)) !important;
  transform: translateY(-1px);
}

html[data-mode="dark"] .btn-secondary,
html[data-mode="dark"] .btn-outline-secondary,
html[data-mode="dark"] .btn-action-export,
html[data-mode="dark"] .module-header-actions .btn-outline-secondary,
html[data-mode="dark"] .module-header-actions .btn-action-export {
  background-color: rgba(30, 41, 59, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}
html[data-mode="dark"] .btn-secondary:hover,
html[data-mode="dark"] .btn-outline-secondary:hover,
html[data-mode="dark"] .btn-action-export:hover,
html[data-mode="dark"] .module-header-actions .btn-outline-secondary:hover,
html[data-mode="dark"] .module-header-actions .btn-action-export:hover {
  background-color: rgba(51, 65, 85, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  transform: translateY(-1px);
}

html[data-mode="dark"] .btn-outline-primary {
  background-color: rgba(59, 130, 246, 0.12) !important;
  border-color: var(--t-primary, #3b82f6) !important;
  color: #93c5fd !important;
}
html[data-mode="dark"] .btn-outline-primary:hover {
  background-color: var(--t-primary, #3b82f6) !important;
  color: #ffffff !important;
}

html[data-mode="dark"] .btn-success {
  background-color: #059669 !important;
  border-color: #047857 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3) !important;
}
html[data-mode="dark"] .btn-success:hover {
  background-color: #047857 !important;
  border-color: #065f46 !important;
}

html[data-mode="dark"] .btn-danger {
  background-color: #dc2626 !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3) !important;
}
html[data-mode="dark"] .btn-danger:hover {
  background-color: #b91c1c !important;
  border-color: #991b1b !important;
}

html[data-mode="dark"] .btn-warning {
  background-color: #d97706 !important;
  border-color: #b45309 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3) !important;
}
html[data-mode="dark"] .btn-warning:hover {
  background-color: #b45309 !important;
  border-color: #92400e !important;
}

html[data-mode="dark"] .btn-info {
  background-color: #0284c7 !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3) !important;
}
html[data-mode="dark"] .btn-info:hover {
  background-color: #0369a1 !important;
  border-color: #075985 !important;
}

html[data-mode="dark"] .btn-light {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
}
html[data-mode="dark"] .btn-light:hover {
  background-color: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

/* 5. Disabled and Transition states */
.btn:disabled,
.btn.disabled,
fieldset:disabled .btn {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Clean Cards (Main Grid & Sesi Drawer) - No Clutter Icons */
.materi-card .materi-code-chip i,
.materi-card .materi-meta-item i,
.materi-card .materi-counters-bar i,
.materi-card .materi-card-footer i,
.edlink-session-card .materi-code-chip i,
.edlink-session-card .ti-layout-grid2,
.edlink-session-card .edlink-session-meta i,
.edlink-session-card .auto-absensi-pill i,
.edlink-session-card .edlink-meta-pill i,
.edlink-session-card .btn i {
  display: none !important;
}

/* Refined Filter & Navigation Tabs - Tasteful Icons */
.edlink-tabs-nav .edlink-tab-btn i,
.edlink-tabs-nav .edlink-tab-btn .ti,
.edlink-tabs-nav .edlink-tab-btn .fa {
  display: inline-block !important;
  font-size: 13px !important;
  margin-right: 5px !important;
  vertical-align: middle !important;
  opacity: 0.85 !important;
}
.edlink-tab-btn.active i,
.edlink-tab-btn.active .ti {
  opacity: 1 !important;
}

/* Clean Filter Card - No Icons in Labels, Hints or Filter Buttons */
.materi-filter-label i,
.materi-filter-label svg,
.materi-filter-card .border-top i,
.materi-filter-card .border-top svg {
  display: none !important;
}


/* Clean Lembar Soal (CBT / Ulangan) Cards - No Clutter Icons */
.lbsoal-card .lbsoal-pill i,
.lbsoal-card .lbsoal-code-badge i,
.lbsoal-card .lbsoal-mapel-badge i,
.lbsoal-card .lbsoal-classes-row i,
.lbsoal-card .lbsoal-schedule-item i,
.lbsoal-card .lbsoal-metrics-strip i,
.lbsoal-card .lbsoal-card-footer i {
  display: none !important;
}

/* Tidy Metric Strip */
.lbsoal-metrics-strip {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px 10px !important;
  padding: 10px 12px !important;
  background: var(--t-surface-subtle, #f8fafc) !important;
  border: 1px solid var(--t-surface-border, #f1f5f9) !important;
  border-radius: 10px !important;
}

html[data-mode="dark"] .lbsoal-metrics-strip {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

.lbsoal-metric-col {
  font-size: 11.5px !important;
  color: var(--t-text-muted, #64748b) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.lbsoal-col-pembuat {
  grid-column: 1 / -1 !important;
  border-top: 1px dashed rgba(226, 232, 240, 0.8) !important;
  padding-top: 6px !important;
  margin-top: 2px !important;
}

html[data-mode="dark"] .lbsoal-col-pembuat {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

/* Tidy & Unified Footer Toggle Buttons */
.btn-lbsoal-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 5px 14px !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
  line-height: 1.4 !important;
}

.btn-lbsoal-draft {
  background: rgba(245, 158, 11, 0.1) !important;
  color: #d97706 !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
}
.btn-lbsoal-draft:hover {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #b45309 !important;
  transform: translateY(-1px) !important;
}

.btn-lbsoal-success {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #059669 !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
}
.btn-lbsoal-success:hover {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #047857 !important;
  transform: translateY(-1px) !important;
}

.btn-lbsoal-danger {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
}
.btn-lbsoal-danger:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #b91c1c !important;
  transform: translateY(-1px) !important;
}

html[data-mode="dark"] .btn-lbsoal-draft {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}
html[data-mode="dark"] .btn-lbsoal-draft:hover {
  background: rgba(245, 158, 11, 0.28) !important;
  color: #fde68a !important;
}

html[data-mode="dark"] .btn-lbsoal-success {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}
html[data-mode="dark"] .btn-lbsoal-success:hover {
  background: rgba(16, 185, 129, 0.28) !important;
  color: #6ee7b7 !important;
}

html[data-mode="dark"] .btn-lbsoal-danger {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}
html[data-mode="dark"] .btn-lbsoal-danger:hover {
  background: rgba(239, 68, 68, 0.28) !important;
  color: #fca5a5 !important;
}

/* Footer Action Buttons Tidy */
.lbsoal-actions-right .btn {
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 5px 14px !important;
  border-radius: 8px !important;
}


/* ==========================================================================
   AUTHENTIC DASHBOARD (BERANDA) STAT CARDS ACROSS ALL MODULES
   Matching beranda.php: grid, rounded-2xl, soft icon-boxes, decorative blob
   ========================================================================== */
.grid.grid-cols-2 {
  display: grid !important;
}

/* Light Mode Card Polishing */
.rounded-2xl.border-slate-200\/80 {
  border-radius: 16px !important;
  border-color: rgba(226, 232, 240, 0.85) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.rounded-2xl.border-slate-200\/80:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08) !important;
}

/* Dark Mode Adaptation */
html[data-mode="dark"] .bg-white.rounded-2xl {
  background-color: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

html[data-mode="dark"] .bg-white.rounded-2xl:hover {
  border-color: rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

html[data-mode="dark"] .bg-white.rounded-2xl h4,
html[data-mode="dark"] .bg-white.rounded-2xl h4.text-slate-800,
html[data-mode="dark"] .bg-white.rounded-2xl h4.text-primary {
  color: #f8fafc !important;
}

html[data-mode="dark"] .bg-white.rounded-2xl p,
html[data-mode="dark"] .bg-white.rounded-2xl p.text-slate-500 {
  color: #94a3b8 !important;
}

html[data-mode="dark"] .bg-white.rounded-2xl span.text-slate-400 {
  color: #64748b !important;
}

/* Lucide Icon Boxes Dark Mode */
html[data-mode="dark"] .bg-white.rounded-2xl .bg-primary\/10 {
  background-color: rgba(59, 130, 246, 0.15) !important;
}
html[data-mode="dark"] .bg-white.rounded-2xl .text-primary {
  color: #60a5fa !important;
}

html[data-mode="dark"] .bg-white.rounded-2xl .bg-emerald-50,
html[data-mode="dark"] .bg-white.rounded-2xl .bg-succ\/20 {
  background-color: rgba(16, 185, 129, 0.15) !important;
}
html[data-mode="dark"] .bg-white.rounded-2xl .text-emerald-600,
html[data-mode="dark"] .bg-white.rounded-2xl .text-succ {
  color: #34d399 !important;
}

html[data-mode="dark"] .bg-white.rounded-2xl .bg-amber-50,
html[data-mode="dark"] .bg-white.rounded-2xl .bg-accent\/20 {
  background-color: rgba(245, 158, 11, 0.15) !important;
}
html[data-mode="dark"] .bg-white.rounded-2xl .text-amber-600,
html[data-mode="dark"] .bg-white.rounded-2xl .text-accent {
  color: #fbbf24 !important;
}

html[data-mode="dark"] .bg-white.rounded-2xl .bg-purple-50,
html[data-mode="dark"] .bg-white.rounded-2xl .bg-indigo-50 {
  background-color: rgba(139, 92, 246, 0.15) !important;
}
html[data-mode="dark"] .bg-white.rounded-2xl .text-purple-600,
html[data-mode="dark"] .bg-white.rounded-2xl .text-indigo-600 {
  color: #a78bfa !important;
}

html[data-mode="dark"] .bg-white.rounded-2xl .text-slate-700,
html[data-mode="dark"] .bg-white.rounded-2xl .text-slate-600 {
  color: #cbd5e1 !important;
}
html[data-mode="dark"] .bg-white.rounded-2xl .border-slate-100 {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.info-badge-publish {
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  text-decoration: none !important;
  transition: color 0.15s ease;
}
.badge-pub-active {
  color: #059669 !important;
}
.badge-pub-active:hover {
  color: #047857 !important;
}
.badge-pub-draft {
  color: #94a3b8 !important;
}
.badge-pub-draft:hover {
  color: #64748b !important;
}
html[data-mode="dark"] .badge-pub-active {
  color: #34d399 !important;
}
html[data-mode="dark"] .badge-pub-draft {
  color: #64748b !important;
}

/* 4. Bottom Activity Banner - Harmonized with Dashboard Style */
.materi-activity-banner {
  background: var(--t-surface, #ffffff);
  border: 1px solid var(--t-surface-border, #e2e8f0);
  border-radius: 16px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}
html[data-mode="dark"] .materi-activity-banner {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.activity-banner-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--t-text-main, #0f172a);
  margin: 0 0 2px 0;
  letter-spacing: -0.01em;
}
html[data-mode="dark"] .activity-banner-title {
  color: #f1f5f9;
}

.activity-banner-desc {
  font-size: 12px;
  color: var(--t-text-muted, #64748b);
  display: block;
}
html[data-mode="dark"] .activity-banner-desc {
  color: #94a3b8;
}

.activity-banner-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-activity-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--t-surface, #ffffff);
  color: var(--t-text-main, #334155);
  border: 1px solid var(--t-surface-border, #cbd5e1);
  padding: 7px 18px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none !important;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.btn-activity-action:hover {
  background: var(--t-surface-subtle, #f8fafc);
  border-color: #94a3b8;
  color: var(--t-primary, #2563eb);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
html[data-mode="dark"] .btn-activity-action {
  background: rgba(30, 41, 59, 0.8);
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}
html[data-mode="dark"] .btn-activity-action:hover {
  background: rgba(51, 65, 85, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.btn-activity-action i,
.btn-activity-action .ti,
.btn-activity-action .fa {
  display: none !important;
}


/* ==========================================================================
   PERMANENT TITLE ICON REMOVAL - CLEAN MINIMALIST ACADEMIC TYPOGRAPHY
   ========================================================================== */
.module-header-icon,
.module-header-banner .module-header-icon,
.module-header-left .module-header-icon,
.lbsoal-header-icon,
.materi-header-icon,
.info-title-icon,
.quran-hero-icon-box {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.module-header-left,
.diskusi-title-block,
.info-title-group {
  gap: 0 !important;
}

/* ==========================================================================
   APP-WIDE FONT & CONTENT SCALING ENGINE (Sidebar, Cards, Tables, Modals)
   ========================================================================== */
:root {
  --app-scale: 1;
  --sb-scale: 1;
  --table-scale: 1;
  --tbl-th-size: 11px;
  --tbl-th-pad: 10px 12px;
  --tbl-td-size: 12.5px;
  --tbl-td-pad: 10px 12px;
}

html[data-zoom="80"] {
  --app-scale: 0.88888;
  --sb-scale: 0.88888;
  --table-scale: 0.88888;
}

html[data-zoom="90"] {
  --app-scale: 1;
  --sb-scale: 1;
  --table-scale: 1;
}

html[data-zoom="100"] {
  --app-scale: 1.11111;
  --sb-scale: 1.11111;
  --table-scale: 1.11111;
}

html[data-zoom="110"] {
  --app-scale: 1.22222;
  --sb-scale: 1.22222;
  --table-scale: 1.22222;
}

/* Dynamic Content Scaling for Main Content & Modals (Smooth Proportional Scaling) */
html[data-zoom="80"] .main-content,
html[data-zoom="80"] .modal-content {
  zoom: 0.88888;
}

html[data-zoom="90"] .main-content,
html[data-zoom="90"] .modal-content {
  zoom: 1;
}

html[data-zoom="100"] .main-content,
html[data-zoom="100"] .modal-content {
  zoom: 1.11111;
}

html[data-zoom="110"] .main-content,
html[data-zoom="110"] .modal-content {
  zoom: 1.22222;
}

/* Fallback for browsers without zoom property */
@supports not (zoom: 1) {
  html[data-zoom="80"] .main-content {
    font-size: 88.88%;
  }
  html[data-zoom="100"] .main-content {
    font-size: 111.11%;
  }
  html[data-zoom="110"] .main-content {
    font-size: 122.22%;
  }
}

/* Base Table Transitions & Button Ergonomics */
table.dataTable thead th,
table.dataTable tbody td,
.table thead th,
.table tbody td,
.table td .badge,
.table td code,
.table td a:not(.btn):not(.badge),
.table td span:not(.btn *) {
  transition: font-size 0.15s ease, padding 0.15s ease !important;
}

table td .btn,
table td button,
table td a.btn,
table th .btn,
table th button,
.table td .btn,
.table td button,
.table td a.btn,
.table td .btn-group {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}

.card,
.card-body,
.module-data-card,
.module-filter-card,
.quick-action-card,
.materi-card,
.materi-card-grid,
.materi-detail-card,
.materi-detail-hero,
.diskusi-post-card,
.diskusi-composer-card,
.info-card,
.stat-card,
.edlink-session-card,
.edlink-widget {
  transition: font-size 0.15s ease;
}

.card-title,
.module-header-title,
.card-header {
  transition: font-size 0.15s ease;
}



/* Hide icons in edlink alert box and session section headers */
.edlink-alert-box > i,
.edlink-alert-box i.ti-info-alt,
.edlink-hdr-other > i,
.edlink-hdr-finished > i,
.edlink-hdr-scheduled > i,
.edlink-ongoing-header > i {
  display: none !important;
}


/* Hide checkmark and other icons inside materi status pills */
.materi-status-pill i,
.materi-status-pill .ti,
.materi-status-pill [class^="ti-"],
.edlink-mapel-subbar .materi-status-pill i {
  display: none !important;
}

/* ==========================================================================
   DARK MODE MASTER HARMONIZATION ENGINE (ALL MODULES - 100% LIGHT MODE PARITY)
   Ensures Dark Mode has identical layout, spacing, padding, flexbox alignment,
   dropdown chevrons, semantic badges, and visual hierarchy as Light Mode.
   ========================================================================== */

/* 1. Global Dark Mode CSS Variables & Canvas */
html[data-mode="dark"] {
  --t-surface: #111a2e;
  --t-surface-subtle: rgba(255, 255, 255, 0.035);
  --t-surface-border: rgba(255, 255, 255, 0.08);
  --t-text-main: #f8fafc;
  --t-text-muted: #94a3b8;
}

html[data-mode="dark"] body {
  background: var(--t-canvas-dark, #080f1e) !important;
  background-attachment: fixed !important;
  color: #e2e8f0 !important;
}

html[data-mode="dark"] body::before {
  opacity: 0.28 !important;
}

/* Topbar Academic Period Pill in Dark Mode (matches Light Mode accent tint) */
html[data-mode="dark"] .topbar-left > span.rounded-full {
  background: var(--t-primary-soft, rgba(59, 130, 246, 0.16)) !important;
  color: var(--t-primary, #60a5fa) !important;
  border: 1px solid var(--t-primary-soft, rgba(59, 130, 246, 0.32)) !important;
}

/* 2. Structural Layout Parity for Module Containers (Fixes rules trapped in :not([data-mode="dark"])) */
html[data-mode="dark"] .module-header-banner {
  background: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  padding: 18px 22px !important;
  margin-bottom: 20px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 14px !important;
  position: relative !important;
  overflow: hidden !important;
}

@media (max-width: 767.98px) {
  html[data-mode="dark"] .module-header-banner {
    padding: 14px 16px !important;
    border-radius: 14px !important;
    margin-bottom: 14px !important;
    gap: 12px !important;
  }
}

html[data-mode="dark"] .module-filter-card {
  background: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 16px 20px !important;
  margin-bottom: 20px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}

@media (max-width: 767.98px) {
  html[data-mode="dark"] .module-filter-card {
    padding: 14px 16px !important;
    border-radius: 12px !important;
    margin-bottom: 14px !important;
  }
}

html[data-mode="dark"] .module-data-card,
html[data-mode="dark"] .card:has(.table-responsive),
html[data-mode="dark"] .card:has(table.dataTable),
html[data-mode="dark"] .main-content .card:has(table.table) {
  background: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
  overflow: hidden !important;
  margin-bottom: 24px !important;
}

html[data-mode="dark"] .module-data-card > .card-body,
html[data-mode="dark"] .card:has(.table-responsive) > .card-body,
html[data-mode="dark"] .card:has(table.dataTable) > .card-body {
  padding: 20px !important;
  background: transparent !important;
}

@media (max-width: 767.98px) {
  html[data-mode="dark"] .module-data-card > .card-body,
  html[data-mode="dark"] .card:has(.table-responsive) > .card-body,
  html[data-mode="dark"] .card:has(table.dataTable) > .card-body {
    padding: 14px !important;
  }
}

html[data-mode="dark"] .batch-action-footer {
  display: block !important;
  background: #0d1526 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 16px 20px !important;
  margin: 0 !important;
  border-radius: 0 0 14px 14px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

/* Unified Card Surface across ALL Modules */
html[data-mode="dark"] .card:not(.card-welcome-hero),
html[data-mode="dark"] .quick-action-card,
html[data-mode="dark"] .stat-card,
html[data-mode="dark"] .materi-card,
html[data-mode="dark"] .materi-filter-card,
html[data-mode="dark"] .materi-detail-card,
html[data-mode="dark"] .diskusi-post-card,
html[data-mode="dark"] .diskusi-composer-card,
html[data-mode="dark"] .info-card,
html[data-mode="dark"] .lbsoal-card,
html[data-mode="dark"] .lbsoal-filter-card {
  background: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
  color: #e2e8f0 !important;
}

html[data-mode="dark"] .card-body {
  background: transparent !important;
  color: inherit !important;
}

/* 3. Form Controls, Inputs, Date Pickers, and Select Dropdown Chevrons */
html[data-mode="dark"] .form-control:not(.materi-th-select),
html[data-mode="dark"] input.form-control,
html[data-mode="dark"] select.form-control:not(.materi-th-select),
html[data-mode="dark"] textarea.form-control,
html[data-mode="dark"] .bootstrap-select > .dropdown-toggle {
  background-color: #0b1120 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  color: #f1f5f9 !important;
  box-shadow: none !important;
}

/* Restore Chevron Arrow on all <select> dropdowns in Dark Mode */
html[data-mode="dark"] select.form-control:not([multiple]):not([size]):not(.materi-th-select),
html[data-mode="dark"] .materi-filter-select,
html[data-mode="dark"] .module-filter-card select.form-control:not([multiple]):not([size]),
html[data-mode="dark"] .card-body select.form-control:not([multiple]):not([size]):not(.materi-th-select),
html[data-mode="dark"] .dataTables_wrapper .dataTables_length select {
  background-color: #0b1120 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 15px 15px !important;
  padding-right: 36px !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

/* Materi Academic Year Pill Select (T.A. 2026-2027 next to + Buat Materi) */
html[data-mode="dark"] select.materi-th-select,
html[data-mode="dark"] .materi-th-select {
  background-color: var(--t-primary-soft, rgba(59, 130, 246, 0.16)) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 14px 14px !important;
  border: 1px solid var(--t-primary-soft, rgba(59, 130, 246, 0.32)) !important;
  border-radius: 12px !important;
  color: var(--t-primary, #60a5fa) !important;
  font-weight: 700 !important;
  padding: 0 34px 0 14px !important;
  height: 40px !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  box-shadow: none !important;
}

/* Date & Time Inputs in Dark Mode */
html[data-mode="dark"] input[type="date"],
html[data-mode="dark"] input[type="datetime-local"],
html[data-mode="dark"] input[type="time"],
html[data-mode="dark"] input[type="month"] {
  color-scheme: dark !important;
}

html[data-mode="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
html[data-mode="dark"] input[type="date"].materi-form-control::-webkit-calendar-picker-indicator,
html[data-mode="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
html[data-mode="dark"] input[type="time"]::-webkit-calendar-picker-indicator {
  filter: none !important;
  opacity: 0.85 !important;
  cursor: pointer !important;
}

html[data-mode="dark"] .form-control:focus,
html[data-mode="dark"] input.form-control:focus,
html[data-mode="dark"] select.form-control:focus:not(.materi-th-select),
html[data-mode="dark"] textarea.form-control:focus {
  border-color: var(--t-primary, #3b82f6) !important;
  box-shadow: 0 0 0 3px var(--t-primary-soft, rgba(59, 130, 246, 0.20)) !important;
  background-color: #090e1a !important;
}

html[data-mode="dark"] .form-control::placeholder {
  color: #64748b !important;
}

html[data-mode="dark"] select.form-control option,
html[data-mode="dark"] .materi-th-select option {
  background-color: #0b1120 !important;
  color: #f1f5f9 !important;
}

html[data-mode="dark"] .col-form-label,
html[data-mode="dark"] label.control-label {
  color: #94a3b8 !important;
  font-weight: 600 !important;
}

/* 4. High-Contrast Primary Buttons in Dark Mode (No Neon Mint Outline) */
html[data-mode="dark"] .btn-primary,
html[data-mode="dark"] button.btn-primary,
html[data-mode="dark"] a.btn-primary,
html[data-mode="dark"] .btn-action-primary,
html[data-mode="dark"] .btn-primary-dark,
html[data-mode="dark"] .module-header-actions .btn-primary,
html[data-mode="dark"] .module-header-actions a.btn-primary,
html[data-mode="dark"] .module-filter-card .btn-primary,
html[data-mode="dark"] .materi-btn-buat,
html[data-mode="dark"] .materi-btn-open,
html[data-mode="dark"] .btn-filter-apply {
  background: var(--t-primary, #2563eb) !important;
  background-color: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="emerald"][data-mode="dark"] .btn-primary,
html[data-theme="emerald"][data-mode="dark"] button.btn-primary,
html[data-theme="emerald"][data-mode="dark"] a.btn-primary,
html[data-theme="emerald"][data-mode="dark"] .btn-action-primary,
html[data-theme="emerald"][data-mode="dark"] .module-header-actions .btn-primary,
html[data-theme="emerald"][data-mode="dark"] .module-header-actions a.btn-primary,
html[data-theme="emerald"][data-mode="dark"] .module-filter-card .btn-primary,
html[data-theme="emerald"][data-mode="dark"] .materi-btn-buat,
html[data-theme="emerald"][data-mode="dark"] .materi-btn-open,
html[data-theme="emerald"][data-mode="dark"] .btn-filter-apply {
  background: #059669 !important;
  background-color: #059669 !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

html[data-theme="emerald"][data-mode="dark"] .btn-primary:hover,
html[data-theme="emerald"][data-mode="dark"] .module-header-actions .btn-primary:hover,
html[data-theme="emerald"][data-mode="dark"] .module-filter-card .btn-primary:hover,
html[data-theme="emerald"][data-mode="dark"] .materi-btn-buat:hover,
html[data-theme="emerald"][data-mode="dark"] .materi-btn-open:hover {
  background: #047857 !important;
  background-color: #047857 !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

html[data-theme="royalgold"][data-mode="dark"] .btn-primary,
html[data-theme="amber"][data-mode="dark"] .btn-primary,
html[data-theme="royalgold"][data-mode="dark"] .module-header-actions .btn-primary,
html[data-theme="amber"][data-mode="dark"] .module-header-actions .btn-primary,
html[data-theme="royalgold"][data-mode="dark"] .module-filter-card .btn-primary,
html[data-theme="amber"][data-mode="dark"] .module-filter-card .btn-primary,
html[data-theme="royalgold"][data-mode="dark"] .materi-btn-buat,
html[data-theme="amber"][data-mode="dark"] .materi-btn-buat,
html[data-theme="royalgold"][data-mode="dark"] .materi-btn-open,
html[data-theme="amber"][data-mode="dark"] .materi-btn-open {
  background: #d97706 !important;
  background-color: #d97706 !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

html[data-theme="sunset"][data-mode="dark"] .btn-primary,
html[data-theme="sunset"][data-mode="dark"] .module-header-actions .btn-primary,
html[data-theme="sunset"][data-mode="dark"] .module-filter-card .btn-primary,
html[data-theme="sunset"][data-mode="dark"] .materi-btn-buat,
html[data-theme="sunset"][data-mode="dark"] .materi-btn-open {
  background: #ea580c !important;
  background-color: #ea580c !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

/* 5. Left Calendar Widget & Session Cards in Materi Module (100% Light Mode Parity) */
html[data-mode="dark"] .edlink-calendar-widget {
  background: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px !important;
  padding: 22px !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35) !important;
  position: relative !important;
}

@media (max-width: 991.98px) {
  html[data-mode="dark"] .edlink-calendar-widget {
    padding: 16px !important;
    border-radius: 16px !important;
  }
}

html[data-mode="dark"] .edlink-session-card {
  background: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 14px !important;
  margin-bottom: 12px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
}

html[data-mode="dark"] .edlink-widget-title {
  color: #f8fafc !important;
}

html[data-mode="dark"] .edlink-widget-date {
  color: #94a3b8 !important;
}

html[data-mode="dark"] .edlink-widget-date strong {
  color: #f1f5f9 !important;
}

html[data-mode="dark"] .edlink-week-strip {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 14px !important;
  padding: 6px !important;
}

/* Inactive day pills are borderless/transparent like Light Mode */
html[data-mode="dark"] .edlink-day-pill:not(.active) {
  background: transparent !important;
  border: 1px solid transparent !important;
  color: #94a3b8 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

html[data-mode="dark"] .edlink-day-pill:not(.active):hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #f8fafc !important;
}

html[data-mode="dark"] .edlink-day-pill:not(.active) .day-name {
  color: #94a3b8 !important;
}

html[data-mode="dark"] .edlink-day-pill:not(.active) .day-num {
  color: #e2e8f0 !important;
}

html[data-mode="dark"] .edlink-day-pill.active {
  background: var(--t-primary, #2563eb) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="emerald"][data-mode="dark"] .edlink-day-pill.active {
  background: #059669 !important;
}

html[data-mode="dark"] .edlink-day-pill.active .day-name,
html[data-mode="dark"] .edlink-day-pill.active .day-num {
  color: #ffffff !important;
}

html[data-mode="dark"] .edlink-alert-box {
  background: rgba(37, 99, 235, 0.12) !important;
  border: 1px solid rgba(37, 99, 235, 0.28) !important;
  color: #93c5fd !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
}

html[data-theme="emerald"][data-mode="dark"] .edlink-alert-box {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.28) !important;
  color: #6ee7b7 !important;
}

html[data-mode="dark"] .edlink-mapel-group {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 12px !important;
}

html[data-mode="dark"] .edlink-mapel-title {
  color: #f1f5f9 !important;
}

html[data-mode="dark"] .btn-toggle-left-mapel {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .btn-toggle-left-mapel:hover {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #ffffff !important;
}

/* Status Pills in Dark Mode (Matches Light Mode Semantic Colors: Past = Slate, Active = Green) */
html[data-mode="dark"] .materi-status-pill {
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  padding: 4px 10px !important;
}

html[data-mode="dark"] .materi-status-pill.status-pill-past {
  background: rgba(148, 163, 184, 0.14) !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .materi-status-pill.status-pill-upcoming {
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.28) !important;
  color: #fbbf24 !important;
}

html[data-mode="dark"] .materi-status-pill.status-pill-today {
  background: rgba(59, 130, 246, 0.15) !important;
  border: 1px solid rgba(59, 130, 246, 0.28) !important;
  color: #60a5fa !important;
}

html[data-mode="dark"] .materi-status-pill.status-pill-active {
  background: rgba(16, 185, 129, 0.18) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: #34d399 !important;
}

html[data-mode="dark"] .materi-status-pill i,
html[data-mode="dark"] .materi-status-pill .ti,
html[data-mode="dark"] .materi-status-pill [class^="ti-"] {
  display: none !important;
}

/* 6. Materi Filter Tabs & Materi Cards in Dark Mode */
html[data-mode="dark"] .edlink-tabs-nav {
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

html[data-mode="dark"] .edlink-tab-btn {
  background: transparent !important;
  color: #94a3b8 !important;
  border-radius: 0 !important;
}

html[data-mode="dark"] .edlink-tab-btn:hover {
  color: #f8fafc !important;
  background: transparent !important;
}

html[data-mode="dark"] .edlink-tab-btn.active {
  background: transparent !important;
  color: var(--t-primary, #38bdf8) !important;
  border-bottom-color: var(--t-primary, #38bdf8) !important;
}

html[data-mode="dark"] .materi-card {
  background: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
}

html[data-mode="dark"] .materi-card-title {
  color: #f8fafc !important;
}

html[data-mode="dark"] .materi-mapel-text {
  color: var(--t-primary, #34d399) !important;
  font-weight: 700 !important;
}

html[data-mode="dark"] .materi-code-chip {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Semantic Materi Card Footer Counter Tags (Matches Light Mode Semantic Colors) */
html[data-mode="dark"] .materi-counter-tag {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .materi-counter-tag.materi-counter-presensi {
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: rgba(16, 185, 129, 0.28) !important;
  color: #34d399 !important;
}

html[data-mode="dark"] .materi-counter-tag.materi-counter-diskusi {
  background: rgba(245, 158, 11, 0.14) !important;
  border-color: rgba(245, 158, 11, 0.28) !important;
  color: #fbbf24 !important;
}

html[data-mode="dark"] .materi-counter-tag.materi-counter-tugas {
  background: rgba(249, 115, 22, 0.14) !important;
  border-color: rgba(249, 115, 22, 0.28) !important;
  color: #fb923c !important;
}

html[data-mode="dark"] .materi-counter-tag.materi-counter-test {
  background: rgba(168, 85, 247, 0.14) !important;
  border-color: rgba(168, 85, 247, 0.28) !important;
  color: #c084fc !important;
}

/* 7. Diskusi Module in Dark Mode (No Outer Wrapper Box, Dark Segmented Filter Tabs) */
html[data-mode="dark"] .diskusi-wrapper {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

html[data-mode="dark"] .diskusi-hero-banner {
  background: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}

html[data-mode="dark"] .diskusi-header-tabs {
  background: #0b1120 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4) !important;
}

html[data-mode="dark"] .diskusi-header-tabs > a {
  color: #94a3b8 !important;
  background: transparent !important;
  border-color: transparent !important;
}

html[data-mode="dark"] .diskusi-header-tabs > a:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

html[data-mode="dark"] .diskusi-header-tabs > a.bg-white {
  background: var(--t-primary, #2563eb) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="emerald"][data-mode="dark"] .diskusi-header-tabs > a.bg-white {
  background: #059669 !important;
  color: #ffffff !important;
}

html[data-mode="dark"] .diskusi-composer-card,
html[data-mode="dark"] .diskusi-post-card,
html[data-mode="dark"] .diskusi-card {
  background: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}

html[data-mode="dark"] .diskusi-textarea {
  background: #0b1120 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
  border-radius: 12px !important;
}

/* 8. Tables in Dark Mode (Siswa, Guru, Keaktifan, Soal) */
html[data-mode="dark"] .table thead th,
html[data-mode="dark"] table.dataTable thead th {
  background: #0b1120 !important;
  color: #94a3b8 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-top: none !important;
}

html[data-mode="dark"] .table tbody td,
html[data-mode="dark"] table.dataTable tbody td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .table tbody tr:hover td,
html[data-mode="dark"] table.dataTable tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.035) !important;
}

html[data-mode="dark"] div.dataTables_wrapper div.dataTables_info,
html[data-mode="dark"] div.dataTables_wrapper div.dataTables_paginate {
  color: #94a3b8 !important;
}

/* 9. Dashboard Hero Banner in Dark Mode */
html[data-mode="dark"] .card-welcome-hero {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.85) 50%, rgba(15, 23, 42, 0.95) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
}

html[data-theme="emerald"][data-mode="dark"] .card-welcome-hero {
  background: linear-gradient(135deg, rgba(6, 46, 34, 0.92) 0%, rgba(15, 23, 42, 0.92) 50%, rgba(6, 34, 25, 0.92) 100%) !important;
  border: 1px solid rgba(16, 185, 129, 0.30) !important;
}

html[data-theme="harmony"][data-mode="dark"] .card-welcome-hero {
  background: linear-gradient(135deg, rgba(15, 37, 68, 0.92) 0%, rgba(15, 23, 42, 0.92) 50%, rgba(14, 40, 68, 0.92) 100%) !important;
  border: 1px solid rgba(37, 99, 235, 0.30) !important;
}

/* ==========================================================================
   SIDEBAR & PROFILE FOOTER FULL THEME PARITY & CONSISTENCY (custom.css v=71.0)
   Ensures 100% identical geometry, border-radius, margins & structure
   across both Light and Dark theme modes (expanded & folded states).
   ========================================================================== */

/* 1. Base Geometry & Layout (Identical in Light & Dark Mode) */
.sidebar-profile-card,
.sidebar .sidebar-profile-card,
aside.sidebar .sidebar-profile-card,
#app-sidebar .sidebar-profile-card,
body:not(.sidebar-folded) .sidebar-profile-card {
  margin: 8px 12px 14px 12px !important;
  padding: 10px 14px !important;
  border-radius: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
  width: auto !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  transition: all 0.2s ease !important;
}

/* 2. Light Theme Styling (Matches top Periode card & Modern Card System) */
html:not([data-mode="dark"]) .sidebar-profile-card,
html:not([data-mode="dark"]) .sidebar .sidebar-profile-card,
html:not([data-mode="dark"]) #app-sidebar .sidebar-profile-card,
html:not([data-mode="dark"]) body:not(.sidebar-folded) .sidebar-profile-card {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}

html:not([data-mode="dark"]) .sidebar-profile-card .profile-meta span:first-child,
html:not([data-mode="dark"]) .sidebar-profile-card .profile-meta strong {
  color: #0f172a !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
}

html:not([data-mode="dark"]) .sidebar-profile-card .profile-meta span:last-child {
  color: #64748b !important;
  font-size: 11px !important;
}

html:not([data-mode="dark"]) .sidebar-profile-badge,
html:not([data-mode="dark"]) .sidebar .sidebar-profile-badge {
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #dbeafe !important;
}

html:not([data-mode="dark"]) .sidebar-profile-logout {
  color: #64748b !important;
}

html:not([data-mode="dark"]) .sidebar-profile-logout:hover {
  color: #ef4444 !important;
  background: #fee2e2 !important;
}

/* 3. Dark Theme Styling */
html[data-mode="dark"] .sidebar-profile-card,
html[data-mode="dark"] .sidebar .sidebar-profile-card,
html[data-mode="dark"] #app-sidebar .sidebar-profile-card,
html[data-mode="dark"] body:not(.sidebar-folded) .sidebar-profile-card {
  background: rgba(30, 41, 59, 0.72) !important;
  background-color: rgba(30, 41, 59, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

html[data-mode="dark"] .sidebar-profile-card .profile-meta span:first-child,
html[data-mode="dark"] .sidebar-profile-card .profile-meta strong {
  color: #f8fafc !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
}

html[data-mode="dark"] .sidebar-profile-card .profile-meta span:last-child {
  color: #94a3b8 !important;
  font-size: 11px !important;
}

html[data-mode="dark"] .sidebar-profile-badge,
html[data-mode="dark"] .sidebar .sidebar-profile-badge {
  background: rgba(37, 99, 235, 0.22) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.30) !important;
}

html[data-mode="dark"] .sidebar-profile-logout {
  color: #94a3b8 !important;
}

html[data-mode="dark"] .sidebar-profile-logout:hover {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.16) !important;
}

/* 4. Avatar Badge & Logout Shared Sizing in Both Themes */
.sidebar-profile-badge,
.sidebar .sidebar-profile-badge {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  flex-shrink: 0 !important;
}

.sidebar-profile-logout,
.sidebar .sidebar-profile-logout {
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
}

/* 5. Folded State Consistency in Both Themes */
body.sidebar-folded .sidebar-profile-card,
body.sidebar-folded .sidebar .sidebar-profile-card,
body.sidebar-folded #app-sidebar .sidebar-profile-card {
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  margin: 10px auto 14px auto !important;
  padding: 8px 0 !important;
  border-radius: 12px !important;
  justify-content: center !important;
}

body.sidebar-folded .sidebar-profile-card .profile-meta,
body.sidebar-folded .sidebar-profile-card .sidebar-profile-logout {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

body.sidebar-folded .sidebar-profile-card .sidebar-profile-badge {
  margin: 0 auto !important;
}

/* ==========================================================================
   MODERN & OPTIMIZED CKEDITOR THEME (SLIM / PILL TOOLBAR STYLE)
   ========================================================================== */
.cke_chrome {
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
  transition: all 0.2s ease !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

.cke_chrome:focus-within {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.cke_inner {
  background: #ffffff !important;
  border-radius: 12px !important;
}

/* Toolbar Container */
.cke_top {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 8px 10px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px !important;
}

.cke_toolbox {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
}

.cke_toolbar {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

/* Rounded Pill Button Groups */
.cke_toolgroup {
  display: inline-flex !important;
  align-items: center !important;
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 7px !important;
  padding: 2px !important;
  margin: 0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.cke_toolgroup a.cke_button:last-child:after {
  display: none !important;
}

/* Individual Toolbar Buttons */
a.cke_button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 26px !important;
  min-width: 26px !important;
  padding: 2px 6px !important;
  margin: 0 1px !important;
  border: 1px solid transparent !important;
  border-radius: 5px !important;
  background: transparent !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

a.cke_button_off:hover,
a.cke_button_off:focus,
a.cke_button_off:active {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

a.cke_button_on {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  box-shadow: inset 0 1px 2px rgba(59, 130, 246, 0.1) !important;
}

.cke_button_icon {
  margin: 0 !important;
  float: none !important;
}

/* Dropdown Combos (Format, FontSize) */
.cke_combo {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  float: none !important;
}

.cke_combo:after {
  display: none !important;
}

a.cke_combo_button {
  display: inline-flex !important;
  align-items: center !important;
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 7px !important;
  height: 32px !important;
  line-height: 30px !important;
  padding: 0 8px 0 10px !important;
  margin: 0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.15s ease !important;
  cursor: pointer !important;
}

.cke_combo_off a.cke_combo_button:hover,
.cke_combo_off a.cke_combo_button:focus {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

.cke_combo_on a.cke_combo_button {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
}

.cke_combo_text {
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #334155 !important;
  line-height: 30px !important;
  width: auto !important;
  min-width: 55px !important;
  max-width: 90px !important;
  padding-left: 0 !important;
}

.cke_combo_open {
  margin: 0 0 0 6px !important;
  height: auto !important;
  line-height: inherit !important;
}

.cke_combo_arrow {
  margin-top: 13px !important;
  border-top-color: #64748b !important;
}

/* Hide legacy collapse arrow */
a.cke_toolbox_collapser {
  display: none !important;
}

/* Bottom status bar / resizer */
.cke_bottom {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  padding: 4px 10px !important;
  border-radius: 0 0 12px 12px !important;
}

.cke_path_item {
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 500 !important;
}

/* DARK MODE SUPPORT */
body[data-mode="dark"] .cke_chrome,
body.dark-theme .cke_chrome,
[data-theme="dark"] .cke_chrome {
  border-color: #334155 !important;
  background: #0f172a !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

body[data-mode="dark"] .cke_chrome:focus-within,
body.dark-theme .cke_chrome:focus-within,
[data-theme="dark"] .cke_chrome:focus-within {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2) !important;
}

body[data-mode="dark"] .cke_inner,
body.dark-theme .cke_inner,
[data-theme="dark"] .cke_inner {
  background: #0f172a !important;
}

body[data-mode="dark"] .cke_top,
body.dark-theme .cke_top,
[data-theme="dark"] .cke_top {
  background: #1e293b !important;
  border-bottom-color: #334155 !important;
}

body[data-mode="dark"] .cke_toolgroup,
body.dark-theme .cke_toolgroup,
[data-theme="dark"] .cke_toolgroup {
  background: #0f172a !important;
  border-color: #475569 !important;
}

body[data-mode="dark"] a.cke_button_off:hover,
body.dark-theme a.cke_button_off:hover,
[data-theme="dark"] a.cke_button_off:hover {
  background: #334155 !important;
  border-color: #64748b !important;
}

body[data-mode="dark"] a.cke_button_on,
body.dark-theme a.cke_button_on,
[data-theme="dark"] a.cke_button_on {
  background: #1e3a5f !important;
  border-color: #60a5fa !important;
}

body[data-mode="dark"] a.cke_combo_button,
body.dark-theme a.cke_combo_button,
[data-theme="dark"] a.cke_combo_button {
  background: #0f172a !important;
  border-color: #475569 !important;
}

body[data-mode="dark"] a.cke_combo_button:hover,
body.dark-theme a.cke_combo_button:hover,
[data-theme="dark"] a.cke_combo_button:hover {
  background: #1e293b !important;
  border-color: #64748b !important;
}

body[data-mode="dark"] .cke_combo_text,
body.dark-theme .cke_combo_text,
[data-theme="dark"] .cke_combo_text {
  color: #f1f5f9 !important;
}

body[data-mode="dark"] .cke_combo_arrow,
body.dark-theme .cke_combo_arrow,
[data-theme="dark"] .cke_combo_arrow {
  border-top-color: #94a3b8 !important;
}

body[data-mode="dark"] .cke_bottom,
body.dark-theme .cke_bottom,
[data-theme="dark"] .cke_bottom {
  background: #1e293b !important;
  border-top-color: #334155 !important;
}

/* Dark mode icon contrast */
body[data-mode="dark"] .cke_button_icon,
body.dark-theme .cke_button_icon,
[data-theme="dark"] .cke_button_icon {
  filter: brightness(0) invert(0.9) !important;
}

/* Modern styling for CKEditor floating panels (Format, FontSize, Colors) */
.cke_panel {
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15) !important;
  background: #ffffff !important;
}

.cke_panel_listItem a {
  border-radius: 4px !important;
  margin: 1px 4px !important;
  transition: all 0.15s ease !important;
}

.cke_panel_listItem.cke_selected a,
.cke_panel_listItem a:hover {
  background-color: #eff6ff !important;
  color: #2563eb !important;
}

/* Modern dialog popup styling & isolation */
.cke_dialog {
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28) !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  font-family: inherit !important;
  min-width: 500px !important;
}

@media (max-width: 540px) {
  .cke_dialog {
    min-width: 94vw !important;
    max-width: 96vw !important;
  }
}

/* Isolate CKEditor layout tables from global DataTable / responsive table rules */
.cke_dialog td,
.cke_dialog th,
.cke_dialog .cke_dialog_ui_vbox_child,
.cke_dialog td.cke_dialog_ui_vbox_child,
.cke_dialog table,
.cke_dialog_contents table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: none !important;
  margin: 0 !important;
  background: transparent !important;
  width: auto !important;
  max-width: none !important;
  box-shadow: none !important;
}

.cke_dialog table td,
.cke_dialog table th,
.cke_dialog_contents table td,
.cke_dialog_contents table th {
  border: none !important;
  background: transparent !important;
  padding: 4px 6px !important;
  font-size: 13px !important;
  color: #1e293b !important;
  white-space: normal !important;
  line-height: normal !important;
}

.cke_dialog_ui_hbox_first,
.cke_dialog_ui_hbox_child,
.cke_dialog_ui_hbox_last {
  padding-right: 18px !important;
  padding-bottom: 8px !important;
  vertical-align: top !important;
}

/* Dialog Input & Select Styling */
.cke_dialog input.cke_dialog_ui_input_text,
.cke_dialog select.cke_dialog_ui_input_select,
.cke_dialog textarea.cke_dialog_ui_input_textarea {
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
  color: #0f172a !important;
  background-color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  outline: none !important;
  transition: all 0.15s ease !important;
  box-sizing: border-box !important;
}

.cke_dialog input.cke_dialog_ui_input_text:focus,
.cke_dialog select.cke_dialog_ui_input_select:focus,
.cke_dialog textarea.cke_dialog_ui_input_textarea:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.cke_dialog_ui_labeled_label {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  margin-bottom: 5px !important;
  display: block !important;
  line-height: 1.4 !important;
}

.cke_dialog_ui_vbox_child {
  padding-bottom: 8px !important;
}

.cke_dialog_close_button {
  top: 14px !important;
  right: 14px !important;
  opacity: 0.7 !important;
}
.cke_dialog_close_button:hover {
  opacity: 1 !important;
}

.cke_dialog_title {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  padding: 10px 14px !important;
}

.cke_dialog_footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
}

a.cke_dialog_ui_button_ok {
  background: #2563eb !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2) !important;
}

a.cke_dialog_ui_button_cancel {
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: #475569 !important;
}

/* CKEditor Modern Image Upload Dialog */
.cke_dialog_contents_body {
  padding: 16px 20px !important;
}

.cke_dialog_tabs {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 8px 14px 0 !important;
}

.cke_dialog_tab {
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  border-radius: 8px 8px 0 0 !important;
  padding: 7px 14px !important;
  margin-right: 4px !important;
  border: 1px solid transparent !important;
  border-bottom: none !important;
  background: transparent !important;
  transition: all 0.15s ease !important;
}

.cke_dialog_tab:hover {
  background: #f1f5f9 !important;
  color: #1e293b !important;
}

.cke_dialog_tab_selected {
  background: #ffffff !important;
  color: #0284c7 !important;
  border-color: #e2e8f0 !important;
  border-bottom: 2px solid #0284c7 !important;
  font-weight: 700 !important;
}

.cke_dialog_ui_file {
  height: auto !important;
  min-height: auto !important;
  margin-bottom: 10px !important;
  width: 100% !important;
}

.cke_dialog_ui_file label.cke_dialog_ui_labeled_label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  margin-bottom: 8px !important;
  display: block !important;
}

.cke_dialog_ui_fileButton {
  margin-top: 10px !important;
  clear: both !important;
  display: block !important;
}

a.cke_dialog_ui_fileButton,
.cke_dialog_ui_fileButton a.cke_dialog_ui_button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #0284c7 !important;
  color: #ffffff !important;
  padding: 8px 22px !important;
  border-radius: 8px !important;
  border: 1px solid #0284c7 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25) !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  outline: none !important;
  text-align: center !important;
}

a.cke_dialog_ui_fileButton:hover,
.cke_dialog_ui_fileButton a.cke_dialog_ui_button:hover {
  background: #0369a1 !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35) !important;
  transform: translateY(-1px) !important;
}

a.cke_dialog_ui_fileButton span,
.cke_dialog_ui_fileButton a.cke_dialog_ui_button span {
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  cursor: pointer !important;
  padding: 0 !important;
  text-shadow: none !important;
  background: transparent !important;
  border: none !important;
}

a.cke_dialog_ui_fileButton.cke_disabled,
.cke_dialog_ui_fileButton a.cke_dialog_ui_button.cke_disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.cke-autoresize-feedback {
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  margin-top: 10px !important;
  margin-bottom: 12px !important;
  clear: both !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   DASHBOARD STATIC ALERT & RECENT DISCUSSIONS
   ========================================================================== */
.broadcast-static-alert {
  background: #fffbeb !important;
  border: 1px solid #fde68a !important;
  transition: all 0.2s ease;
}

.broadcast-static-alert .broadcast-static-icon {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #d97706 !important;
}

.broadcast-static-alert .broadcast-static-badge {
  background: #fef3c7 !important;
  color: #92400e !important;
}

.broadcast-static-alert .broadcast-static-text {
  color: #78350f !important;
}

html[data-mode="dark"] .broadcast-static-alert,
body[data-mode="dark"] .broadcast-static-alert,
body.dark-theme .broadcast-static-alert,
[data-theme="dark"] .broadcast-static-alert {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

html[data-mode="dark"] .broadcast-static-alert .broadcast-static-icon,
body[data-mode="dark"] .broadcast-static-alert .broadcast-static-icon,
body.dark-theme .broadcast-static-alert .broadcast-static-icon {
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fbbf24 !important;
}

html[data-mode="dark"] .broadcast-static-alert .broadcast-static-badge,
body[data-mode="dark"] .broadcast-static-alert .broadcast-static-badge,
body.dark-theme .broadcast-static-alert .broadcast-static-badge {
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.3) !important;
}

html[data-mode="dark"] .broadcast-static-alert .broadcast-static-text,
body[data-mode="dark"] .broadcast-static-alert .broadcast-static-text,
body.dark-theme .broadcast-static-alert .broadcast-static-text {
  color: #fef3c7 !important;
}

/* Discussion Cards Dark Theme */
body[data-mode="dark"] .dashboard-diskusi-section .bg-white,
body.dark-theme .dashboard-diskusi-section .bg-white,
[data-theme="dark"] .dashboard-diskusi-section .bg-white {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

body[data-mode="dark"] .dashboard-diskusi-section .text-slate-900,
body.dark-theme .dashboard-diskusi-section .text-slate-900,
[data-theme="dark"] .dashboard-diskusi-section .text-slate-900 {
  color: #f8fafc !important;
}

body[data-mode="dark"] .dashboard-diskusi-section .text-slate-700,
body.dark-theme .dashboard-diskusi-section .text-slate-700,
[data-theme="dark"] .dashboard-diskusi-section .text-slate-700 {
  color: #cbd5e1 !important;
}

body[data-mode="dark"] .dashboard-diskusi-section .border-slate-100,
body.dark-theme .dashboard-diskusi-section .border-slate-100,
[data-theme="dark"] .dashboard-diskusi-section .border-slate-100 {
  border-color: #334155 !important;
}

body[data-mode="dark"] .dashboard-diskusi-section .bg-amber-50,
body.dark-theme .dashboard-diskusi-section .bg-amber-50,
[data-theme="dark"] .dashboard-diskusi-section .bg-amber-50 {
  background-color: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

body[data-mode="dark"] .dashboard-diskusi-section .bg-emerald-50,
body.dark-theme .dashboard-diskusi-section .bg-emerald-50,
[data-theme="dark"] .dashboard-diskusi-section .bg-emerald-50 {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #6ee7b7 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

body[data-mode="dark"] .dashboard-diskusi-section .bg-sky-50,
body.dark-theme .dashboard-diskusi-section .bg-sky-50,
[data-theme="dark"] .dashboard-diskusi-section .bg-sky-50 {
  background-color: rgba(14, 165, 233, 0.15) !important;
  color: #7dd3fc !important;
  border-color: rgba(14, 165, 233, 0.3) !important;
}

/* ==========================================================================
   CLEAN DISCUSSION ROLE BADGES (BERANDA & FORUM DISKUSI)
   Ultra-clean soft pastel capsules with high-contrast text and crisp icons
   ========================================================================== */
.diskusi-role-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 3.5px 10px !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.2px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
  transition: all 0.15s ease !important;
}

.diskusi-role-badge i {
  font-size: 10px !important;
  line-height: 1 !important;
}

/* 1. Admin Sekolah - Clean Royal Purple Soft Pill */
.diskusi-role-badge.badge-admin {
  background: #f5f3ff !important;
  color: #7c3aed !important;
  border: 1px solid #ddd6fe !important;
}
.diskusi-role-badge.badge-admin i {
  color: #7c3aed !important;
}
html[data-mode="dark"] .diskusi-role-badge.badge-admin {
  background: rgba(124, 58, 237, 0.18) !important;
  color: #c4b5fd !important;
  border: 1px solid rgba(124, 58, 237, 0.35) !important;
}
html[data-mode="dark"] .diskusi-role-badge.badge-admin i {
  color: #c4b5fd !important;
}

/* 2. Guru Pengampu - Clean Emerald Forest Soft Pill */
.diskusi-role-badge.badge-guru {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
}
.diskusi-role-badge.badge-guru i {
  color: #059669 !important;
}
html[data-mode="dark"] .diskusi-role-badge.badge-guru {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
}
html[data-mode="dark"] .diskusi-role-badge.badge-guru i {
  color: #6ee7b7 !important;
}

/* 3. Siswa - Clean Vibrant Azure Soft Pill */
.diskusi-role-badge.badge-siswa {
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
}
.diskusi-role-badge.badge-siswa i {
  color: #2563eb !important;
}
html[data-mode="dark"] .diskusi-role-badge.badge-siswa {
  background: rgba(37, 99, 235, 0.18) !important;
  color: #93c5fd !important;
  border: 1px solid rgba(37, 99, 235, 0.35) !important;
}
html[data-mode="dark"] .diskusi-role-badge.badge-siswa i {
  color: #93c5fd !important;
}

/* ==========================================================================
   MOBILE-FIRST SYSTEM & SOCIAL NOTIFICATIONS
   ========================================================================== */
.dropdown-menu-notif {
  width: 380px !important;
  min-width: 380px !important;
  max-width: 420px !important;
  background: #ffffff !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 45px -12px rgba(15, 23, 42, 0.18), 0 0 1px 1px rgba(15, 23, 42, 0.05) !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  z-index: 1050 !important;
}

@media (max-width: 639px) {
  .dropdown-menu-notif {
    position: fixed !important;
    top: 58px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    min-width: unset !important;
    max-width: unset !important;
    max-height: calc(85vh - 58px) !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35) !important;
  }
}

.notif-item {
  position: relative;
  text-decoration: none !important;
  transition: all 0.15s ease-in-out;
}

.notif-item.notif-unread {
  background-color: #f8fafc;
}

.notif-item.notif-unread:hover {
  background-color: #f1f5f9;
}

.notif-item.notif-read:hover {
  background-color: #f8fafc;
}

.notif-bell-badge {
  box-shadow: 0 0 0 2px #ffffff;
}

/* Dark Theme Support for Notifications */
body[data-mode="dark"] .dropdown-menu-notif,
body.dark-theme .dropdown-menu-notif,
[data-theme="dark"] .dropdown-menu-notif,
html[data-mode="dark"] .dropdown-menu-notif {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65) !important;
}

body[data-mode="dark"] .notif-header,
body.dark-theme .notif-header,
html[data-mode="dark"] .notif-header {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
}

body[data-mode="dark"] .notif-header-title,
body.dark-theme .notif-header-title,
html[data-mode="dark"] .notif-header-title {
  color: #94a3b8 !important;
}

body[data-mode="dark"] .notif-item,
body.dark-theme .notif-item,
html[data-mode="dark"] .notif-item {
  border-color: #1e293b !important;
  color: #e2e8f0 !important;
}

body[data-mode="dark"] .notif-item.notif-unread,
body.dark-theme .notif-item.notif-unread,
html[data-mode="dark"] .notif-item.notif-unread {
  background-color: rgba(30, 41, 59, 0.7) !important;
}

body[data-mode="dark"] .notif-item:hover,
body.dark-theme .notif-item:hover,
html[data-mode="dark"] .notif-item:hover {
  background-color: #1e293b !important;
}

body[data-mode="dark"] .notif-item-title,
body.dark-theme .notif-item-title,
html[data-mode="dark"] .notif-item-title {
  color: #f8fafc !important;
}

body[data-mode="dark"] .notif-item-text,
body.dark-theme .notif-item-text,
html[data-mode="dark"] .notif-item-text {
  color: #cbd5e1 !important;
}

body[data-mode="dark"] .notif-item-time,
body.dark-theme .notif-item-time,
html[data-mode="dark"] .notif-item-time {
  color: #94a3b8 !important;
}

body[data-mode="dark"] .notif-footer,
body.dark-theme .notif-footer,
html[data-mode="dark"] .notif-footer {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
}

body[data-mode="dark"] .notif-footer a,
body.dark-theme .notif-footer a,
html[data-mode="dark"] .notif-footer a {
  color: #94a3b8 !important;
}

body[data-mode="dark"] .notif-footer a:hover,
body.dark-theme .notif-footer a:hover,
html[data-mode="dark"] .notif-footer a:hover {
  color: #60a5fa !important;
}

body[data-mode="dark"] .notif-bell-badge,
body.dark-theme .notif-bell-badge,
html[data-mode="dark"] .notif-bell-badge {
  box-shadow: 0 0 0 2px #0f172a !important;
}







/* ==========================================================================
   WHATSAPP ACTION BADGE & ICON SYSTEM (DATA SISWA, DATA GURU, ALL TABLES)
   Restores and enhances WhatsApp icons across table and card viewports
   ========================================================================== */
.badge-whatsapp,
table td a.badge-whatsapp,
.table td a.badge-whatsapp,
table td a.badge.badge-whatsapp,
.table td a.badge.badge-whatsapp,
.table-responsive.is-siswa-table .badge-whatsapp,
.table-responsive.is-guru-table .badge-whatsapp,
.table-responsive.is-siswa-table.mode-card-view .badge-whatsapp,
.table-responsive.is-guru-table.mode-card-view .badge-whatsapp {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: #25D366 !important;
  background: #25D366 !important;
  color: #ffffff !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  margin: 0 0 0 6px !important;
  vertical-align: middle !important;
  box-shadow: 0 1px 3px rgba(37, 211, 102, 0.4) !important;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease !important;
  text-decoration: none !important;
  cursor: pointer !important;
  border: none !important;
  line-height: 1 !important;
}

.badge-whatsapp:hover,
table td a.badge-whatsapp:hover,
.table td a.badge-whatsapp:hover,
table td a.badge.badge-whatsapp:hover,
.table td a.badge.badge-whatsapp:hover,
.table-responsive.is-siswa-table .badge-whatsapp:hover,
.table-responsive.is-guru-table .badge-whatsapp:hover {
  background-color: #128C7E !important;
  background: #128C7E !important;
  color: #ffffff !important;
  transform: scale(1.15) !important;
  box-shadow: 0 2px 6px rgba(18, 140, 126, 0.5) !important;
}

/* WhatsApp Icon inside Badges & Links */
.badge-whatsapp i,
.badge-whatsapp .fa,
.badge-whatsapp .fa-whatsapp,
table td a.badge-whatsapp i,
table td a.badge-whatsapp .fa,
table td a.badge-whatsapp .fa-whatsapp,
table td a.badge.badge-whatsapp i,
table td a.badge.badge-whatsapp .fa,
table td a.badge.badge-whatsapp .fa-whatsapp,
.table-responsive.is-siswa-table .badge-whatsapp i,
.table-responsive.is-guru-table .badge-whatsapp i,
.table-responsive.is-siswa-table.mode-card-view .badge-whatsapp i,
.table-responsive.is-guru-table.mode-card-view .badge-whatsapp i {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #ffffff !important;
  font-family: FontAwesome !important;
  font-size: 13px !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle !important;
}

/* WhatsApp icon in dropdown menus, buttons, and links with text-success */
.dropdown-item .fa-whatsapp,
.dropdown-item i.fa-whatsapp,
.dropdown-menu .fa-whatsapp,
.btn-contact-act .fa-whatsapp,
.btn-outline-success .fa-whatsapp,
.text-success.fa-whatsapp,
.text-success > .fa-whatsapp,
i.fa-whatsapp.text-success,
a.dropdown-item i.fa-whatsapp {
  color: #25D366 !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-family: FontAwesome !important;
  font-size: 14px !important;
}

/* When badge contains both icon and text (e.g. temankelas) */
table td a.badge:has(.fa-whatsapp):not(.badge-whatsapp),
.table td a.badge:has(.fa-whatsapp):not(.badge-whatsapp) {
  display: inline-flex !important;
  align-items: center !important;
  background-color: #25D366 !important;
  color: #ffffff !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
}
table td a.badge:has(.fa-whatsapp):not(.badge-whatsapp) i,
.table td a.badge:has(.fa-whatsapp):not(.badge-whatsapp) i {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #ffffff !important;
  font-family: FontAwesome !important;
  font-size: 12px !important;
  margin-right: 4px !important;
}

/* Dark Mode Support for WhatsApp Action Badges */
html[data-mode="dark"] .badge-whatsapp,
html[data-mode="dark"] table td a.badge-whatsapp,
html[data-mode="dark"] .table td a.badge-whatsapp,
html[data-mode="dark"] .table-responsive.is-siswa-table .badge-whatsapp,
html[data-mode="dark"] .table-responsive.is-guru-table .badge-whatsapp {
  background-color: #25D366 !important;
  background: #25D366 !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
}
html[data-mode="dark"] .badge-whatsapp:hover,
html[data-mode="dark"] table td a.badge-whatsapp:hover,
html[data-mode="dark"] .table td a.badge-whatsapp:hover {
  background-color: #128C7E !important;
  background: #128C7E !important;
}


/* Kontak Bantuan Dropdown Stacking Context Guard */
.materi-detail-hero {
  overflow: visible !important;
  position: relative !important;
  z-index: 50 !important;
}
.materi-detail-meta-grid,
.detail-actions-group {
  overflow: visible !important;
}
.detail-actions-group .dropdown {
  position: relative !important;
  overflow: visible !important;
}
.materi-detail-hero .dropdown-menu {
  position: absolute !important;
  z-index: 1060 !important;
  background-color: #ffffff !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.2), 0 8px 10px -6px rgba(15, 23, 42, 0.1) !important;
}
.materi-detail-tabs-wrapper {
  position: relative !important;
  z-index: 10 !important;
}


/* Enhanced Materi Detail & Navigation Tabs Icons */
.materi-detail-tab-btn > i,
.materi-detail-tab-btn > .ti,
.materi-detail-tab-btn > .fa {
  font-size: 15px !important;
  margin-right: 7px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  line-height: 1 !important;
}
.materi-detail-tab-btn:not(.active) > i,
.materi-detail-tab-btn:not(.active) > .ti {
  color: #64748b !important;
  transition: color 0.15s ease !important;
}
.materi-detail-tab-btn:hover > i,
.materi-detail-tab-btn:hover > .ti {
  color: #0f172a !important;
}
.materi-detail-tab-btn.active > i,
.materi-detail-tab-btn.active > .ti {
  color: #ffffff !important;
}
html[data-mode="dark"] .materi-detail-tab-btn:not(.active) > i,
html[data-mode="dark"] .materi-detail-tab-btn:not(.active) > .ti {
  color: #94a3b8 !important;
}
html[data-mode="dark"] .materi-detail-tab-btn:hover > i,
html[data-mode="dark"] .materi-detail-tab-btn:hover > .ti {
  color: #f8fafc !important;
}
html[data-mode="dark"] .materi-detail-tab-btn.active > i,
html[data-mode="dark"] .materi-detail-tab-btn.active > .ti {
  color: #ffffff !important;
}


/* Materi Detail Edit Button (Admin & Creator) */
.detail-edit-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 4px 11px !important;
  border-radius: 8px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  background-color: #f59e0b !important;
  border: 1px solid #d97706 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.25) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-decoration: none !important;
  vertical-align: middle !important;
}
.detail-edit-btn:hover,
.detail-edit-btn:focus {
  background-color: #d97706 !important;
  border-color: #b45309 !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(245, 158, 11, 0.35) !important;
  transform: translateY(-1px);
}
.detail-edit-btn i,
.detail-edit-btn .ti {
  font-size: 12px !important;
  color: #ffffff !important;
  margin-right: 2px !important;
}
.btn-contact-act.btn-edit-act {
  color: #b45309 !important;
  border-color: #f59e0b !important;
  background-color: rgba(245, 158, 11, 0.08) !important;
}
.btn-contact-act.btn-edit-act i,
.btn-contact-act.btn-edit-act .ti {
  color: #d97706 !important;
}
.btn-contact-act.btn-edit-act:hover {
  background-color: #f59e0b !important;
  color: #ffffff !important;
  border-color: #f59e0b !important;
}
.btn-contact-act.btn-edit-act:hover i,
.btn-contact-act.btn-edit-act:hover .ti {
  color: #ffffff !important;
}
html[data-mode="dark"] .detail-edit-btn {
  background-color: #d97706 !important;
  border-color: #b45309 !important;
  color: #ffffff !important;
}
html[data-mode="dark"] .btn-contact-act.btn-edit-act {
  color: #fbbf24 !important;
  border-color: #d97706 !important;
  background-color: rgba(217, 119, 6, 0.15) !important;
}
html[data-mode="dark"] .btn-contact-act.btn-edit-act i {
  color: #fbbf24 !important;
}


/* ==========================================================================
   LBSOAL PILLS: MATERI vs NON-MATERI (STANDALONE) BADGES
   ========================================================================== */
.lbsoal-pill-materi {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  font-size: 11px !important;
  padding: 3px 8px !important;
  border-radius: 9999px !important;
}
.lbsoal-pill-standalone {
  background: #f5f3ff !important;
  color: #6d28d9 !important;
  border: 1px solid #ddd6fe !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  font-size: 11px !important;
  padding: 3px 8px !important;
  border-radius: 9999px !important;
}
html[data-mode="dark"] .lbsoal-pill-materi {
  background: rgba(37, 99, 235, 0.2) !important;
  color: #93c5fd !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
}
html[data-mode="dark"] .lbsoal-pill-standalone {
  background: rgba(124, 58, 237, 0.2) !important;
  color: #c4b5fd !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
}
.lbsoal-materi-link {
  font-size: 12px;
  margin-top: 3px;
  margin-bottom: 6px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}
.lbsoal-materi-link a {
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
}
.lbsoal-materi-link a:hover {
  text-decoration: underline;
}
html[data-mode="dark"] .lbsoal-materi-link {
  color: #94a3b8;
}
html[data-mode="dark"] .lbsoal-materi-link a {
  color: #60a5fa;
}


/* ==========================================================================
   MODERN ACADEMIC CBT & BUTIR SOAL ENHANCEMENT
   ========================================================================== */
.cbt-hero-card {
  background: var(--t-surface, #ffffff);
  border: 1px solid var(--t-surface-border, #e2e8f0);
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: visible !important;
  z-index: 25;
  transition: all 0.25s ease;
}
html[data-mode="dark"] .cbt-hero-card {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}

.cbt-search-bar-wrap {
  max-width: 600px;
}
.cbt-search-bar-wrap .input-group-addon {
  border-radius: 8px 0 0 8px !important;
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}
.cbt-search-bar-wrap .form-control {
  border-radius: 0 !important;
  border-color: #e2e8f0;
}
html[data-mode="dark"] .cbt-search-bar-wrap .input-group-addon {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}
html[data-mode="dark"] .cbt-search-bar-wrap .form-control {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.cbt-questions-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}

/* Question Card */
.cbt-question-card {
  background: var(--t-surface, #ffffff);
  border: 1px solid var(--t-surface-border, #e2e8f0);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}
.cbt-question-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
html[data-mode="dark"] .cbt-question-card {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .cbt-question-card:hover {
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3) !important;
}

/* Question Header */
.cbt-question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}
html[data-mode="dark"] .cbt-question-header {
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

.cbt-question-number {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
}
html[data-mode="dark"] .cbt-question-number {
  background: rgba(37, 99, 235, 0.2) !important;
  color: #93c5fd !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
}

.cbt-question-type-badge {
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}
html[data-mode="dark"] .cbt-question-type-badge {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.cbt-question-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Question Body */
.cbt-question-text {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--t-text-main, #0f172a);
  margin-bottom: 14px;
}
html[data-mode="dark"] .cbt-question-text {
  color: #f1f5f9 !important;
}

.cbt-question-media img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  margin-top: 8px;
  display: block;
}
html[data-mode="dark"] .cbt-question-media img {
  border-color: rgba(255, 255, 255, 0.12);
}
.cbt-question-media audio {
  max-width: 100%;
  margin-top: 8px;
}

/* Options Grid */
.cbt-options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.cbt-option-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
  position: relative;
}
.cbt-option-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
html[data-mode="dark"] .cbt-option-item {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .cbt-option-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.cbt-option-key {
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #475569;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
html[data-mode="dark"] .cbt-option-key {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}

.cbt-option-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  color: #334155;
  padding-top: 4px;
  word-break: break-word;
}
html[data-mode="dark"] .cbt-option-text {
  color: #e2e8f0 !important;
}

/* Correct Option Highlight */
.cbt-option-item.cbt-option-correct {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
}
.cbt-option-item.cbt-option-correct .cbt-option-key.key-correct {
  background: #16a34a !important;
  color: #ffffff !important;
}
.cbt-option-item.cbt-option-correct .cbt-option-text {
  color: #14532d !important;
  font-weight: 600 !important;
}
html[data-mode="dark"] .cbt-option-item.cbt-option-correct {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}
html[data-mode="dark"] .cbt-option-item.cbt-option-correct .cbt-option-text {
  color: #86efac !important;
}

.cbt-correct-tag {
  background: rgba(22, 163, 74, 0.15);
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.3);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  align-self: center;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}
html[data-mode="dark"] .cbt-correct-tag {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #86efac !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}

/* Question Footer */
.cbt-question-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
html[data-mode="dark"] .cbt-question-footer {
  border-top-color: rgba(255, 255, 255, 0.06) !important;
}

.cbt-kunci-pill {
  font-size: 12.5px;
  color: #475569;
}
html[data-mode="dark"] .cbt-kunci-pill {
  color: #94a3b8;
}

/* Essay Guidance Box */
.cbt-essay-key-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 14px;
}
.cbt-essay-key-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #166534;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.cbt-essay-key-content {
  font-size: 13.5px;
  color: #14532d;
  font-weight: 500;
  line-height: 1.6;
}
html[data-mode="dark"] .cbt-essay-key-box {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}
html[data-mode="dark"] .cbt-essay-key-title {
  color: #86efac !important;
}
html[data-mode="dark"] .cbt-essay-key-content {
  color: #d1fae5 !important;
}

/* Empty State */
.cbt-empty-state {
  background: var(--t-surface, #ffffff);
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  margin-bottom: 24px;
}
html[data-mode="dark"] .cbt-empty-state {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
.cbt-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  font-size: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
html[data-mode="dark"] .cbt-empty-icon {
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
}

/* Student CBT Exam (tes.php & tes/soal.php) Modernization */
.kontenopsi {
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  margin-bottom: 10px !important;
  padding: 12px 16px !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}
.kontenopsi:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}
.kontenopsi.border-success,
.kontenopsi.bg-light {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
}
.opsi {
  border-radius: 8px !important;
  min-width: 32px !important;
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  text-decoration: none !important;
}
html[data-mode="dark"] .kontenopsi {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .kontenopsi:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}
html[data-mode="dark"] .kontenopsi.border-success {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}

/* Responsive CBT Media Queries */
@media (max-width: 768px) {
  .cbt-hero-card {
    padding: 16px 18px !important;
    border-radius: 14px !important;
    margin-bottom: 18px !important;
  }
  .cbt-question-card {
    padding: 16px !important;
    border-radius: 14px !important;
  }
  .cbt-question-header {
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
  }
  .cbt-question-actions {
    width: 100% !important;
    display: flex !important;
    justify-content: flex-end !important;
    margin-top: 6px !important;
  }
  .cbt-option-item {
    padding: 10px 12px !important;
    gap: 10px !important;
    border-radius: 10px !important;
  }
  .cbt-option-key {
    min-width: 26px !important;
    height: 26px !important;
    font-size: 12px !important;
  }
  .cbt-option-text {
    font-size: 13.5px !important;
  }
  .cbt-correct-tag {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }
  .cbt-search-bar-wrap {
    max-width: 100% !important;
  }
}

@media (max-width: 480px) {
  .cbt-hero-card {
    padding: 14px !important;
  }
  .cbt-question-card {
    padding: 14px !important;
  }
  .cbt-option-item {
    padding: 8px 10px !important;
  }
}


/* ==========================================================================
   CBT STUDENT EXAM MODERN INTERFACE (2026 THEME)
   ========================================================================== */

.cbt-exam-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 15px 40px;
}

/* Question Main Card */
.cbt-soal-card {
  background: #ffffff !important;
  border-radius: 18px !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05) !important;
  overflow: hidden !important;
  transition: all 0.2s ease !important;
  margin-bottom: 24px !important;
}

.cbt-soal-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 22px !important;
  background: #f8fafc !important;
  border-bottom: 1.5px solid #e2e8f0 !important;
}

.cbt-soal-badge-no {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #0f172a !important;
  color: #ffffff !important;
  padding: 5px 14px !important;
  border-radius: 20px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.3px !important;
}

.cbt-soal-badge-type {
  display: inline-flex !important;
  align-items: center !important;
  background: #e0f2fe !important;
  color: #0369a1 !important;
  padding: 5px 12px !important;
  border-radius: 20px !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  margin-left: 8px !important;
}

.cbt-soal-tools {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.cbt-tool-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  font-size: 13px !important;
}

.cbt-tool-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

/* Question Body */
.cbt-soal-body {
  padding: 24px 28px !important;
  min-height: 340px !important;
}

.cbt-pertanyaan {
  font-size: 16px !important;
  line-height: 1.8 !important;
  color: #1e293b !important;
  font-weight: 450 !important;
  margin-bottom: 24px !important;
  word-break: break-word !important;
}

.cbt-pertanyaan img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 12px !important;
  margin: 14px 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

/* Options Container */
.cbt-options-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  margin-top: 18px !important;
}

.cbt-option-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
  padding: 14px 18px !important;
  border-radius: 14px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #ffffff !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  user-select: none !important;
}

.cbt-option-item:hover {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  transform: translateY(-1px) !important;
}

.cbt-option-item.selected {
  border-color: #10b981 !important;
  background: #f0fdf4 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.14) !important;
}

.cbt-option-letter {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  background: #f1f5f9 !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #475569 !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  flex-shrink: 0 !important;
  transition: all 0.18s ease !important;
}

.cbt-option-item:hover .cbt-option-letter {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

.cbt-option-item.selected .cbt-option-letter {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
}

.cbt-option-text {
  flex: 1 !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  color: #334155 !important;
  padding-top: 5px !important;
}

.cbt-option-item.selected .cbt-option-text {
  color: #064e3b !important;
  font-weight: 500 !important;
}

/* Bottom Controls */
.cbt-soal-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 22px !important;
  background: #f8fafc !important;
  border-top: 1.5px solid #e2e8f0 !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
}

.cbt-ragu-toggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 16px !important;
  border-radius: 10px !important;
  border: 1.5px solid #f59e0b !important;
  background: #fffbeb !important;
  color: #b45309 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  margin: 0 !important;
}

.cbt-ragu-toggle:hover {
  background: #fef3c7 !important;
}

.cbt-ragu-toggle input[type="checkbox"] {
  accent-color: #f59e0b !important;
  width: 16px !important;
  height: 16px !important;
  cursor: pointer !important;
}

/* Navigator Sidebar */
.cbt-nav-card {
  background: #ffffff !important;
  border-radius: 18px !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05) !important;
  overflow: hidden !important;
  position: sticky !important;
  top: 90px !important;
}

.cbt-nav-header {
  padding: 16px 18px !important;
  background: #f8fafc !important;
  border-bottom: 1.5px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.cbt-nav-title {
  font-weight: 700 !important;
  font-size: 15px !important;
  color: #0f172a !important;
  margin: 0 !important;
}

.cbt-nav-grid {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 8px !important;
  padding: 16px !important;
  max-height: 380px !important;
  overflow-y: auto !important;
}

.cbt-nav-btn {
  aspect-ratio: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #ffffff !important;
  color: #475569 !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  text-decoration: none !important;
  position: relative !important;
  transition: all 0.15s ease !important;
  padding: 2px !important;
}

.cbt-nav-btn:hover {
  border-color: #94a3b8 !important;
  background: #f8fafc !important;
  color: #0f172a !important;
}

.cbt-nav-btn.active {
  border-color: #2563eb !important;
  color: #2563eb !important;
  font-weight: 700 !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25) !important;
}

.cbt-nav-btn.answered {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
}

.cbt-nav-btn.unanswered .cbt-nav-sub {
  background-color: #cbd5e1 !important;
  color: #0f172a !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.cbt-nav-btn.answered .cbt-nav-sub {
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  background-color: #10b981 !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.cbt-nav-btn.ragu {
  background: #fffbeb !important;
  border-color: #f59e0b !important;
  color: #92400e !important;
}

.cbt-nav-btn.ragu .cbt-nav-sub {
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  background-color: #f59e0b !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.cbt-nav-legend {
  padding: 12px 16px !important;
  background: #f8fafc !important;
  border-top: 1.5px solid #e2e8f0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  font-size: 11.5px !important;
  color: #64748b !important;
  text-align: left !important;
}

.cbt-legend-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.cbt-legend-dot {
  width: 9px !important;
  height: 9px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}

/* Responsive CBT Layout */
@media (max-width: 768px) {
  .cbt-soal-header {
    padding: 12px 16px !important;
  }
  .cbt-soal-body {
    padding: 16px 16px !important;
  }
  .cbt-pertanyaan {
    font-size: 15px !important;
    line-height: 1.7 !important;
  }
  .cbt-option-item {
    padding: 12px 14px !important;
    gap: 10px !important;
  }
  .cbt-option-letter {
    width: 30px !important;
    height: 30px !important;
    font-size: 13px !important;
  }
  .cbt-option-text {
    font-size: 14px !important;
  }
  .cbt-soal-footer {
    padding: 12px 16px !important;
  }
  .cbt-nav-card {
    position: static !important;
    margin-top: 18px !important;
  }
}

/* UNIVERSAL INPUT GROUP FIX */
.input-group,
.modal .input-group,
.tab-pane .input-group,
.wizard .input-group {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  position: relative !important;
  width: 100% !important;
}

.input-group > .form-control:not(:last-child),
.modal .input-group > .form-control:not(:last-child),
.tab-pane .input-group > .form-control:not(:last-child),
.wizard .input-group > .form-control:not(:last-child) {
  border-top-left-radius: 8px !important;
  border-bottom-left-radius: 8px !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-right: 0 !important;
}

.input-group > .input-group-addon:last-child,
.modal .input-group > .input-group-addon:last-child,
.tab-pane .input-group > .input-group-addon:last-child,
.wizard .input-group > .input-group-addon:last-child {
  border-top-right-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-left: 1px solid #cbd5e1 !important;
}

.input-group > .input-group-addon:first-child,
.modal .input-group > .input-group-addon:first-child,
.tab-pane .input-group > .input-group-addon:first-child,
.wizard .input-group > .input-group-addon:first-child {
  border-top-left-radius: 8px !important;
  border-bottom-left-radius: 8px !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-right: 0 !important;
}

.input-group > .form-control:not(:first-child),
.modal .input-group > .form-control:not(:first-child),
.tab-pane .input-group > .form-control:not(:first-child),
.wizard .input-group > .form-control:not(:first-child) {
  border-top-right-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-left: 1px solid #cbd5e1 !important;
}

/* Dark mode CBT exam */
html[data-mode="dark"] .cbt-soal-card,
html[data-mode="dark"] .cbt-nav-card {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3) !important;
}

html[data-mode="dark"] .cbt-soal-header,
html[data-mode="dark"] .cbt-soal-footer,
html[data-mode="dark"] .cbt-nav-header,
html[data-mode="dark"] .cbt-nav-legend {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-mode="dark"] .cbt-soal-badge-no {
  background: #334155 !important;
}

html[data-mode="dark"] .cbt-pertanyaan {
  color: #f1f5f9 !important;
}

html[data-mode="dark"] .cbt-option-item {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-mode="dark"] .cbt-option-item:hover {
  background: #334155 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

html[data-mode="dark"] .cbt-option-item.selected {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: #10b981 !important;
}

html[data-mode="dark"] .cbt-option-text {
  color: #e2e8f0 !important;
}

html[data-mode="dark"] .cbt-option-item.selected .cbt-option-text {
  color: #a7f3d0 !important;
}

html[data-mode="dark"] .cbt-nav-btn {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
}

html[data-mode="dark"] .cbt-nav-btn.answered {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: #10b981 !important;
  color: #a7f3d0 !important;
}

html[data-mode="dark"] .cbt-nav-btn.ragu {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: #f59e0b !important;
  color: #fde68a !important;
}


/* ==========================================================================
   MOBILE-FIRST CBT EXAM SYSTEM (2026 THEME v91.0)
   ========================================================================== */

/* Progress Bar on Question Card */
.cbt-exam-progress-wrap {
  width: 100% !important;
  height: 5px !important;
  background: #e2e8f0 !important;
  overflow: hidden !important;
  border-top-left-radius: 16px !important;
  border-top-right-radius: 16px !important;
}

.cbt-exam-progress-bar {
  height: 100% !important;
  background: linear-gradient(90deg, #10b981, #059669) !important;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Option Checkmark Indicator */
.cbt-option-check {
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  background: #10b981 !important;
  color: #ffffff !important;
  font-size: 11px !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35) !important;
  animation: cbtCheckPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

.cbt-option-item.selected .cbt-option-check {
  display: inline-flex !important;
}

@keyframes cbtCheckPop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Mobile Sticky Bottom Action Dock */
.cbt-mobile-bottom-dock {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1040 !important;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-top: 1.5px solid rgba(226, 232, 240, 0.85) !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06) !important;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
}

.cbt-dock-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  max-width: 600px !important;
  margin: 0 auto !important;
}

.cbt-dock-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 42px !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}

.cbt-dock-prev {
  width: 44px !important;
  background: #f1f5f9 !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #334155 !important;
}

.cbt-dock-prev:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

.cbt-dock-ragu {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 42px !important;
  padding: 0 12px !important;
  border-radius: 12px !important;
  background: #fffbeb !important;
  border: 1.5px solid #f59e0b !important;
  color: #b45309 !important;
  font-weight: 600 !important;
  font-size: 12.5px !important;
  cursor: pointer !important;
  margin: 0 !important;
  user-select: none !important;
  transition: all 0.15s ease !important;
}

.cbt-dock-ragu.active {
  background: #f59e0b !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

.cbt-dock-sheet-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 42px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  background: #eff6ff !important;
  border: 1.5px solid #93c5fd !important;
  color: #1d4ed8 !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.cbt-dock-sheet-btn:hover {
  background: #dbeafe !important;
}

.cbt-dock-next {
  padding: 0 18px !important;
  background: #2563eb !important;
  color: #ffffff !important;
  border: 1px solid #1d4ed8 !important;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.28) !important;
}

.cbt-dock-next:hover {
  background: #1d4ed8 !important;
  color: #ffffff !important;
}

.cbt-dock-finish {
  padding: 0 18px !important;
  background: #10b981 !important;
  color: #ffffff !important;
  border: 1px solid #059669 !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3) !important;
}

.cbt-dock-finish:hover {
  background: #059669 !important;
  color: #ffffff !important;
}

/* Bottom Sheet Modal for Mobile Navigation */
.cbt-bottom-sheet .modal-dialog {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  transform: translate3d(0, 100%, 0) !important;
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1) !important;
}

.cbt-bottom-sheet.show .modal-dialog,
.cbt-bottom-sheet.in .modal-dialog {
  transform: translate3d(0, 0, 0) !important;
}

.cbt-bottom-sheet .modal-content {
  border-top-left-radius: 24px !important;
  border-top-right-radius: 24px !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border: none !important;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2) !important;
  max-height: 85vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

.cbt-sheet-handle-wrap {
  display: flex !important;
  justify-content: center !important;
  padding: 10px 0 4px !important;
  cursor: pointer !important;
}

.cbt-sheet-handle {
  width: 44px !important;
  height: 5px !important;
  border-radius: 3px !important;
  background: #cbd5e1 !important;
}

.cbt-sheet-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 8px 20px 14px !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.cbt-sheet-body {
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.cbt-sheet-grid {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 10px !important;
  max-height: 48vh !important;
  overflow-y: auto !important;
  padding: 4px !important;
}

/* Header Trigger Button */
.cbt-btn-open-nav {
  border-radius: 20px !important;
  font-weight: 600 !important;
  padding: 4px 12px !important;
  border-color: #2563eb !important;
  color: #2563eb !important;
}

/* Responsive Visibility Controls */
@media (max-width: 768px) {
  .cbt-soal-footer {
    display: none !important;
  }
  .main-content, #loader-soal {
    padding-bottom: 85px !important;
  }
  #listno {
    display: none !important;
  }
  .cbt-btn-open-nav {
    display: inline-flex !important;
    align-items: center !important;
  }
  .cbt-mobile-bottom-dock {
    display: block !important;
  }
}

@media (min-width: 769px) {
  .cbt-btn-open-nav {
    display: none !important;
  }
  .cbt-mobile-bottom-dock {
    display: none !important;
  }
  #modal-nomor-soal {
    display: none !important;
  }
  #listno {
    display: block !important;
  }
}

/* Dark Mode CBT Mobile Components */
html[data-mode="dark"] .cbt-exam-progress-wrap {
  background: #334155 !important;
}

html[data-mode="dark"] .cbt-mobile-bottom-dock {
  background: rgba(15, 23, 42, 0.94) !important;
  border-top-color: #334155 !important;
}

html[data-mode="dark"] .cbt-dock-prev {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .cbt-dock-prev:hover {
  background: #334155 !important;
  color: #ffffff !important;
}

html[data-mode="dark"] .cbt-dock-ragu {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: #f59e0b !important;
  color: #fde68a !important;
}

html[data-mode="dark"] .cbt-dock-ragu.active {
  background: #f59e0b !important;
  color: #000000 !important;
}

html[data-mode="dark"] .cbt-dock-sheet-btn {
  background: rgba(37, 99, 235, 0.18) !important;
  border-color: rgba(37, 99, 235, 0.4) !important;
  color: #93c5fd !important;
}

html[data-mode="dark"] .cbt-dock-sheet-btn:hover {
  background: rgba(37, 99, 235, 0.3) !important;
}

html[data-mode="dark"] .cbt-bottom-sheet .modal-content {
  background: #1e293b !important;
  color: #f1f5f9 !important;
}

html[data-mode="dark"] .cbt-sheet-header {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-mode="dark"] .cbt-sheet-handle {
  background: #475569 !important;
}

html[data-mode="dark"] .cbt-btn-open-nav {
  border-color: #60a5fa !important;
  color: #60a5fa !important;
}


/* ==========================================================================
   CBT MOBILE CLEAN & ULTRA-POLISHED REFINEMENT (v92.0)
   ========================================================================== */

/* Toast Message Positioning (Never Overlap Bottom Action Dock) */
.toast {
  bottom: 82px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 1060 !important;
  border-radius: 20px !important;
  padding: 8px 18px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  background: rgba(15, 23, 42, 0.94) !important;
  color: #ffffff !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* CBT Topbar Timer Badge */
.cbt-timer-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 12px !important;
  background: #fffbeb !important;
  border: 1px solid #fde68a !important;
  border-radius: 20px !important;
  color: #92400e !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

html[data-mode="dark"] .cbt-timer-badge {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
}

/* CBT Card Header: Single Clean Row */
.cbt-soal-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 18px !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  min-height: 48px !important;
  flex-wrap: nowrap !important;
}

.cbt-header-left {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.cbt-soal-badge-no {
  background: #0f172a !important;
  color: #ffffff !important;
  padding: 4px 12px !important;
  border-radius: 16px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.cbt-soal-total {
  opacity: 0.65 !important;
  font-weight: 400 !important;
  font-size: 11.5px !important;
}

.cbt-soal-badge-type {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1d4ed8 !important;
  padding: 3px 10px !important;
  border-radius: 16px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
}

/* Card Body & Option Layout */
.cbt-options-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin-top: 14px !important;
}

.cbt-option-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 11px 16px !important;
  border-radius: 14px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #ffffff !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  min-height: 48px !important;
}

.cbt-option-item:hover {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
}

.cbt-option-item.selected {
  border-color: #10b981 !important;
  background: #f0fdf4 !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.12) !important;
}

.cbt-option-letter {
  width: 32px !important;
  height: 32px !important;
  border-radius: 9px !important;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: all 0.15s ease !important;
}

.cbt-option-item.selected .cbt-option-letter {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3) !important;
}

.cbt-option-text {
  flex: 1 !important;
  font-size: 14.5px !important;
  line-height: 1.55 !important;
  color: #1e293b !important;
  padding: 0 !important;
}

.cbt-option-item.selected .cbt-option-text {
  color: #064e3b !important;
  font-weight: 600 !important;
}

.cbt-option-check {
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: #10b981 !important;
  color: #ffffff !important;
  font-size: 11px !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
}

.cbt-option-item.selected .cbt-option-check {
  display: flex !important;
}

/* Mobile Bottom Action Dock Refinements */
.cbt-mobile-bottom-dock {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1040 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.07) !important;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
}

.cbt-dock-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  max-width: 520px !important;
  margin: 0 auto !important;
}

.cbt-dock-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 44px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  user-select: none !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
  box-sizing: border-box !important;
  border: 1px solid transparent !important;
}

.cbt-dock-prev {
  width: 44px !important;
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
  flex-shrink: 0 !important;
}

.cbt-dock-prev.disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.cbt-dock-ragu {
  padding: 0 14px !important;
  background: #fffbeb !important;
  border: 1.5px solid #fde68a !important;
  color: #b45309 !important;
  gap: 6px !important;
}

.cbt-dock-ragu.active {
  background: #f59e0b !important;
  border-color: #d97706 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35) !important;
}

.cbt-dock-sheet-btn {
  padding: 0 14px !important;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  flex: 1 !important;
  max-width: 140px !important;
}

.cbt-dock-sheet-btn:hover {
  background: #e2e8f0 !important;
}

.cbt-dock-next {
  padding: 0 20px !important;
  background: #2563eb !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.28) !important;
}

.cbt-dock-next:hover {
  background: #1d4ed8 !important;
  color: #ffffff !important;
}

.cbt-dock-finish {
  padding: 0 20px !important;
  background: #10b981 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3) !important;
}

/* Mobile Screen Margins and Width Optimization */
@media (max-width: 768px) {
  .main-content {
    padding: 8px 6px 95px !important;
  }
  #loader-soal {
    margin: 0 !important;
  }
  #loader-soal > div[class*="col-"] {
    padding: 0 4px !important;
  }
  .cbt-soal-card {
    margin-bottom: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05) !important;
  }
  .cbt-soal-body {
    padding: 16px 14px 20px !important;
    min-height: auto !important;
  }
  .cbt-pertanyaan {
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin-bottom: 14px !important;
  }
}

/* Dark Mode CBT Clean Polish */
html[data-mode="dark"] .cbt-mobile-bottom-dock {
  background: rgba(15, 23, 42, 0.96) !important;
  border-top-color: #334155 !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3) !important;
}

html[data-mode="dark"] .cbt-dock-prev {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .cbt-dock-sheet-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

html[data-mode="dark"] .cbt-dock-ragu {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
}

html[data-mode="dark"] .cbt-dock-ragu.active {
  background: #f59e0b !important;
  border-color: #d97706 !important;
  color: #000000 !important;
}

/* ==========================================================================
   CBT MOBILE & DESKTOP ULTRA-CLEAN POLISH (v93.0)
   - Topbar: Clean horizontal alignment, prominent timer pill, mode toggle, avatar
   - Card Header: Guaranteed single row, badges left, zoom controls right
   - Toast: Floating modern capsule 84px above the bottom dock
   - Bottom Dock: Perfectly balanced buttons with matching heights
   ========================================================================== */

/* 1. TOPBAR & TIMER PILL */
header.topbar .topbar-right {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  height: auto !important;
  float: none !important;
}

header.topbar .topbar-right > ul.topbar-btns {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  float: none !important;
}

#cbtTimerWidget,
.cbt-timer-widget {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 4px 12px !important;
  height: 34px !important;
  line-height: 1 !important;
  background: #fffbeb !important;
  border: 1.5px solid #fde68a !important;
  border-radius: 9999px !important;
  color: #92400e !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  margin: 0 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

html[data-mode="dark"] #cbtTimerWidget,
html[data-mode="dark"] .cbt-timer-widget {
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}

#cbtTimerWidget .ti-timer {
  font-size: 13px !important;
  color: #d97706 !important;
  display: inline-block !important;
  line-height: 1 !important;
  margin: 0 !important;
}

html[data-mode="dark"] #cbtTimerWidget .ti-timer {
  color: #fbbf24 !important;
}

#cbtTimerWidget #timer {
  display: inline-flex !important;
  align-items: center !important;
  font-family: inherit !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: inherit !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

#cbtTimerWidget #timer span {
  display: inline !important;
  font-family: inherit !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: inherit !important;
  line-height: 1 !important;
}

/* 2. CARD HEADER: GUARANTEED SINGLE ROW */
.cbt-soal-header,
.card-header.cbt-soal-header,
header.card-header.cbt-soal-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  padding: 10px 16px !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  min-height: 50px !important;
}

html[data-mode="dark"] .cbt-soal-header,
html[data-mode="dark"] .card-header.cbt-soal-header {
  background: rgba(15, 23, 42, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.cbt-header-left {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  width: auto !important;
  flex-shrink: 0 !important;
}

.cbt-soal-tools {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  width: auto !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}

.cbt-tool-btn {
  width: 32px !important;
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #64748b !important;
  font-size: 13px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.cbt-tool-btn:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

html[data-mode="dark"] .cbt-tool-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

html[data-mode="dark"] .cbt-tool-btn:hover {
  background: #334155 !important;
  color: #f1f5f9 !important;
}

/* 3. FLOATING TOAST NOTIFICATION (ABOVE BOTTOM DOCK) */
.toast {
  position: fixed !important;
  bottom: 84px !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(20px) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.25s ease, transform 0.25s ease !important;
  z-index: 1060 !important;
  border-radius: 9999px !important;
  padding: 10px 22px !important;
  background: rgba(15, 23, 42, 0.92) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  color: #f8fafc !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.2px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
  text-align: center !important;
  max-width: 90% !important;
  min-width: 220px !important;
}

.toast.reveal {
  transform: translateX(-50%) translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.toast .text {
  margin-right: 0 !important;
  white-space: normal !important;
  font-size: 13px !important;
  color: #f8fafc !important;
}

.toast .action {
  display: none !important;
}

/* 4. BOTTOM DOCK UNIFORMITY */
.cbt-mobile-bottom-dock {
  height: 68px !important;
  padding: 10px 14px 14px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  backdrop-filter: blur(16px) !important;
  border-top: 1px solid #e2e8f0 !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06) !important;
}

.cbt-dock-btn {
  height: 44px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: all 0.15s ease !important;
}

.cbt-dock-prev {
  width: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #64748b !important;
}

.cbt-dock-ragu {
  padding: 0 14px !important;
  background: #fffbeb !important;
  border: 1.5px solid #fde68a !important;
  color: #b45309 !important;
}

.cbt-dock-ragu.active {
  background: #f59e0b !important;
  border-color: #d97706 !important;
  color: #ffffff !important;
}

.cbt-dock-sheet-btn {
  padding: 0 14px !important;
  background: #f1f5f9 !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #1e293b !important;
}

.cbt-dock-next,
.cbt-dock-finish {
  padding: 0 18px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
}

/* Guaranteed Single Row for Card Header on Mobile */
.cbt-header-left {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  width: fit-content !important;
  max-width: 65% !important;
  flex: 0 0 auto !important;
}

.cbt-soal-tools {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  width: fit-content !important;
  max-width: 35% !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
}

/* Guaranteed Single Line for Bottom Dock Sheet Button */
.cbt-dock-sheet-btn {
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.cbt-dock-sheet-num {
  white-space: nowrap !important;
  display: inline-block !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}


/* ==========================================================================
   CBT FULLSCREEN LAYOUT (tes.php): ZERO SIDEBAR OFFSET & PERFECT CENTERING
   ========================================================================== */
body.cbt-exam-page,
body.no-sidebar {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 100% !important;
}

body.cbt-exam-page .topbar,
body.cbt-exam-page main,
body.cbt-exam-page .main-container,
body.no-sidebar .topbar,
body.no-sidebar main,
body.no-sidebar .main-container {
  margin-left: 0 !important;
  margin-right: 0 !important;
  left: 0 !important;
  width: 100% !important;
}

body.cbt-exam-page .topbar {
  padding-left: 28px !important;
  padding-right: 28px !important;
  width: 100% !important;
}

body.cbt-exam-page .main-content {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 1240px !important;
  padding: 24px 20px 40px !important;
  width: 100% !important;
}

body.cbt-exam-page #loader-soal {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 1240px !important;
  width: 100% !important;
}



/* ==========================================================================
   CBT TOPBAR BRAND & HEADER POLISH
   ========================================================================== */
.cbt-brand-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  text-decoration: none !important;
  user-select: none;
}

.cbt-brand-icon-box {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  border-radius: 10px !important;
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.28) !important;
  color: #059669 !important;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.08) !important;
  flex-shrink: 0 !important;
}

.cbt-brand-svg {
  width: 18px !important;
  height: 18px !important;
  stroke: #059669 !important;
  flex-shrink: 0 !important;
}

.cbt-brand-text {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.cbt-brand-title {
  margin: 0 !important;
  padding: 0 !important;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #059669 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.cbt-status-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 2.5px 8px !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  border-radius: 9999px !important;
  background: rgba(16, 185, 129, 0.1) !important;
  color: #047857 !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.cbt-pulse-dot {
  display: inline-block !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background-color: #10b981 !important;
  box-shadow: 0 0 4px #10b981 !important;
}

@media (max-width: 640px) {
  .cbt-brand-badge {
    gap: 8px !important;
  }
  .cbt-brand-icon-box {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    border-radius: 8px !important;
  }
  .cbt-brand-svg {
    width: 15px !important;
    height: 15px !important;
  }
  .cbt-brand-title {
    font-size: 0.95rem !important;
  }
  .cbt-status-pill {
    padding: 2px 6px !important;
    font-size: 9.5px !important;
  }
}

html[data-mode="dark"] .cbt-brand-icon-box {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  color: #34d399 !important;
}

html[data-mode="dark"] .cbt-brand-svg {
  stroke: #34d399 !important;
}

html[data-mode="dark"] .cbt-brand-title {
  color: #34d399 !important;
}

html[data-mode="dark"] .cbt-status-pill {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}



/* ==========================================================================
   MODERN & CLEAN SUMMERNOTE TOOLBAR & EDITOR
   ========================================================================== */
.note-editor.note-frame {
  border: 1px solid var(--t-surface-border, #cbd5e1) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: var(--t-surface-card, #ffffff) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.note-editor.note-frame:focus-within {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

.note-editor .note-toolbar {
  background: var(--t-surface-subtle, #f8fafc) !important;
  border-bottom: 1px solid var(--t-surface-border, #e2e8f0) !important;
  padding: 8px 10px !important;
  margin: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px !important;
}

/* Group buttons into sleek segmented pills */
.note-editor .note-toolbar .note-btn-group,
.note-editor .note-toolbar .btn-group {
  display: inline-flex !important;
  align-items: center !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 2px !important;
  margin: 0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

/* Modern flat toolbar button */
.note-editor .note-toolbar .note-btn {
  background: transparent !important;
  border: none !important;
  border-radius: 6px !important;
  color: #475569 !important;
  padding: 4px 8px !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  min-height: 28px !important;
  margin: 0 !important;
  box-shadow: none !important;
  transition: all 0.15s ease !important;
}

.note-editor .note-toolbar .note-btn:hover {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #059669 !important;
}

.note-editor .note-toolbar .note-btn.active,
.note-editor .note-toolbar .note-btn:active {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #059669 !important;
  font-weight: 600 !important;
}

/* Fix color dropdown split button */
.note-editor .note-color .note-btn {
  border-radius: 6px !important;
}

.note-editor .note-color .note-color-select-btn {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.note-editor .note-color .dropdown-toggle {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
}

/* Editable text area */
.note-editor .note-editing-area {
  background: var(--t-surface-card, #ffffff) !important;
}

.note-editor .note-editable {
  background: transparent !important;
  color: var(--t-text-main, #0f172a) !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
  padding: 14px 16px !important;
  font-family: inherit !important;
}

.note-editor .note-placeholder {
  color: #94a3b8 !important;
  padding: 14px 16px !important;
  font-size: 14px !important;
}

.note-editor .note-statusbar {
  background: var(--t-surface-subtle, #f8fafc) !important;
  border-top: 1px solid var(--t-surface-border, #e2e8f0) !important;
}

/* Dark mode for Summernote */
html[data-mode="dark"] .note-editor.note-frame {
  border-color: #334155 !important;
  background: #0f172a !important;
}

html[data-mode="dark"] .note-editor .note-toolbar {
  background: #1e293b !important;
  border-color: #334155 !important;
}

html[data-mode="dark"] .note-editor .note-toolbar .note-btn-group,
html[data-mode="dark"] .note-editor .note-toolbar .btn-group {
  background: #0f172a !important;
  border-color: #334155 !important;
}

html[data-mode="dark"] .note-editor .note-toolbar .note-btn {
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .note-editor .note-toolbar .note-btn:hover {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
}

html[data-mode="dark"] .note-editor .note-toolbar .note-btn.active {
  background: rgba(16, 185, 129, 0.3) !important;
  color: #34d399 !important;
}

html[data-mode="dark"] .note-editor .note-editable {
  color: #f1f5f9 !important;
}

html[data-mode="dark"] .note-editor .note-placeholder {
  color: #64748b !important;
}

html[data-mode="dark"] .note-editor .note-statusbar {
  background: #1e293b !important;
  border-color: #334155 !important;
}

html[data-mode="dark"] .note-editor .note-dropdown-menu {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

html[data-mode="dark"] .note-editor .note-dropdown-menu a {
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .note-editor .note-dropdown-menu a:hover {
  background: #334155 !important;
  color: #ffffff !important;
}

/* Dark mode for Materi headings */
html[data-mode="dark"] .materi-detail-card h1,
html[data-mode="dark"] .materi-detail-card h2,
html[data-mode="dark"] .materi-detail-card h3,
html[data-mode="dark"] .materi-detail-card h4,
html[data-mode="dark"] .materi-detail-card h5,
html[data-mode="dark"] .materi-detail-card h6 {
  color: #f1f5f9 !important;
}

/* Modern Detail Tabs Responsive & Touch-Friendly */
.materi-tabs-scroll-outer {
  position: relative !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
}

.materi-detail-tabs-wrapper {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x !important;
  scroll-behavior: smooth !important;
  overscroll-behavior-x: contain !important;
  scrollbar-width: none !important;
  gap: 8px !important;
  padding: 6px 8px !important;
  border-radius: 14px !important;
  position: relative !important;
  z-index: 10 !important;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.materi-detail-tabs-wrapper.is-dragging {
  cursor: grabbing !important;
  scroll-behavior: auto !important;
}
.materi-detail-tabs-wrapper::-webkit-scrollbar {
  display: none !important;
}

.tab-scroll-btn {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 25 !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #334155 !important;
  font-size: 13px !important;
  cursor: pointer !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease !important;
  padding: 0 !important;
}
.tab-scroll-btn:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  transform: translateY(-50%) scale(1.1) !important;
}
.tab-scroll-btn.is-visible {
  opacity: 0.95 !important;
  pointer-events: auto !important;
}
.tab-scroll-prev {
  left: -8px !important;
}
.tab-scroll-next {
  right: -8px !important;
}
html[data-mode="dark"] .tab-scroll-btn {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}
html[data-mode="dark"] .tab-scroll-btn:hover {
  background: #334155 !important;
  color: #ffffff !important;
}

.materi-detail-tab-btn {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: max-content !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 9px 15px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  line-height: 1.4 !important;
  overflow: visible !important;
}

.materi-detail-tab-btn > i,
.materi-detail-tab-btn > .ti,
.materi-detail-tab-btn > .fa {
  font-size: 14.5px !important;
  margin-right: 5px !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

@media (max-width: 576px) {
  /* 1. Hero Container */
  .materi-detail-hero {
    padding: 13px 13px 12px 13px !important;
    border-radius: 14px !important;
    margin-bottom: 12px !important;
  }
  
  /* 2. Top Navigation & Badges */
  .detail-top-nav {
    margin-bottom: 9px !important;
    padding-bottom: 8px !important;
    gap: 6px !important;
  }
  .detail-back-btn {
    font-size: 11px !important;
    padding: 4px 9px !important;
    border-radius: 7px !important;
  }
  .detail-top-badges {
    gap: 4px !important;
    flex-wrap: wrap !important;
  }
  .detail-top-badges .detail-edit-btn {
    display: none !important; /* Hide duplicate edit button on mobile */
  }
  .materi-hero-code,
  .materi-hero-period {
    font-size: 10px !important;
    padding: 2.5px 6px !important;
    border-radius: 6px !important;
  }
  .materi-status-pill {
    font-size: 9.5px !important;
    padding: 2.5px 6px !important;
    border-radius: 6px !important;
  }

  /* 3. Title & Mapel Typography */
  .materi-detail-hero .text-primary.text-uppercase {
    font-size: 10.5px !important;
    margin-bottom: 2px !important;
    letter-spacing: 0.4px !important;
  }
  .materi-detail-title {
    font-size: 15px !important;
    line-height: 1.35 !important;
    font-weight: 800 !important;
    margin-bottom: 4px !important;
    letter-spacing: -0.01em !important;
  }
  .materi-detail-hero .text-muted.fs-12 {
    font-size: 11px !important;
    line-height: 1.35 !important;
  }

  /* 4. Metadata Grid & Contact Buttons */
  .materi-detail-meta-grid {
    margin-top: 9px !important;
    padding-top: 9px !important;
    gap: 7px !important;
  }
  .detail-meta-group {
    gap: 5px !important;
  }
  .detail-meta-item {
    font-size: 11px !important;
    line-height: 1.3 !important;
  }
  .detail-meta-item i {
    font-size: 11.5px !important;
  }
  .meta-dot {
    font-size: 9px !important;
  }
  .detail-actions-group {
    gap: 5px !important;
  }
  .btn-contact-act {
    font-size: 11px !important;
    padding: 4px 8px !important;
    border-radius: 7px !important;
  }

  /* 5. Navigation Tabs */
  .materi-detail-tabs-wrapper {
    margin-top: 12px !important;
    margin-bottom: 14px !important;
    padding: 4px 5px !important;
    gap: 5px !important;
    border-radius: 12px !important;
  }
  .materi-detail-tab-btn {
    padding: 7px 11px !important;
    font-size: 12px !important;
    border-radius: 9px !important;
    gap: 5px !important;
  }
  .materi-detail-tab-btn > i,
  .materi-detail-tab-btn > .ti,
  .materi-detail-tab-btn > .fa {
    font-size: 13px !important;
    margin-right: 3px !important;
  }
  .detail-tab-counter {
    padding: 1.5px 5px !important;
    font-size: 9.5px !important;
    margin-left: 3px !important;
  }

  /* 6. Content Cards */
  .materi-detail-card {
    border-radius: 14px !important;
    margin-bottom: 14px !important;
  }
  .materi-detail-card-header {
    padding: 10px 13px !important;
  }
  .detail-card-title {
    font-size: 13.5px !important;
    font-weight: 700 !important;
  }
  .detail-card-title i,
  .detail-card-title .ti {
    font-size: 13.5px !important;
  }
  .detail-card-title-wrap span.text-muted {
    font-size: 10px !important;
  }
  .materi-detail-card-body {
    padding: 12px 13px !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
  }
  .materi-detail-card-body p,
  .materi-detail-card-body ol,
  .materi-detail-card-body ul,
  .materi-detail-card-body li {
    font-size: 13px !important;
    line-height: 1.55 !important;
  }
  .clean-materi-list,
  .indikator-content ol,
  .materi-detail-card-body ol {
    padding-left: 20px !important;
    margin-top: 6px !important;
    margin-bottom: 10px !important;
  }
  .clean-materi-list li,
  .indikator-content ol li,
  .materi-detail-card-body ol li {
    margin-bottom: 6px !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
    padding-left: 4px !important;
  }
}

/* Clean Semantic Numbered & Bulleted Lists */
.indikator-content ol,
.materi-detail-card-body ol,
.materi-article-content ol,
.tugas-content ol,
.clean-materi-list {
  padding-left: 24px !important;
  margin-top: 8px !important;
  margin-bottom: 12px !important;
  list-style-type: decimal !important;
}

.indikator-content ol li,
.materi-detail-card-body ol li,
.materi-article-content ol li,
.tugas-content ol li,
.clean-materi-list li {
  margin-bottom: 8px !important;
  line-height: 1.65 !important;
  padding-left: 6px !important;
  color: var(--t-text-main, #1e293b) !important;
}

.indikator-content ul,
.materi-detail-card-body ul,
.materi-article-content ul,
.tugas-content ul {
  padding-left: 22px !important;
  margin-top: 8px !important;
  margin-bottom: 12px !important;
  list-style-type: disc !important;
}

.indikator-content ul li,
.materi-detail-card-body ul li,
.materi-article-content ul li,
.tugas-content ul li {
  margin-bottom: 6px !important;
  line-height: 1.65 !important;
  padding-left: 4px !important;
}

html[data-mode="dark"] .clean-materi-list li,
html[data-mode="dark"] .indikator-content ol li,
html[data-mode="dark"] .materi-detail-card-body ol li {
  color: #f1f5f9 !important;
}


/* ==========================================================================
   GLOBAL & CBT ARABIC TYPOGRAPHY SUPPORT
   ========================================================================== */
@font-face {
  font-family: 'litelpmq';
  src: url('../../dashboard/fonts/litelpmq.woff2') format('woff2'),
       url('../dashboard/fonts/litelpmq.woff2') format('woff2'),
       url('./fonts/litelpmq.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --app-font-arabic: 'litelpmq', 'Amiri', 'Scheherazade New', 'Noto Naskh Arabic', 'Traditional Arabic', serif;
}

.is-arabic,
.arabic-text,
[dir="rtl"] {
  font-family: var(--app-font-arabic) !important;
  line-height: 2.25 !important;
  letter-spacing: normal !important;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
}

.cbt-pertanyaan.is-arabic,
.cbt-pertanyaan[dir="rtl"],
.cbt-question-text.is-arabic,
.cbt-question-text[dir="rtl"] {
  direction: rtl !important;
  text-align: right !important;
  font-family: var(--app-font-arabic) !important;
  font-size: 1.35em !important;
  line-height: 2.3 !important;
}

.cbt-pertanyaan .arabic-inline,
.cbt-option-text .arabic-inline,
.cbt-question-text .arabic-inline,
.arabic-inline {
  font-family: var(--app-font-arabic) !important;
  font-size: 1.3em !important;
  line-height: 2.2 !important;
  direction: rtl !important;
  unicode-bidi: isolate !important;
  display: inline-block !important;
  letter-spacing: normal !important;
  margin: 0 3px !important;
  vertical-align: middle !important;
}

.cbt-option-text.is-arabic,
.cbt-option-text[dir="rtl"] {
  direction: rtl !important;
  text-align: right !important;
  font-family: var(--app-font-arabic) !important;
  font-size: 1.3em !important;
  line-height: 2.2 !important;
  width: 100% !important;
}

.cbt-option-item.has-arabic {
  align-items: center !important;
}

textarea#jawaban.is-arabic,
textarea#jawaban[dir="rtl"] {
  font-family: var(--app-font-arabic) !important;
  font-size: 1.25em !important;
  line-height: 2 !important;
  direction: rtl !important;
  text-align: right !important;
  padding: 14px 18px !important;
}
/* ==========================================================================
   ARABIC & RTL QUESTION BANK TYPOGRAPHY
   ========================================================================== */
.cbt-question-text[dir="rtl"],
.cbt-question-text:dir(rtl),
.cbt-option-text[dir="rtl"],
.cbt-option-text:dir(rtl),
.cbt-essay-key-content[dir="rtl"],
.cbt-essay-key-content:dir(rtl) {
  direction: rtl !important;
  text-align: right !important;
  font-family: 'Amiri', 'Scheherazade New', 'Noto Naskh Arabic', 'Traditional Arabic', serif !important;
  font-size: 19px !important;
  line-height: 2.1 !important;
}

/* ==========================================================================
   DROPIFY FULL-SURFACE CLICKABLE FIX (v=95.0)
   ========================================================================== */
.dropify-wrapper {
  display: block !important;
  position: relative !important;
  cursor: pointer !important;
  overflow: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
}
.dropify-wrapper input[type="file"],
.dropify-wrapper input.form-control,
.dropify-wrapper input {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  max-height: none !important;
  opacity: 0 !important;
  cursor: pointer !important;
  z-index: 15 !important;
  margin: 0 !important;
  padding: 0 !important;
}
.dropify-wrapper .dropify-message {
  position: relative !important;
  pointer-events: none !important;
  z-index: 1 !important;
}
.dropify-wrapper .dropify-message * {
  pointer-events: none !important;
}
.dropify-wrapper .dropify-preview {
  pointer-events: none !important;
  z-index: 2 !important;
}
.dropify-wrapper .dropify-clear {
  pointer-events: auto !important;
  z-index: 25 !important;
}

.dropify-wrapper.has-preview .dropify-message {
  display: none !important;
}
.dropify-wrapper.has-preview .dropify-preview {
  display: block !important;
}

/* ==========================================================================
   UNIVERSAL MOBILE HORIZONTAL TOUCH-SWIPE & MOBILE TIDY ENHANCEMENT
   Fixes: 
   - "banyak tabel/card yg tdk bisa digeser ke kiri"
   - "bbrp tampilan di hp masih tidak rapi"
   ========================================================================== */
@media (max-width: 991px) {
  /* Universal touch-swipe support on all tables, cards, and data wrappers */
  .table-responsive,
  .dt-mobile-table-scroll,
  .card-body.table-responsive,
  .card-body:has(table),
  .card:has(table),
  .card:has(.table-responsive),
  .card:has(.mode-card-view),
  div.dataTables_wrapper,
  .table-responsive.mode-card-view {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    max-width: 100% !important;
  }

  /* Allow cards and table rows to touch swipe cleanly if wide */
  .table-responsive.mode-card-view table.dataTable tbody tr,
  .table-responsive.mode-card-view table.table tbody tr {
    max-width: 100% !important;
    word-break: break-word !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Tidy up mobile headers, banners, and action buttons */
  .module-header-banner,
  .card-header.d-flex,
  .card-title-wrap {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .module-header-actions,
  .card-header-actions {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: center !important;
  }

  .module-header-actions .btn,
  .card-header-actions .btn {
    flex: 1 1 auto !important;
    min-width: 110px !important;
    font-size: 13px !important;
    padding: 7px 12px !important;
    white-space: normal !important;
    text-align: center !important;
  }

  /* Modals on mobile: tidy sizing and proper scrolling */
  .modal-dialog {
    margin: 10px auto !important;
    max-width: calc(100vw - 20px) !important;
  }

  .modal-content {
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  .modal-body {
    max-height: calc(85vh - 120px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px !important;
  }

  .modal-body .bootstrap-select,
  .modal-body .bootstrap-select > .dropdown-toggle {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ==========================================================================
   TUGAS SISWA RESPONSIVE CARD VIEW (v=100.0)
   ========================================================================== */
.table-responsive.is-tugas-table.mode-card-view table.dataTable tbody tr,
.table-responsive.is-tugas-table.mode-card-view table.table tbody tr {
  position: relative !important;
  display: block !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 14px 16px 12px 16px !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04) !important;
  margin-bottom: 12px !important;
  transition: all 0.2s ease !important;
}

.table-responsive.is-tugas-table.mode-card-view table.dataTable tbody tr:hover,
.table-responsive.is-tugas-table.mode-card-view table.table tbody tr:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
}

/* Header line: No. and Kelas side-by-side */
div.table-responsive.is-tugas-table.mode-card-view table.dataTable tbody tr td.col-sw-no,
div.table-responsive.is-tugas-table.mode-card-view table.table tbody tr td.col-sw-no {
  display: inline-flex !important;
  vertical-align: middle !important;
  width: auto !important;
  padding: 0 !important;
  margin: 0 6px 8px 0 !important;
  border: none !important;
  background: transparent !important;
  float: left !important;
}
.table-responsive.is-tugas-table.mode-card-view td.col-sw-no::before {
  display: none !important;
}
.table-responsive.is-tugas-table.mode-card-view .badge-sw-no {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 26px !important;
  height: 22px !important;
  border-radius: 6px !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 0 6px !important;
}

div.table-responsive.is-tugas-table.mode-card-view table.dataTable tbody tr td.col-sw-kelas,
div.table-responsive.is-tugas-table.mode-card-view table.table tbody tr td.col-sw-kelas,
div.table-responsive.is-tugas-table.mode-card-view table.dataTable tbody tr td:nth-child(2),
div.table-responsive.is-tugas-table.mode-card-view table.table tbody tr td:nth-child(2) {
  display: inline-flex !important;
  vertical-align: middle !important;
  width: auto !important;
  max-width: calc(100% - 130px) !important;
  padding: 0 !important;
  margin: 0 0 8px 0 !important;
  border: none !important;
  background: transparent !important;
  float: left !important;
}
.table-responsive.is-tugas-table.mode-card-view td.col-sw-kelas::before,
.table-responsive.is-tugas-table.mode-card-view td:nth-child(2)::before {
  display: none !important;
}
.table-responsive.is-tugas-table.mode-card-view .sw-kelas-badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 2px 8px !important;
  height: 22px !important;
  border-radius: 6px !important;
  background: rgba(37, 99, 235, 0.08) !important;
  color: #2563eb !important;
  border: 1px solid rgba(37, 99, 235, 0.2) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

/* Action button: Absolute top right */
div.table-responsive.is-tugas-table.mode-card-view table.dataTable tbody tr td.col-sw-aksi,
div.table-responsive.is-tugas-table.mode-card-view table.dataTable tbody tr td:last-child {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  bottom: auto !important;
  left: auto !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  display: block !important;
  z-index: 5 !important;
  width: auto !important;
}

/* Student Name */
div.table-responsive.is-tugas-table.mode-card-view table.dataTable tbody tr td.col-sw-nama {
  display: block !important;
  clear: both !important;
  width: 100% !important;
  padding: 0 95px 0 0 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.35 !important;
  border: none !important;
  background: transparent !important;
  word-break: break-word !important;
}
.table-responsive.is-tugas-table.mode-card-view td.col-sw-nama::before {
  display: none !important;
}

/* NISN */
div.table-responsive.is-tugas-table.mode-card-view table.dataTable tbody tr td.col-sw-nisn {
  display: block !important;
  width: 100% !important;
  margin-top: 2px !important;
  margin-bottom: 8px !important;
  padding: 0 !important;
  font-size: 11.5px !important;
  color: #64748b !important;
  border: none !important;
  background: transparent !important;
}
.table-responsive.is-tugas-table.mode-card-view td.col-sw-nisn::before {
  content: "NISN: ";
  font-weight: 600;
  color: #94a3b8;
}

/* Waktu & Kontak */
div.table-responsive.is-tugas-table.mode-card-view table.dataTable tbody tr td.col-sw-waktu {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  width: 100% !important;
  padding: 8px 0 !important;
  border-top: 1px dashed #e2e8f0 !important;
  border-bottom: 1px dashed #e2e8f0 !important;
  border-left: none !important;
  border-right: none !important;
  background: transparent !important;
  font-size: 11.5px !important;
}
.table-responsive.is-tugas-table.mode-card-view td.col-sw-waktu::before {
  display: none !important;
}

/* Nilai / Status */
div.table-responsive.is-tugas-table.mode-card-view table.dataTable tbody tr td.col-sw-nilai {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 8px 0 0 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
.table-responsive.is-tugas-table.mode-card-view td.col-sw-nilai::before {
  content: "Hasil / Nilai:";
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.detail-contact-chip.wa {
  background: rgba(37, 211, 102, 0.12) !important;
  color: #059669 !important;
  border: 1px solid rgba(37, 211, 102, 0.3) !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}

/* Dark Mode for Tugas Siswa Cards */
html[data-mode="dark"] .table-responsive.is-tugas-table.mode-card-view table.dataTable tbody tr,
html[data-mode="dark"] .table-responsive.is-tugas-table.mode-card-view table.table tbody tr {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

html[data-mode="dark"] .table-responsive.is-tugas-table.mode-card-view .badge-sw-no {
  background: #334155 !important;
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .table-responsive.is-tugas-table.mode-card-view .sw-kelas-badge {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #93c5fd !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

html[data-mode="dark"] .table-responsive.is-tugas-table.mode-card-view td.col-sw-nama .sw-nama-text {
  color: #f1f5f9 !important;
}

html[data-mode="dark"] .table-responsive.is-tugas-table.mode-card-view td.col-sw-nisn {
  color: #94a3b8 !important;
}

html[data-mode="dark"] .table-responsive.is-tugas-table.mode-card-view td.col-sw-waktu {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-mode="dark"] .table-responsive.is-tugas-table.mode-card-view td.col-sw-nilai::before {
  color: #94a3b8 !important;
}

/* ==========================================================================
   GLOBAL HIGH-CONTRAST TYPOGRAPHY & ACCESSIBILITY ENHANCEMENT
   Ensures sharp, readable text across light and dark modes
   ========================================================================== */
html:not([data-mode="dark"]) .text-secondary {
  color: #475569 !important;
}

html:not([data-mode="dark"]) .text-muted {
  color: #64748b !important;
}

html:not([data-mode="dark"]) .text-lighter {
  color: #64748b !important;
}

/* Form Labels & Checkboxes/Radios Readability */
.module-data-card label,
.module-data-card .form-group label {
  color: #1e293b !important;
  font-weight: 600 !important;
}

.custom-control-description,
.custom-control-label {
  color: #1e293b !important;
  font-weight: 600 !important;
}

html[data-mode="dark"] .custom-control-description,
html[data-mode="dark"] .custom-control-label {
  color: #cbd5e1 !important;
}

html[data-mode="dark"] .module-data-card label,
html[data-mode="dark"] .module-data-card .form-group label {
  color: #f1f5f9 !important;
}

/* DataTables Controls & Pagination Readability */
div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_filter label {
  color: #334155 !important;
  font-weight: 600 !important;
}

div.dataTables_wrapper div.dataTables_info {
  color: #475569 !important;
  font-weight: 600 !important;
}

div.dataTables_wrapper div.dataTables_paginate .paginate_button.disabled,
div.dataTables_wrapper div.dataTables_paginate .paginate_button.disabled:hover,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.disabled a,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.75 !important;
  color: #64748b !important;
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed !important;
}

/* Status Pill Inactive Contrast */
.status-pill-inactive {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600 !important;
}

.status-pill-inactive:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* ============================================================
   Login Traffic Chart & History Module Enhancements
   ============================================================ */
#periodSwitcher .btn {
  border-radius: 20px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 5px 16px !important;
  margin: 0 3px !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  background: #f8fafc !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

#periodSwitcher .btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

#periodSwitcher .btn.active,
#periodSwitcher .btn.active:hover {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3) !important;
}

.font-mono {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

/* Schedule Date Color Indicators (Ongoing = Hijau, Past = Merah, Upcoming = Biru) */
.schedule-time-ongoing {
  color: #16a34a !important;
  font-weight: 600 !important;
}

.schedule-time-past {
  color: #dc2626 !important;
  font-weight: 600 !important;
}

.schedule-time-upcoming {
  color: #2563eb !important;
  font-weight: 600 !important;
}

html[data-mode="dark"] .schedule-time-ongoing {
  color: #4ade80 !important;
}

html[data-mode="dark"] .schedule-time-past {
  color: #f87171 !important;
}

html[data-mode="dark"] .schedule-time-upcoming {
  color: #60a5fa !important;
}



