/* ══════════════════════════════════════════════════
   IINL – Left Sidebar (Dark Navy, PixelShift-style)
══════════════════════════════════════════════════ */

/* ── SIDEBAR SHELL ───────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sb-w);
  z-index: 200;
  background: var(--sb-bg);
  border-right: 1px solid var(--sb-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--dur-slow) var(--ease);
  will-change: width;
  /* Compact scrollbar inside sidebar */
}

/* Expand on hover (desktop) */
.sidebar:hover {
  width: var(--sb-w-open);
  box-shadow: 4px 0 40px rgba(0,0,0,.35);
}

/* Force open class for mobile */
.sidebar.is-open {
  width: var(--sb-w-open);
  box-shadow: 4px 0 40px rgba(0,0,0,.35);
}

/* ── GLOW ORBS ───────────────────────────────────── */
.sb-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.sb-glow-top {
  width: 160px; height: 160px;
  top: -40px; left: -60px;
  background: radial-gradient(circle, rgba(249,115,22,.12) 0%, transparent 70%);
}
.sb-glow-bottom {
  width: 140px; height: 140px;
  bottom: 30px; right: -70px;
  background: radial-gradient(circle, rgba(59,130,246,.1) 0%, transparent 70%);
}

/* ── LOGO AREA ───────────────────────────────────── */
.sb-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  text-decoration: none;
}

.sb-logo-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #f97316, #f59e0b);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(249,115,22,.35);
  transition: transform var(--dur-base) var(--ease-spring);
}
.sb-logo:hover .sb-logo-icon { transform: scale(1.08) rotate(-2deg); }
.sb-logo-icon span {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .72rem;
  color: white;
  letter-spacing: .04em;
}

.sb-logo-text {
  display: flex;
  flex-direction: column;
  opacity: 0;
  white-space: nowrap;
  transition: opacity var(--dur-base) var(--ease);
}
.sidebar:hover .sb-logo-text,
.sidebar.is-open .sb-logo-text { opacity: 1; transition-delay: 80ms; }
.sb-logo-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .88rem;
  color: rgba(255,255,255,.92);
  letter-spacing: .04em;
  line-height: 1.2;
}
.sb-logo-sub {
  font-size: .58rem;
  color: rgba(255,255,255,.38);
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* ── DIVIDER ─────────────────────────────────────── */
.sb-divider {
  height: 1px;
  background: var(--sb-border);
  margin: 0 12px 4px;
  flex-shrink: 0;
}

/* ── NAV SECTION ─────────────────────────────────── */
.sb-nav {
  flex: 1;
  padding: 2px 7px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.sb-nav::-webkit-scrollbar { display: none; }

/* Section label */
.sb-nav-label {
  font-size: .52rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  padding: .65rem 10px .3rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
}
.sidebar:hover .sb-nav-label,
.sidebar.is-open .sb-nav-label { opacity: 1; transition-delay: 60ms; }

/* Nav item */
.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  margin: 1px 0;
  color: var(--sb-text);
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease);
  position: relative;
  cursor: pointer;
  white-space: nowrap;
}
.sb-item:hover {
  background: rgba(255,255,255,.06);
  color: var(--sb-text-hover);
}
.sb-item.active {
  background: var(--sb-active-bg);
  color: #f97316;
}
.sb-item.active::before {
  content: '';
  position: absolute;
  left: -8px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 22px;
  background: linear-gradient(180deg, #f97316, #f59e0b);
  border-radius: 0 3px 3px 0;
}

/* Icon container */
.sb-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--dur-fast) var(--ease);
  background: rgba(255,255,255,.05);
}
.sb-item:hover .sb-icon {
  background: rgba(255,255,255,.1);
}
.sb-item.active .sb-icon {
  background: rgba(249,115,22,.25);
}
.sb-icon svg { width: 15px; height: 15px; flex-shrink: 0; }
.sb-item.active .sb-icon svg { color: #f97316; }

/* Label */
.sb-label {
  font-family: var(--font-head);
  font-size: .77rem;
  font-weight: 600;
  letter-spacing: .02em;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
  overflow: hidden;
}
.sidebar:hover .sb-label,
.sidebar.is-open .sb-label { opacity: 1; transition-delay: 50ms; }

/* Badge on nav item */
.sb-item-badge {
  margin-left: auto;
  font-size: .58rem;
  font-weight: 700;
  background: rgba(249,115,22,.25);
  color: #f97316;
  border-radius: 50px;
  padding: .15rem .5rem;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
  flex-shrink: 0;
}
.sidebar:hover .sb-item-badge,
.sidebar.is-open .sb-item-badge { opacity: 1; transition-delay: 80ms; }

/* ── FOOTER AREA ─────────────────────────────────── */
.sb-footer {
  flex-shrink: 0;
  padding: 5px 7px 10px;
  border-top: 1px solid var(--sb-border);
}
.sb-footer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: rgba(255,255,255,.35);
  font-size: .72rem;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.sb-footer-item:hover { background: rgba(255,255,255,.05); color: rgba(255,255,255,.65); }
.sb-footer-icon {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: .9rem;
}
.sb-footer-label {
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 600;
}
.sidebar:hover .sb-footer-label,
.sidebar.is-open .sb-footer-label { opacity: 1; transition-delay: 60ms; }

/* ── MOBILE ADJUSTMENTS ─────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    width: var(--sb-w-open);
    left: calc(-1 * var(--sb-w-open));
    transition: left var(--dur-slow) var(--ease);
  }
  .sidebar:hover { width: var(--sb-w-open); box-shadow: none; }
  .sidebar.is-open { left: 0; box-shadow: 4px 0 40px rgba(0,0,0,.4); }
  .sidebar .sb-label,
  .sidebar .sb-logo-text,
  .sidebar .sb-nav-label,
  .sidebar .sb-footer-label { opacity: 1; }
}
