/* ═══════════════════════════════════════════════════════════════
   EMIX — Navbar & Sidebar Component Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS VARIABLES ───────────────────────────────────────────── */
:root {
  --neon-pink:      #ff2d78;
  --neon-pink-soft: #ff6fa0;
  --neon-glow:      rgba(255, 45, 120, 0.35);
  --neon-glow-sm:   rgba(255, 45, 120, 0.15);
  --crimson:        #7b1e3a;
  --text-primary:   #fdeef5;
  --text-muted:     #8a5570;
  --text-secondary: #c9839e;
  --sidebar-w:      252px;
  --topbar-h:       72px;
  --font-display:   'Montserrat', sans-serif;
  --font-body:      'Poppins', sans-serif;
  --transition:     0.28s cubic-bezier(.4,0,.2,1);
}

/* ── RESET & BASE ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, #000000 0%, #DA3662 55%, #ffffff 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { border: none; cursor: pointer; font-family: var(--font-body); }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--crimson); border-radius: 4px; }

/* ════════════════════════════════════════════════════════════════
   SIDEBAR (fixed left)
   ════════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: rgba(5, 1, 3, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255, 45, 120, 0.1);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  /* height locks to topbar height so the divider line aligns perfectly */
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 45, 120, 0.08);
  overflow: hidden;
  padding: 0 12px;
}

/* ── LOGO SIZE — change only --logo-size to resize ──────────────
   The sidebar divider, sidebar width, and topbar height are
   completely unaffected. Logo is capped so it never overflows.
   ─────────────────────────────────────────────────────────────── */
.logo-img {
  --logo-size: 88px;          /* ← adjust this value freely */
  height: var(--logo-size);
  width: auto;
  max-width: calc(var(--sidebar-w) - 24px);
  max-height: calc(var(--topbar-h) - 0x); /* hard ceiling: never bleeds out */
  object-fit: contain;
  display: block;
}

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-group { margin-bottom: 24px; }
.nav-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-muted);
  padding: 0 12px; margin-bottom: 6px;
}

.nav-item a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500; color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
  position: relative; overflow: hidden;
}
.nav-item a:hover { background: rgba(255, 45, 120, 0.08); color: var(--text-primary); }
.nav-icon { font-size: 17px; width: 20px; text-align: center; flex-shrink: 0; }

.nav-item.active a {
  background: linear-gradient(90deg, rgba(255,45,120,0.22) 0%, rgba(255,45,120,0.05) 100%);
  color: #fff; font-weight: 600;
}
.nav-item.active .nav-icon { color: var(--neon-pink); }
.active-indicator {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%; background: var(--neon-pink);
  border-radius: 0 2px 2px 0; box-shadow: 0 0 8px var(--neon-glow);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.nav-item.active .active-indicator {
  opacity: 1;
}
.badge {
  margin-left: auto; background: var(--neon-pink); color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: 20px; box-shadow: 0 0 8px var(--neon-glow);
}
.nav-item.highlight a { color: var(--neon-pink-soft); }

.sidebar-footer {
  padding: 14px 14px 20px;
  border-top: 1px solid rgba(255, 45, 120, 0.08);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255, 255, 255, 0.03); border-radius: 12px;
  padding: 8px 10px; border: 1px solid rgba(255, 45, 120, 0.08);
}
.user-avatar-sm {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--neon-pink); overflow: hidden; flex-shrink: 0;
}
.user-avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.user-name  { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.user-role  { font-size: 10.5px; color: var(--text-muted); }
.deactivate-btn {
  margin-left: auto;
  background: none;
  color: var(--text-muted);
  font-size: 16px;
  transition: color var(--transition);
}
.deactivate-btn:hover { color: #ff7676; }
.logout-btn { margin-left: auto; background: none; color: var(--text-muted); font-size: 16px; transition: color var(--transition); }
.logout-btn:hover { color: var(--neon-pink); }

/* ════════════════════════════════════════════════════════════════
   TOPBAR (sits to the right of the sidebar)
   ════════════════════════════════════════════════════════════════ */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 45, 120, 0.08);
  z-index: 100;
}

.page-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}
.highlight-name { color: var(--neon-pink); }
.page-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ── ICON BUTTONS ───────────────────────────────────────────── */
.icon-btn {
  width: 38px; height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 45, 120, 0.12);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.icon-btn:hover {
  background: rgba(255, 45, 120, 0.14);
  color: var(--neon-pink);
  border-color: var(--neon-pink);
  box-shadow: 0 0 12px var(--neon-glow-sm);
}
.notif-btn { position: relative; }
.notif-dot {
  position: absolute; top: 7px; right: 8px;
  width: 7px; height: 7px;
  background: var(--neon-pink); border-radius: 50%;
  border: 1.5px solid #000; box-shadow: 0 0 6px var(--neon-pink);
}

/* ── AVATAR ─────────────────────────────────────────────────── */
.topbar-avatar { position: relative; width: 40px; height: 40px; cursor: pointer; }
.topbar-avatar img {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--neon-pink);
}
.avatar-ring {
  position: absolute; inset: -3px; border-radius: 50%;
  border: 1.5px solid transparent;
  background: linear-gradient(135deg, var(--neon-pink), transparent) border-box;
  animation: ring-spin 6s linear infinite;
  pointer-events: none;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════════════
   RIGHT PANEL (fixed right)
   ════════════════════════════════════════════════════════════════ */
:root {
  --right-panel-w: 290px;
}

.rec-panel {
  position: fixed;
  top: var(--topbar-h);
  right: 0;
  width: var(--right-panel-w);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  background: rgba(4, 1, 3, 0.78);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: 1px solid rgba(255, 45, 120, 0.12);
  padding: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  z-index: 90;
}

/* Magazine masthead strip */
.rec-masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #DA3662 0%, #7b1e3a 100%);
  padding: 8px 16px;
  flex-shrink: 0;
}
.masthead-label {
  font-family: var(--font-display);
  font-size: 9px; font-weight: 900; letter-spacing: 3px;
  text-transform: uppercase; color: #fff;
}
.masthead-issue { font-size: 9px; color: rgba(255,255,255,0.65); font-weight: 500; }

.rec-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px 8px;
}
.rec-title { font-family: var(--font-display); font-size: 13.5px; font-weight: 800; color: var(--text-primary); }
.rec-title span { color: var(--neon-pink); }
.rec-more {
  background: rgba(255,45,120,0.08); border: 1px solid rgba(255,45,120,0.14);
  border-radius: 8px; color: var(--text-secondary);
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all var(--transition);
}
.rec-more:hover { background: rgba(255,45,120,0.2); color: var(--neon-pink); }

/* Blank panel placeholder */
.rec-blank-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 45, 120, 0.15);
  border-radius: 16px;
  padding: 40px 20px;
  min-height: 200px;
}
.blank-icon { font-size: 28px; color: rgba(255, 45, 120, 0.25); }
.blank-label { font-size: 11px; color: var(--text-muted); font-style: italic; letter-spacing: 0.3px; }

/* Magazine footer strip */
.mag-footer-strip {
  margin: 12px 12px 0;
  background: linear-gradient(90deg, rgba(218,54,98,0.15) 0%, transparent 100%);
  border-top: 1px solid rgba(255,45,120,0.12);
  padding: 10px 12px;
  display: flex; align-items: center; gap: 7px;
  border-radius: 0 0 12px 12px;
}
.mag-footer-strip i { color: var(--neon-pink); font-size: 13px; }
.mag-footer-strip span { font-size: 9.5px; color: var(--text-muted); letter-spacing: 0.5px; }

/* ════════════════════════════════════════════════════════════════
   FIXED RIGHT PANEL — Blank placeholder
   ════════════════════════════════════════════════════════════════ */
.rec-panel {
  position: fixed;
  top: var(--topbar-h);
  right: 0;
  width: var(--right-panel-w);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  background: rgba(4, 1, 3, 0.78);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: 1px solid rgba(255, 45, 120, 0.12);
  padding: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  z-index: 90;
}

.rec-masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #DA3662 0%, #7b1e3a 100%);
  padding: 8px 16px;
  flex-shrink: 0;
}
.masthead-label {
  font-family: var(--font-display);
  font-size: 9px; font-weight: 900; letter-spacing: 3px;
  text-transform: uppercase; color: #fff;
}
.masthead-issue { font-size: 9px; color: rgba(255,255,255,0.65); font-weight: 500; }

.rec-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px 8px;
}
.rec-title { font-family: var(--font-display); font-size: 13.5px; font-weight: 800; color: var(--text-primary); }
.rec-title span { color: var(--neon-pink); }
.rec-more {
  background: rgba(255,45,120,0.08); border: 1px solid rgba(255,45,120,0.14);
  border-radius: 8px; color: var(--text-secondary);
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all var(--transition);
}
.rec-more:hover { background: rgba(255,45,120,0.2); color: var(--neon-pink); }

/* Blank panel placeholder */
.rec-blank-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 45, 120, 0.15);
  border-radius: 16px;
  padding: 40px 20px;
  min-height: 200px;
}
.blank-icon { font-size: 28px; color: rgba(255, 45, 120, 0.25); }
.blank-label { font-size: 11px; color: var(--text-muted); font-style: italic; letter-spacing: 0.3px; }

/* Magazine footer strip */
.mag-footer-strip {
  margin: 12px 12px 0;
  background: linear-gradient(90deg, rgba(218,54,98,0.15) 0%, transparent 100%);
  border-top: 1px solid rgba(255,45,120,0.12);
  padding: 10px 12px;
  display: flex; align-items: center; gap: 7px;
  border-radius: 0 0 12px 12px;
}
.mag-footer-strip i { color: var(--neon-pink); font-size: 13px; }
.mag-footer-strip span { font-size: 9.5px; color: var(--text-muted); letter-spacing: 0.5px; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .rec-panel { display: none; }
}

@media (max-width: 1280px) {
  :root { --right-panel-w: 260px; }
}

@media (max-width: 1280px) {
  :root { --right-panel-w: 260px; }
}

@media (max-width: 1100px) {
  .rec-panel { display: none; }
}

@media (max-width: 1024px) {
  :root { --sidebar-w: 68px; }
  .logo-img { --logo-size: 36px; }
  .nav-label,
  .nav-item a span:not(.nav-icon),
  .badge,
  .user-info,
  .deactivate-btn,
  .logout-btn { display: none; }
  .nav-item a { justify-content: center; padding: 10px; }
  .sidebar-user { justify-content: center; }
}