/* ── ULTRA-MODERN PREMIUM LAYOUT (FLOATING UI) ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Mukta:wght@400;500;600;700;800&display=swap');

:root {
  --bg-body: #f3f4f6; /* Modern cool gray */
  --sidebar-bg: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.75);
  --primary: #4f46e5; /* Modern Indigo */
  --primary-light: #e0e7ff;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
  --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.04);
}

body {
  background-color: var(--bg-body);
  font-family: 'Plus Jakarta Sans', 'Mukta', sans-serif;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* ── FLOATING SIDEBAR ── */
.sidebar {
  background: var(--sidebar-bg);
  width: 280px;
  position: fixed;
  top: 1.25rem;
  bottom: 1.25rem;
  left: 1.25rem;
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1040;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.sidebar.collapsed {
  transform: translateX(-150%);
}

/* Brand Section */
.sidebar-brand {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), #ec4899);
  border-radius: 16px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}
.brand-icon.super { background: linear-gradient(135deg, #7c3aed, #db2777); box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3); }
.brand-title { font-weight: 800; font-size: 1.3rem; color: #111827; letter-spacing: -0.5px; line-height: 1.1; }
.brand-sub { font-size: 0.7rem; color: var(--text-muted); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }

/* Sidebar Navigation */
.sidebar-nav { padding: 0 1.25rem; overflow-y: auto; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }
.nav-section-label { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: #9ca3af; margin: 1.5rem 0.5rem 0.5rem; }

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  transition: all 0.25s ease;
}
.sidebar-item a i { font-size: 1.3rem; transition: transform 0.25s ease; }
.sidebar-item a:hover { background: #f3f4f6; color: #111827; transform: translateX(4px); }
.sidebar-item a.active { background: var(--primary-light); color: var(--primary); box-shadow: inset 4px 0 0 var(--primary); }
.sidebar-item a.active i { color: var(--primary); transform: scale(1.15); }

/* Sidebar Footer Profile */
.sidebar-footer { padding: 1.25rem; border-top: 1px solid var(--border-color); background: #f9fafb; margin-top: auto; }
.user-avatar { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: white; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }
.user-name { font-weight: 800; font-size: 0.95rem; color: #111827; }
.user-sub { font-size: 0.75rem; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.sidebar-logout { padding: 12px; border-radius: 12px; background: #fee2e2; color: #ef4444; font-weight: 700; transition: all 0.2s; text-decoration: none; font-size: 0.9rem; }
.sidebar-logout:hover { background: #ef4444; color: white; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); transform: translateY(-2px); }

/* ── MAIN WRAPPER & FLOATING NAVBAR ── */
.main-wrapper {
  margin-left: calc(280px + 2.5rem);
  min-height: 100vh;
  transition: margin-left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.main-wrapper.sidebar-collapsed { margin-left: 0; }

.top-navbar {
  background: var(--nav-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: sticky;
  top: 1.25rem;
  margin: 1.25rem 1.25rem 0;
  border-radius: 20px;
  height: 72px;
  z-index: 1030;
  box-shadow: var(--shadow-glass);
  border: 1px solid rgba(255,255,255,0.6);
}

/* Topbar Buttons */
.sidebar-toggle-btn { width: 44px; height: 44px; border-radius: 14px; background: white; border: 1px solid var(--border-color); display: flex; justify-content: center; align-items: center; color: var(--text-main); box-shadow: var(--shadow-sm); transition: 0.2s; }
.sidebar-toggle-btn:hover { background: #f9fafb; transform: translateY(-2px); box-shadow: var(--shadow-md); }

.date-badge { background: white; border: 1px solid var(--border-color); border-radius: 14px; padding: 10px 18px; font-weight: 700; font-size: 0.9rem; box-shadow: var(--shadow-sm); color: var(--text-main); }

.topbar-action-btn { width: 44px; height: 44px; border-radius: 14px; background: white; border: 1px solid var(--border-color); display: flex; justify-content: center; align-items: center; color: var(--text-muted); box-shadow: var(--shadow-sm); transition: all 0.2s ease; position: relative; }
.topbar-action-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary-light); transform: translateY(-3px); box-shadow: 0 6px 12px rgba(79, 70, 229, 0.15); }

/* Mobile Logic */
@media (max-width: 992px) {
  .sidebar { transform: translateX(-150%); }
  .sidebar.collapsed { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .top-navbar { margin: 1rem 1rem 0; top: 1rem; border-radius: 16px; }
}

/* ── DARK MODE OVERRIDES ── */
[data-bs-theme="dark"] {
  --bg-body: #0f172a;       /* Slate 900 */
  --sidebar-bg: #1e293b;    /* Slate 800 */
  --nav-bg: rgba(30, 41, 59, 0.85);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.4);
}

body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar, .top-navbar, .topbar-action-btn, .date-badge, .sidebar-toggle-btn {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

/* Custom Element Dark Mode Tweaks */
[data-bs-theme="dark"] .brand-title, 
[data-bs-theme="dark"] .user-name {
  color: #f8fafc !important;
}

[data-bs-theme="dark"] .sidebar-item a:hover {
  background: #334155;
  color: #f8fafc;
}

[data-bs-theme="dark"] .topbar-action-btn, 
[data-bs-theme="dark"] .sidebar-toggle-btn, 
[data-bs-theme="dark"] .date-badge {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

[data-bs-theme="dark"] .topbar-action-btn:hover, 
[data-bs-theme="dark"] .sidebar-toggle-btn:hover {
  background: #334155;
  color: #60a5fa; /* Blue 400 */
}

[data-bs-theme="dark"] .sidebar-footer {
  background: #0f172a;
  border-color: #334155;
}