:root {
  --sidebar-card-bg: linear-gradient(155deg, #1f1f1f 0%, #111 100%);
  --sidebar-card-border: rgba(255, 255, 255, 0.05);
  --sidebar-card-text: #cfcfcf;
  --sidebar-card-hover: linear-gradient(155deg, rgba(230, 139, 34, 0.45) 0%, rgba(0, 0, 0, 0.85) 100%);
  --sidebar-card-active: linear-gradient(150deg, rgba(230, 139, 34, 0.7) 0%, rgba(18, 18, 18, 0.95) 100%);
  --sidebar-card-glow: rgba(230, 139, 34, 0.35);
  --sidebar-section-label: rgba(230, 139, 34, 0.18);
  --sidebar-section-text: #f2f2f2;
}

/* Section headers */
.sidebar__menu > .sidebar__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  margin: 18px 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sidebar-section-text);
  background: var(--sidebar-section-label);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(220, 40, 50, 0.35);
}

.sidebar__menu:first-of-type > .sidebar__title {
  margin-top: 10px;
}

/* Base cards */
.sidebar__nav.sidebar__nav--border > li > a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px !important;
  margin: 0 0 6px;
  border-radius: 12px;
  border: 1px solid var(--sidebar-card-border) !important;
  background: var(--sidebar-card-bg) !important;
  color: var(--sidebar-card-text) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 18px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
  height: auto !important;
  line-height: 1.3;
}

.sidebar__nav.sidebar__nav--border > li:last-child > a {
  margin-bottom: 0;
}

/* Frosted overlay sits behind */
.sidebar__nav.sidebar__nav--border > li > a::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, backdrop-filter 0.25s ease;
  z-index: -1;
}

/* Hover / focus styles */
.sidebar__nav.sidebar__nav--border > li > a:hover,
.sidebar__nav.sidebar__nav--border > li > a:focus-visible {
  background: var(--sidebar-card-hover) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 22px var(--sidebar-card-glow);
  transform: translateY(-2px);
}

.sidebar__nav.sidebar__nav--border > li > a:hover::before,
.sidebar__nav.sidebar__nav--border > li > a:focus-visible::before {
  opacity: 1;
  backdrop-filter: blur(12px);
}

/* Active state */
.sidebar__nav.sidebar__nav--border > li.active > a {
  background: var(--sidebar-card-active) !important;
  color: #ffffff !important;
  border-color: rgba(220, 40, 50, 0.55) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 28px var(--sidebar-card-glow);
}

.sidebar__nav.sidebar__nav--border > li.active > a::before {
  opacity: 1;
  backdrop-filter: blur(14px);
}

/* Icon tinting */
.sidebar__nav.sidebar__nav--border > li > a svg,
.sidebar__nav.sidebar__nav--border > li > a img {
  filter: none;
  transition: filter 0.25s ease;
}

.sidebar__nav.sidebar__nav--border > li > a:hover svg,
.sidebar__nav.sidebar__nav--border > li > a:focus-visible svg,
.sidebar__nav.sidebar__nav--border > li.active > a svg,
.sidebar__nav.sidebar__nav--border > li > a:hover img,
.sidebar__nav.sidebar__nav--border > li > a:focus-visible img,
.sidebar__nav.sidebar__nav--border > li.active > a img {
  filter: drop-shadow(0 0 6px rgba(220, 40, 50, 0.45)) brightness(1.1);
}

/* Submenu cards inherit look */
.sidebar__nav.sidebar__nav--border.sidebar__nav--collapse > li > a {
  padding-left: 22px !important;
  font-size: 13px;
}

/* Center sidebar section headers */
.sidebar__menu > .sidebar__title {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  justify-content: center;
}

/* Remove legacy active indicator */
.sidebar__nav.sidebar__nav--border > li::before,
.sidebar__nav.sidebar__nav--border > li.active::before {
  content: none !important;
  display: none !important;
}
