/**
 * sidebar.css - Auronix left sidebar navigation (new, from scratch)
 * Fixed left, 240px, dark #0a0a0a, red/crimson glow, glassmorphism.
 * Menu: icon + text; hover glow/slide; active left border.
 * No reuse of old navbar/sidebar styles.
 */

/* -------------------------------------------------------------------------
   Sidebar container: fixed left, 240px, dark + glass
   ------------------------------------------------------------------------- */
.auronix-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  z-index: 1000;
  background: #0a0a0a;
  background-image: linear-gradient(
    180deg,
    rgba(220, 20, 60, 0.1) 0%,
    transparent 45%,
    rgba(139, 0, 0, 0.06) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(220, 20, 60, 0.2);
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.5), 0 0 60px rgba(220, 20, 60, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: auronix-sidebar-in 0.3s ease-out;
}

@keyframes auronix-sidebar-in {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Decorative overlay layer */
.auronix-sidebar-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 40% at 0% 15%,
    rgba(220, 20, 60, 0.08) 0%,
    transparent 55%
  );
}

/* -------------------------------------------------------------------------
   Logo block
   ------------------------------------------------------------------------- */
.auronix-sidebar-logo {
  position: relative;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(220, 20, 60, 0.2);
  flex-shrink: 0;
}

.auronix-sidebar-logo a {
  display: inline-block;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: linear-gradient(135deg, #fff 0%, #e91e63 50%, #dc143c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: filter 0.25s ease;
}

.auronix-sidebar-logo a:hover {
  filter: brightness(1.15);
}

/* -------------------------------------------------------------------------
   Nav list: scrollable, all items visible (scroll if needed)
   ------------------------------------------------------------------------- */
.auronix-sidebar-nav {
  position: relative;
  flex: 1;
  min-height: 0;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem 0.5rem 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.auronix-sidebar-nav::-webkit-scrollbar {
  width: 6px;
}
.auronix-sidebar-nav::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}
.auronix-sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(220, 20, 60, 0.5);
  border-radius: 3px;
}
.auronix-sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(220, 20, 60, 0.7);
}

/* -------------------------------------------------------------------------
   Menu item: icon + label
   ------------------------------------------------------------------------- */
.auronix-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  margin-bottom: 2px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  text-align: left;
  position: relative;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  border-left: 4px solid transparent;
}

/* Hover: slide right 8px, glow, background */
.auronix-sidebar-item:hover {
  transform: translateX(8px);
  background: rgba(220, 20, 60, 0.12);
  color: #fff;
  box-shadow: 0 0 20px rgba(233, 30, 99, 0.15);
}

.auronix-sidebar-item:hover .auronix-sidebar-icon {
  transform: scale(1.06);
  filter: drop-shadow(0 0 8px rgba(233, 30, 99, 0.5));
}

/* Active: left border + bright glow */
.auronix-sidebar-item.is-active {
  background: rgba(220, 20, 60, 0.2);
  color: #e91e63;
  border-left-color: #e91e63;
  box-shadow: 0 0 24px rgba(233, 30, 99, 0.22);
}

.auronix-sidebar-item.is-active .auronix-sidebar-icon {
  filter: drop-shadow(0 0 10px rgba(233, 30, 99, 0.6));
}

/* Icon */
.auronix-sidebar-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.auronix-sidebar-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.auronix-sidebar-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Divider */
.auronix-sidebar-divider {
  height: 1px;
  background: rgba(220, 20, 60, 0.2);
  margin: 0.75rem 1rem;
}

/* Logout item */
.auronix-sidebar-item.auronix-sidebar-logout {
  color: rgba(255, 255, 255, 0.5);
}

.auronix-sidebar-item.auronix-sidebar-logout:hover {
  color: #dc143c;
}

/* Ripple-like tap (optional) */
.auronix-sidebar-item:active {
  box-shadow: inset 0 0 0 1px rgba(233, 30, 99, 0.2);
}

/* -------------------------------------------------------------------------
   Mobile: sidebar off-canvas, overlay
   ------------------------------------------------------------------------- */
.auronix-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auronix-sidebar-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .auronix-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .auronix-sidebar.is-open {
    transform: translateX(0);
  }

  .auronix-sidebar {
    animation: none;
  }

  /* Touch-friendly hit area */
  .auronix-sidebar-item {
    min-height: 48px;
    padding: 0.85rem 1rem;
  }
}
