/* ==========================================================================
   GX Theme Override
   Restyles the "slai" Sngine theme to match the dark neon/glass look of the
   main SLAI application shell (templates/structures/rework/template.html.twig).
   Loaded after style.min.css in _head.tpl, so no !important is needed for
   selectors of equal specificity — later wins on cascade order.
   Only takes effect in night mode (body.night-mode), same as the app shell.
   ========================================================================== */

:root {
  --gx-bg-1: #060a16;
  --gx-bg-2: #04070f;
  --gx-panel: rgba(12, 18, 37, 0.90);
  --gx-panel-2: rgba(7, 12, 27, 0.96);
  --gx-line: rgba(125, 196, 255, 0.16);
  --gx-line-strong: rgba(163, 225, 255, 0.34);
  --gx-glow-a: rgba(0, 240, 255, 0.10);
  --gx-glow-b: rgba(123, 127, 255, 0.10);
  --gx-cyan: #00f0ff;
  --gx-violet: #7c7fff;
  --gx-icon: #85e9ff;
  --gx-text: rgba(223, 237, 255, 0.82);
  --gx-text-strong: #ffffff;
  --gx-heading-font: "Montserrat", var(--body-font-family);
}

/* == Base canvas == */
body.night-mode {
  background: var(--gx-bg-1);
}

body.night-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 0%, rgba(98, 197, 255, 0.10), transparent 30%),
    radial-gradient(circle at 100% 100%, rgba(113, 95, 255, 0.08), transparent 32%),
    linear-gradient(180deg, var(--gx-bg-1), var(--gx-bg-2));
}

body.night-mode ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body.night-mode ::-webkit-scrollbar-track {
  background: var(--gx-bg-2);
}

body.night-mode ::-webkit-scrollbar-thumb {
  background: rgba(163, 225, 255, 0.30);
  border-radius: 8px;
}

body.night-mode ::-webkit-scrollbar-thumb:hover {
  background: rgba(163, 225, 255, 0.48);
}

body.night-mode h1,
body.night-mode h2,
body.night-mode h3,
body.night-mode h4,
body.night-mode h5,
body.night-mode h6,
body.night-mode .card-title,
body.night-mode .card-header {
  font-family: var(--gx-heading-font);
}

/* == Top bar == */
body.night-mode .main-header {
  background:
    linear-gradient(180deg, rgba(10, 16, 36, 0.94), rgba(7, 12, 28, 0.98));
  border-bottom: 1px solid var(--gx-line);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 0 30px rgba(46, 108, 255, 0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.night-mode .main-header .logo img {
  filter: drop-shadow(0 0 12px rgba(100, 195, 255, 0.20));
}

body.night-mode .main-header .menu-icon:hover,
body.night-mode .navbar-wrapper > ul > li > a:hover {
  color: var(--gx-icon);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.30);
}

body.night-mode .main-header .search-wrapper .form-control {
  border: 1px solid var(--gx-line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

body.night-mode .main-header .search-wrapper .form-control:focus {
  border-color: var(--gx-line-strong);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.12);
}

/* == Dropdown menus (create/notifications/messages/user-menu) == */
body.night-mode .dropdown-menu {
  border-radius: 18px;
  border: 1px solid var(--gx-line);
  background: linear-gradient(180deg, rgba(10, 17, 39, 0.98), rgba(7, 12, 28, 0.99));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 0 28px rgba(46, 108, 255, 0.10);
  overflow: hidden;
  padding: 8px;
}

body.night-mode .dropdown-menu .dropdown-item {
  border-radius: 12px;
  color: var(--gx-text);
}

body.night-mode .dropdown-item:focus,
body.night-mode .dropdown-item:hover {
  color: var(--gx-text-strong);
  background: rgba(103, 198, 255, 0.08);
}

body.night-mode .dropdown-divider {
  border-color: var(--gx-line);
}

/* == Left sidebar == */
body.night-mode .main-side-nav-card {
  position: sticky;
  background:
    radial-gradient(circle at top left, rgba(98, 197, 255, 0.14), transparent 22%),
    radial-gradient(circle at bottom right, rgba(113, 95, 255, 0.10), transparent 24%),
    linear-gradient(180deg, var(--gx-panel), var(--gx-panel-2));
  border: 1px solid var(--gx-line);
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 28px var(--gx-glow-a),
    0 0 80px var(--gx-glow-b);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.night-mode .main-side-nav li.ptb5 small.text-muted {
  color: rgba(176, 210, 255, 0.48);
  font-weight: 700;
  letter-spacing: 0.14em;
}

body.night-mode .main-side-nav a,
body.night-mode .main-side-nav .static {
  border-radius: 14px;
  transition: all 0.2s ease;
}

body.night-mode .main-side-nav a:hover {
  color: var(--gx-text-strong);
  background-color: rgba(101, 196, 255, 0.10);
  transform: translateX(3px);
}

body.night-mode .main-side-nav > li.active > a {
  background:
    linear-gradient(90deg, rgba(0, 240, 255, 0.18), rgba(124, 127, 255, 0.10)),
    linear-gradient(180deg, rgba(14, 32, 70, 0.80), rgba(9, 18, 40, 0.90));
  color: var(--gx-text-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

body.night-mode .main-side-nav .main-icon {
  color: var(--gx-icon);
}

body.night-mode .main-side-nav > li.active > a .main-icon {
  color: var(--gx-text-strong);
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.45));
}

body.night-mode .main-side-nav ul a {
  border-left-color: var(--gx-line);
}

/* == Generic cards == */
body.night-mode .card {
  background: linear-gradient(180deg, rgba(12, 18, 38, 0.92), rgba(7, 11, 24, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(140, 210, 255, 0.05) inset, 0 0 24px rgba(50, 120, 255, 0.06);
}

body.night-mode .card:hover {
  border-color: rgba(130, 200, 255, 0.30);
}

body.night-mode .divider,
body.night-mode .card-body .divider,
body.night-mode .modal-body .divider {
  border-color: var(--gx-line);
}

/* == Buttons == */
body.night-mode .btn-primary,
body.night-mode .btn-primary.disabled,
body.night-mode .btn-primary:disabled {
  border: 1px solid rgba(135, 205, 255, 0.18);
  background: linear-gradient(180deg, rgba(19, 126, 194, 0.96), rgba(12, 74, 132, 0.98));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset, 0 0 20px rgba(46, 108, 255, 0.08);
}

body.night-mode .btn-primary:hover {
  background: linear-gradient(180deg, rgba(29, 143, 214, 0.98), rgba(16, 90, 156, 1));
  box-shadow: 0 0 26px rgba(68, 145, 255, 0.16);
}

body.night-mode .btn-secondary,
body.night-mode .btn-secondary.disabled,
body.night-mode .btn-secondary:disabled {
  border: 1px solid rgba(135, 205, 255, 0.18);
  background: linear-gradient(180deg, rgba(24, 142, 112, 0.96), rgba(11, 102, 124, 0.98));
}

body.night-mode .btn-secondary:hover {
  box-shadow: 0 0 26px rgba(68, 200, 180, 0.16);
}
