/*
 * ============================================================
 *  CCL IIT Gandhinagar — Brand Design Override
 *  FILE: assets/css/ccl-brand.css
 * ============================================================
 *  Loaded AFTER style.css (WowDash) in head.php.
 *  Overrides the default WowDash palette and component styles
 *  with the CCL / 3030 Eklavya brand identity.
 *
 *  Brand primary: Deep Indigo #4361ee  (matches all demo pages)
 *  Dark mode selector: [data-theme=dark]  (WowDash standard)
 * ============================================================
 */

/* ════════════════════════════════════════════════════════════
   1. BRAND COLOR PALETTE
   Replaces WowDash's washed-out #487FFF with a richer #4361ee.
   All --primary-* vars are used everywhere (buttons, badges,
   sidebar active, links, focus rings, charts).
   ════════════════════════════════════════════════════════════ */
:root {
  /* Primary / Brand — Deep Indigo */
  --primary-50:  #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-300: #a5b4fc;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4361ee;   /* MAIN — buttons, active states, links */
  --primary-700: #3f37c9;   /* HOVER / pressed */
  --primary-800: #3730a3;
  --primary-900: #312e81;

  /* Semantic aliases */
  --brand:            #4361ee;
  --button-secondary: #eef2ff;

  /* Page background — subtle indigo tint instead of plain gray */
  --bg-color: #f0f4ff;

  /* Brand-tinted borders */
  --border-color: rgba(67, 97, 238, 0.1);

  /* Primary light/alpha variants (used in bg-primary-light etc.) */
  --primary-light:       rgba(67, 97, 238, 0.12);
  --primary-light-white: rgba(67, 97, 238, 0.22);
}

[data-theme=dark] {
  --primary-50:  rgba(67, 97, 238, 0.08);
  --primary-100: rgba(67, 97, 238, 0.14);
  --primary-light:       rgba(99, 102, 241, 0.18);
  --primary-light-white: rgba(99, 102, 241, 0.28);
  --bg-color:    #0d1117;
  --border-color: rgba(255, 255, 255, 0.07);
  --button-secondary: rgba(67, 97, 238, 0.15);
}


/* ════════════════════════════════════════════════════════════
   2. BODY BACKGROUND — mesh gradient for liquid glass to refract
   Pure flat colour gives glass nothing to blur through.
   Indigo/violet blobs in light mode create the same refraction
   environment that dark mode naturally has.
   ════════════════════════════════════════════════════════════ */
body {
  background-color: #e8edf5 !important;
  background-image:
    radial-gradient(ellipse 70% 52% at 85%  -8%,  rgba(67, 97, 238, 0.10) 0%, transparent 65%),
    radial-gradient(ellipse 58% 46% at  3%  98%,  rgba(139, 92, 246, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 48% 40% at 92%  70%,  rgba(99, 129, 255, 0.06) 0%, transparent 55%) !important;
  background-attachment: fixed !important;
}
[data-theme=dark] body {
  background-color: #1c1c22 !important;
  background-image:
    radial-gradient(ellipse 70% 55% at 78%  -8%,  rgba(67, 97, 238, 0.32) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at  5%  95%,  rgba(139, 92, 246, 0.24) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 88%  70%,  rgba(99, 129, 255, 0.18) 0%, transparent 55%) !important;
  background-attachment: fixed !important;
}


/* ════════════════════════════════════════════════════════════
   3a. GLOBAL LIQUID GLASS SYSTEM
   All glass classes use indigo-tinted backgrounds in light mode
   (white-tinted glass is invisible on the light bg).
   Dark mode keeps dark-tinted glass.
   ════════════════════════════════════════════════════════════ */

/* Shared blur kernel — outer containers get the strongest blur */
.glass-card,
.glass-panel,
.glass-panel-strong,
.glass-item {
  -webkit-backdrop-filter: blur(24px) saturate(1.9) brightness(1.02);
          backdrop-filter: blur(24px) saturate(1.9) brightness(1.02);
}

/* ── Light mode: indigo-tinted frosted glass ── */
.glass-card {
  background: rgba(255, 255, 255, 0.38) !important;
  border: 1px solid rgba(180, 200, 255, 0.55) !important;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.92),
    inset 1px 0 0 rgba(255, 255, 255, 0.55),
    0 8px 32px rgba(67, 97, 238, 0.10),
    0 2px 6px rgba(67, 97, 238, 0.06) !important;
}
.glass-panel {
  background: rgba(215, 225, 255, 0.52) !important;
  border: 1px solid rgba(180, 200, 255, 0.62) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 4px 18px rgba(67, 97, 238, 0.09) !important;
}
.glass-panel-strong {
  background: rgba(225, 232, 255, 0.82) !important;
  border: 1px solid rgba(180, 200, 255, 0.72) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 16px rgba(67, 97, 238, 0.10) !important;
}
.glass-item {
  background: rgba(210, 222, 255, 0.28) !important;
  border: 1px solid rgba(180, 200, 255, 0.45) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.80) !important;
}

/* ── Dark mode: deep-tinted glass ── */
[data-theme=dark] .glass-card {
  background: rgba(123, 138, 147, 0.411) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.09),
    0 8px 32px rgba(0, 0, 0, 0.40) !important;
}
[data-theme=dark] .glass-panel {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 4px 18px rgba(0, 0, 0, 0.32) !important;
}
[data-theme=dark] .glass-panel-strong {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 4px 16px rgba(0, 0, 0, 0.38) !important;
}
[data-theme=dark] .glass-item {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* ════════════════════════════════════════════════════════════
   3. SIDEBAR — Modern Dark Gradient
   Replaces flat white with a deep indigo-slate gradient.
   Text/icons are light on the dark background.
   ════════════════════════════════════════════════════════════ */
.sidebar {
  background-color: #000000 !important;
  background-image: linear-gradient(175deg, #143358 0%, #1a2035 60%, #04060a 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: 4px 0 28px rgba(16, 12, 72, 0.18) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 3; /* above glass theme cards */

}

/* Logo area divider */
.sidebar-logo {
  border-color: rgba(255, 255, 255, 0.07) !important;
  /* background-color: var(--white)!important; */
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Menu scroll area divider */
.sidebar-menu-area {
  border-color: rgba(255, 255, 255, 0.05) !important;
}
.sidebar-menu-area::-webkit-scrollbar {
  background-color: transparent !important;
}
.sidebar-menu-area::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.1) !important;
}
.sidebar-menu-area:hover::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.18) !important;
}

/* All nav links on dark bg */
.sidebar-menu li a {
  color: rgba(253, 253, 255, 0.72) !important;
}
.sidebar-menu li a .menu-icon {
  color: rgba(196, 210, 255, 0.5);
  transition: color 0.2s ease;
}
.sidebar-menu li a:hover {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.07) !important;
}
.sidebar-menu li a:hover .menu-icon {
  color: #fff;
}

/* Dropdown chevron */
.sidebar-menu li.dropdown > a::after {
  color: rgba(196, 210, 255, 0.4);
}

/* Active page — indigo gradient pill with glow */
.sidebar-menu li > a.active-page {
  background: linear-gradient(135deg, #4361ee 0%, #6366f1 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 18px rgba(67, 97, 238, 0.45) !important;
}
.sidebar-menu li > a.active-page .menu-icon {
  color: rgba(255, 255, 255, 0.9) !important;
}
.sidebar-menu li > a.active-page:hover {
  color: #fff !important;
  background: linear-gradient(135deg, #3f53e8 0%, #5b5cf0 100%) !important;
}

/* Open dropdown parent highlight */
.sidebar-menu li.dropdown.open > a,
.sidebar-menu li.dropdown.dropdown-open > a {
  background-color: rgba(67, 97, 238, 0.22) !important;
  color: #d0d9ff !important;
}
.sidebar-menu li.dropdown.open > a:hover,
.sidebar-menu li.dropdown.dropdown-open > a:hover {
  color: #fff !important;
}

/* Submenu items */
.sidebar-submenu li a {
  color: rgba(180, 196, 255, 0.6) !important;
}
.sidebar-submenu li a:hover {
  color: rgba(255, 255, 255, 0.95) !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Group title labels */
.sidebar-menu li.sidebar-menu-group-title {
  color: rgba(180, 196, 255, 0.32) !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}

/* Close button on dark bg */
.sidebar-close-btn {
  color: rgba(255, 255, 255, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}
.sidebar-close-btn:hover {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Submenu circle icons — keep brand colour readable on dark bg */
.sidebar-menu .circle-icon { opacity: 0.9; }

/* Dark theme — deeper gradient */
[data-theme=dark] .sidebar {



  background-color: #000000 !important;
  background-image: linear-gradient(175deg, #143358 0%, #1a2035 60%, #04060a 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: 4px 0 28px rgba(16, 12, 72, 0.18) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);






}


/* ════════════════════════════════════════════════════════════
   4. NAVBAR — Unified dark chrome matching the sidebar
   Sidebar and navbar share the same deep indigo gradient so the
   white body content area stands out clearly.
   ════════════════════════════════════════════════════════════ */
.navbar-header {
  background-color: #000000 !important;
  background-image: linear-gradient(90deg, #143358 0%, #1a2035 60%, #04060a 100%) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 2px 20px rgba(16, 12, 72, 0.22) !important;
}
[data-theme=dark] .navbar-header {
  background-color: #000000 !important;
  background-image: linear-gradient(90deg, #143358 0%, #1a2035 60%, #04060a 100%) !important;
  border-bottom-color: rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Navbar icon pill buttons — light on dark background */
.navbar-header .w-40-px.bg-neutral-200 {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  transition: background-color 0.2s ease, border-color 0.2s ease !important;
}
.navbar-header .w-40-px.bg-neutral-200:hover {
  background-color: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}
[data-theme=dark] .navbar-header .w-40-px.bg-neutral-200 {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
[data-theme=dark] .navbar-header .w-40-px.bg-neutral-200:hover {
  background-color: rgba(255, 255, 255, 0.14) !important;
}

/* Navbar icon colours (sun/bell/etc.) */
.navbar-header .w-40-px.bg-neutral-200 iconify-icon,
.navbar-header .w-40-px.bg-neutral-200 i {
  color: rgba(196, 210, 255, 0.85) !important;
}
.navbar-header .w-40-px.bg-neutral-200:hover iconify-icon,
.navbar-header .w-40-px.bg-neutral-200:hover i {
  color: #ffffff !important;
}

/* Navbar search input — dark-adapted */
.navbar-search input {
  background-color: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.navbar-search input::placeholder {
  color: rgba(196, 210, 255, 0.45) !important;
}
.navbar-search input:focus {
  border-color: rgba(255, 255, 255, 0.3) !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.07) !important;
}
.navbar-search .icon {
  color: rgba(196, 210, 255, 0.5) !important;
}
[data-theme=dark] .navbar-search input {
  background-color: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}
[data-theme=dark] .navbar-search input:focus {
  border-color: rgba(255, 255, 255, 0.28) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06) !important;
}

/* Sidebar toggle icon — light on dark navbar */
.sidebar-toggle,
.sidebar-mobile-toggle {
  color: rgba(196, 210, 255, 0.8) !important;
}
.sidebar-toggle:hover,
.sidebar-mobile-toggle:hover {
  color: #ffffff !important;
}
[data-theme=dark] .sidebar-toggle,
[data-theme=dark] .sidebar-mobile-toggle {
  color: rgba(196, 210, 255, 0.8) !important;
}


/* ════════════════════════════════════════════════════════════
   5. CARDS — Subtle Brand Tint
   ════════════════════════════════════════════════════════════ */
.card {
  border-color: rgba(67, 97, 238, 0.08) !important;
  box-shadow: 0 2px 14px rgba(67, 97, 238, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03) !important;
  transition: box-shadow 0.25s ease !important;
}
.card:hover {
  box-shadow: 0 6px 28px rgba(67, 97, 238, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04) !important;
}
[data-theme=dark] .card {
  border-color: rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.15) !important;
}
[data-theme=dark] .card:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.32) !important;
}


/* ════════════════════════════════════════════════════════════
   6. PRIMARY BUTTONS — Gradient + Lift
   ════════════════════════════════════════════════════════════ */
.btn-primary,
.btn-primary-600 {
  background: linear-gradient(135deg, #4361ee 0%, #6366f1 100%) !important;
  border-color: #4361ee !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(67, 97, 238, 0.3) !important;
  transition: all 0.2s ease !important;
}
.btn-primary:hover,
.btn-primary-600:hover {
  background: linear-gradient(135deg, #3f53e8 0%, #5b5cf0 100%) !important;
  border-color: #3f37c9 !important;
  box-shadow: 0 6px 22px rgba(67, 97, 238, 0.42) !important;
  transform: translateY(-1px);
}
.btn-primary:active,
.btn-primary-600:active,
.btn-primary:focus-visible,
.btn-primary-600:focus-visible {
  background: linear-gradient(135deg, #3730a3 0%, #4338ca 100%) !important;
  box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3) !important;
  transform: none !important;
}

/* Outline primary */
.btn-outline-primary,
.btn-outline-primary-600 {
  color: #4361ee !important;
  border-color: #4361ee !important;
  background: transparent !important;
  transition: all 0.2s ease !important;
}
.btn-outline-primary:hover,
.btn-outline-primary-600:hover {
  background: linear-gradient(135deg, #4361ee 0%, #6366f1 100%) !important;
  border-color: #4361ee !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(67, 97, 238, 0.3) !important;
}

/* Secondary / neutral buttons */
.btn-light,
.btn-neutral {
  background-color: rgba(67, 97, 238, 0.06) !important;
  border-color: rgba(67, 97, 238, 0.12) !important;
  color: #374151 !important;
  transition: all 0.2s ease !important;
}
.btn-light:hover,
.btn-neutral:hover {
  background-color: rgba(67, 97, 238, 0.12) !important;
  border-color: rgba(67, 97, 238, 0.22) !important;
}
[data-theme=dark] .btn-light,
[data-theme=dark] .btn-neutral {
  background-color: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
}


/* ════════════════════════════════════════════════════════════
   7. FORM INPUTS — Brand Focus Ring
   ════════════════════════════════════════════════════════════ */
.form-control,
.form-select {
  border-color: rgba(67, 97, 238, 0.15) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.form-control:focus,
.form-select:focus {
  border-color: #4361ee !important;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12) !important;
  outline: none !important;
}
[data-theme=dark] .form-control,
[data-theme=dark] .form-select {
  border-color: rgba(255, 255, 255, 0.1) !important;
}
[data-theme=dark] .form-control:focus,
[data-theme=dark] .form-select:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}


/* ════════════════════════════════════════════════════════════
   8. BADGES — Brand Aligned
   ════════════════════════════════════════════════════════════ */
.badge.bg-primary-600,
.badge.text-sm.bg-primary-50.text-primary-600 {
  background-color: rgba(67, 97, 238, 0.1) !important;
  color: #4361ee !important;
}
[data-theme=dark] .badge.bg-primary-600 {
  background-color: rgba(67, 97, 238, 0.22) !important;
  color: #93c5fd !important;
}

/* Progress bars */
.progress-bar {
  background: linear-gradient(90deg, #4361ee, #6366f1) !important;
}


/* ════════════════════════════════════════════════════════════
   9. LINKS
   ════════════════════════════════════════════════════════════ */
a:hover {
  color: #4361ee !important;
}
.text-primary-600 {
  color: #4361ee !important;
}
.text-primary-700 {
  color: #3f37c9 !important;
}
.bg-primary-600 {
  background-color: #4361ee !important;
}


/* ════════════════════════════════════════════════════════════
   10. SCROLLBAR — Brand Tinted
   ════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(67, 97, 238, 0.18);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(67, 97, 238, 0.38);
}
[data-theme=dark] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}
[data-theme=dark] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}


/* ════════════════════════════════════════════════════════════
   11. DROPDOWN MENUS
   ════════════════════════════════════════════════════════════ */
.dropdown-menu {
  border-color: rgba(67, 97, 238, 0.1) !important;
  box-shadow: 0 8px 32px rgba(67, 97, 238, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}
[data-theme=dark] .dropdown-menu {
  background-color: #1a2035 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}
.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(67, 97, 238, 0.07) !important;
  color: #4361ee !important;
}

/* ════════════════════════════════════════════════════════════
   12. SELECTION HIGHLIGHT
   ════════════════════════════════════════════════════════════ */
::selection {
  background-color: rgba(67, 97, 238, 0.2);
  color: #1e1b4b;
}


/* ════════════════════════════════════════════════════════════
   13. MOBILE LAYOUT — Reduced body padding on small screens
   WowDash's dashboard-main-body uses 0.9375rem (15px) on all
   breakpoints. On phones < 576px this eats too much horizontal
   space when combined with card + accordion body padding.
   ════════════════════════════════════════════════════════════ */
@media (max-width: 575.98px) {
  .dashboard-main-body {
    /*  padding: 0.625rem;     10px — saves 10px each side vs default 15px */
  }
  .navbar-header {
  height: 3.75rem;
  padding: .5rem 1.5rem;

}
@media (max-width: 389.98px) {
  .dashboard-main-body {
    /*  padding: 0.5rem;       8px for very narrow phones (320px Galaxy fold etc.) */
  }

  .navbar-header {
  height: 3.75rem;
  padding: .5rem 1.5rem;
}


/* ════════════════════════════════════════════════════════════
   14. EXTERNAL LINK GUARD — Full-width bottom bar (ccl-global.js)
   ════════════════════════════════════════════════════════════ */

/* Inline SVG rendering — used across sections 14 and 16 */
.ccl-ext-toast-icon svg,
.ccl-ext-close-x svg,
.ccl-net-banner-icon svg,
.ccl-net-banner-close svg,
.ccl-net-mini svg {
  display: block;
  flex-shrink: 0;
}

/* Full-width bottom bar, no margins, touches all edges */
#ccl-ext-toast {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  width: 100%;
  z-index: 9990;
  background: #fffbeb;
  border-top: 3px solid #f59e0b;
  box-shadow: 0 -6px 32px rgba(0,0,0,0.14), 0 -1px 0 rgba(245,158,11,0.18);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(.34,1.18,.64,1);
  pointer-events: none;
}
#ccl-ext-toast.ccl-ext-visible {
  transform: translateY(0);
  pointer-events: auto;
}

/* Countdown drain bar */
.ccl-ext-pbar { height: 4px; background: rgba(245,158,11,0.18); overflow: hidden; }
.ccl-ext-pbar-fill { height: 100%; background: linear-gradient(90deg, #d97706, #f59e0b, #fbbf24); width: 100%; }

/* Inner layout: constrain to readable width on very wide screens */
.ccl-ext-toast-wrap {
  max-width: 900px;
  margin: 0 auto;
}

/* Main row */
.ccl-ext-toast-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 8px;
  flex-wrap: wrap;
}
.ccl-ext-toast-icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: rgba(245,158,11,0.15);
  display: flex; align-items: center; justify-content: center;
}
.ccl-ext-toast-body { flex: 1; min-width: 160px; }
.ccl-ext-toast-title {
  font-size: 0.8rem; font-weight: 700; color: #92400e;
  margin: 0 0 1px; line-height: 1.3;
}
.ccl-ext-toast-domain {
  font-size: 0.74rem; font-weight: 600; color: #b45309;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0;
}
.ccl-ext-toast-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
/* Force open button */
.ccl-ext-force-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: #d97706; color: #fff; border: none;
  border-radius: 8px; padding: 7px 14px;
  font-size: 0.78rem; font-weight: 700; cursor: pointer;
  transition: background .15s ease;
}
.ccl-ext-force-btn:hover { background: #b45309; }
/* Close X */
.ccl-ext-close-x {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: #92400e; flex-shrink: 0;
  display: flex; align-items: center;
  opacity: 0.55; transition: opacity .15s;
}
.ccl-ext-close-x:hover { opacity: 1; }

/* Footer row: remember + cancel */
.ccl-ext-toast-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px 12px; gap: 10px;
}
.ccl-ext-remember-wrap {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 500; color: #92400e;
  cursor: pointer; -webkit-user-select: none; user-select: none;
}
.ccl-ext-remember-chk { accent-color: #d97706; cursor: pointer; margin: 0; }
.ccl-ext-cancel-btn {
  font-size: 0.72rem; font-weight: 600; color: #6b7280;
  background: none; border: none; cursor: pointer; padding: 0;
  transition: color .15s;
}
.ccl-ext-cancel-btn:hover { color: #374151; }

/* Dark mode */
[data-theme=dark] #ccl-ext-toast { background: #1c1507; border-top-color: #d97706; }
[data-theme=dark] .ccl-ext-toast-title  { color: #fde68a; }
[data-theme=dark] .ccl-ext-toast-domain { color: #fcd34d; }
[data-theme=dark] .ccl-ext-remember-wrap { color: #fde68a; }
[data-theme=dark] .ccl-ext-cancel-btn   { color: #9ca3af; }
[data-theme=dark] .ccl-ext-close-x      { color: #fde68a; }

/* ════════════════════════════════════════════════════════════
   15. QUICK LINK CARDS — Mobile compact + tap tooltip
   ════════════════════════════════════════════════════════════ */
/* Toggle button (injected by ccl-global.js, visible on mobile only) */
.ccl-qlc-toggle {
  display:none; /* JS shows via d-sm-none class + flex */
  align-items:center; gap:6px;
  background:transparent; border:1px solid var(--border-color);
  border-radius:100px; padding:5px 12px 5px 10px;
  font-size:0.74rem; font-weight:600; color:var(--text-secondary-light);
  cursor:pointer; margin-bottom:8px;
  transition:border-color .2s ease, color .2s ease;
}
.ccl-qlc-toggle.d-sm-none { display:inline-flex; }
@media (min-width:576px) { .ccl-qlc-toggle.d-sm-none { display:none !important; } }
.ccl-qlc-toggle:hover { color:#4361ee; border-color:rgba(67,97,238,0.38); }

/* Hide description on mobile by default */
@media (max-width:575.98px) {
  .qlc-desc { display:none; }
  /* Reveal when strip has ccl-qlc-expanded class */
  [data-ccl-strip].ccl-qlc-expanded .qlc-desc { display:block; }
}

/* Tap tooltip bubble */
.ccl-mob-tip {
  position:absolute; z-index:8500;
  background:#1e293b; color:#fff;
  font-size:0.74rem; font-weight:500; line-height:1.45;
  border-radius:9px; padding:7px 11px;
  pointer-events:none;
  box-shadow:0 4px 18px rgba(0,0,0,0.22);
  animation:cclTipIn .15s ease;
}
@keyframes cclTipIn { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:none} }
[data-theme=dark] .ccl-mob-tip { background:#4361ee; }

/* ════════════════════════════════════════════════════════════
   16. NETWORK GUARD — bottom bar, mini icon, restored bar
   ════════════════════════════════════════════════════════════ */

/* ── Shared base: full-width bottom bar ── */
#ccl-net-banner,
#ccl-net-restored {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  width: 100%;
  z-index: 9992;                              /* above ext-link toast (9990) */
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(.34,1.18,.64,1);
  pointer-events: none;
}
#ccl-net-banner.ccl-net-visible,
#ccl-net-restored.ccl-net-visible {
  transform: translateY(0);
  pointer-events: auto;
}
/* Shared inner layout */
.ccl-net-banner-wrap {
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
}
.ccl-net-banner-icon { flex-shrink: 0; display: flex; }
.ccl-net-banner-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.ccl-net-banner-text strong { font-size: 0.82rem; font-weight: 700; }
.ccl-net-banner-sub { font-size: 0.73rem; }

/* ── Offline banner (dark slate, red top border) ── */
#ccl-net-banner {
  background: #1e293b;
  border-top: 3px solid #ef4444;
  box-shadow: 0 -6px 32px rgba(0,0,0,0.32), 0 -1px 0 rgba(239,68,68,0.2);
}
#ccl-net-banner .ccl-net-banner-text strong { color: #f1f5f9; }
#ccl-net-banner .ccl-net-banner-sub         { color: #94a3b8; }
.ccl-net-banner-close {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: #64748b; flex-shrink: 0;
  display: flex; align-items: center;
  transition: color .15s;
}
.ccl-net-banner-close:hover { color: #f87171; }

/* ── Offline state: disable external links ── */
html.ccl-offline a[target="_blank"],
html.ccl-offline a[href^="http"]:not([href*="localhost"]):not([data-ccl-offline-ok]) {
  pointer-events: none !important;
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}
html.ccl-offline .ccl-net-banner-close,
html.ccl-offline .ccl-ext-cancel-btn,
html.ccl-offline .ccl-ext-close-x {
  pointer-events: auto !important;
  opacity: 1 !important;
  cursor: pointer !important;
}

/* ── Mini floating icon — stacks directly above .theme-customization__button
   (button: bottom:40px right:40px size:48px → top-edge at 88px from bottom)
   Mini sits at bottom:96px right:40px with 8px breathing room ── */
#ccl-net-mini {
  position: fixed;
  bottom: 96px; right: 40px;               /* above settings gear button */
  z-index: 9991;                            /* same stack as notifications, below 9992 */
  width: 44px; height: 44px;               /* 4px smaller than settings btn (48px) */
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #ef4444;
  box-shadow: 0 4px 16px rgba(239,68,68,0.28), 0 2px 8px rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #f87171;
  opacity: 0;
  transform: scale(0.5) translateY(8px);
  transition: opacity 0.25s ease, transform 0.28s cubic-bezier(.34,1.18,.64,1);
  pointer-events: none;
}
#ccl-net-mini.ccl-net-mini-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}
/* Pulse ring */
.ccl-net-mini-pulse {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(239,68,68,0.55);
  animation: cclNetPulse 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes cclNetPulse {
  0%   { opacity: 0.8; transform: scale(1); }
  65%  { opacity: 0;   transform: scale(1.6); }
  100% { opacity: 0;   transform: scale(1.6); }
}

/* ── Connection restored bar (green) ── */
#ccl-net-restored {
  background: #f0fdf4;
  border-top: 3px solid #22c55e;
  box-shadow: 0 -6px 32px rgba(0,0,0,0.1), 0 -1px 0 rgba(34,197,94,0.18);
}
#ccl-net-restored .ccl-net-banner-text strong { color: #14532d; }
#ccl-net-restored .ccl-net-banner-sub         { color: #166534; }
.ccl-net-restored-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.ccl-net-refresh-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: #22c55e; color: #fff; border: none;
  border-radius: 8px; padding: 7px 15px;
  font-size: 0.78rem; font-weight: 700; cursor: pointer;
  transition: background .15s;
}
.ccl-net-refresh-btn:hover { background: #16a34a; }
.ccl-net-skip-btn {
  font-size: 0.75rem; font-weight: 600; color: #6b7280;
  background: none; border: none; cursor: pointer; padding: 4px 2px;
  transition: color .15s;
}
.ccl-net-skip-btn:hover { color: #374151; }

/* Dark mode */
[data-theme=dark] #ccl-net-banner   { background: #0f172a; }
[data-theme=dark] #ccl-net-mini     { background: #0f172a; }
[data-theme=dark] #ccl-net-restored { background: #052e16; border-top-color: #22c55e; }
[data-theme=dark] #ccl-net-restored .ccl-net-banner-text strong { color: #bbf7d0; }
[data-theme=dark] #ccl-net-restored .ccl-net-banner-sub         { color: #86efac; }
[data-theme=dark] .ccl-net-skip-btn { color: #9ca3af; }


/* ════════════════════════════════════════════════════════════
   17. MODAL LIQUID GLASS — global, applies to all Bootstrap modals
   The backdrop blurs + darkens the world behind → modal floats
   as a bright frosted panel above the dark haze.
   Same indigo-tinted glass pattern as the course nav/content pane.
   ════════════════════════════════════════════════════════════ */

/* Frosted scrim — blurs the page behind every modal */
.modal-backdrop.show {
  opacity: 1 !important;
  background-color: rgba(15, 23, 42, 0.52) !important;
  -webkit-backdrop-filter: blur(10px) saturate(1.5) !important;
          backdrop-filter: blur(10px) saturate(1.5) !important;
}

/* Modal panel — near-white frosted glass above dark backdrop */
.modal-content {
  background: rgba(248, 250, 255, 0.88) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.8) brightness(1.02) !important;
          backdrop-filter: blur(28px) saturate(1.8) brightness(1.02) !important;
  border: 1px solid rgba(210, 220, 255, 0.52) !important;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 1),
    inset 1px 0 0 rgba(255, 255, 255, 0.65),
    inset -1px 0 0 rgba(255, 255, 255, 0.40),
    0 32px 96px rgba(0, 0, 0, 0.28),
    0 8px 28px rgba(0, 0, 0, 0.14) !important;
}

/* Header — frosted title bar: clearly more indigo-tinted than body so it reads as separate */
.modal-header {
  background: rgba(215, 228, 255, 0.98) !important;
  border-bottom: 1px solid rgba(160, 190, 255, 0.55) !important;
  box-shadow:
    0 2px 12px rgba(67, 97, 238, 0.10),
    inset 0 -1px 0 rgba(160, 190, 255, 0.40) !important;
}

/* Body — very faint tint so it reads lighter than the blue header above */
.modal-body {
  background: rgba(252, 253, 255, 0.60) !important;
}

/* Footer — same frosted tone as header */
.modal-footer {
  background: rgba(236, 242, 255, 0.92) !important;
  border-top: 1px solid rgba(210, 220, 255, 0.58) !important;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.85) !important;
}

/* ── Dark mode ── */
[data-theme=dark] .modal-content {
  background: rgba(10, 15, 30, 0.86) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.08),
    inset 1px 0 0 rgba(255, 255, 255, 0.04),
    0 32px 96px rgba(0, 0, 0, 0.70),
    0 8px 28px rgba(0, 0, 0, 0.45) !important;
}
[data-theme=dark] .modal-header {
  background: rgba(16, 22, 46, 0.96) !important;
  border-bottom-color: rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}
[data-theme=dark] .modal-body {
  background: transparent !important;
}
[data-theme=dark] .modal-footer {
  background: rgba(10, 15, 30, 0.94) !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}
