/* ============================================================
   SHARED PREMIUM SIDEBAR & LAYOUT SYSTEM
   ============================================================ */

:root {
  --sidebar-width: 260px;
  --sidebar-bg: #0f172a;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-text: #8a9bc0;
  --sidebar-hover-bg: rgba(255, 255, 255, 0.06);
  --sidebar-hover-text: #ffffff;
  --sidebar-active-bg: linear-gradient(90deg, rgba(235, 104, 53, 0.15) 0%, rgba(235, 104, 53, 0.02) 100%);
  --sidebar-active-color: #eb6835;
}

/* Base Sidebar styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  padding: 0;
  z-index: 1050;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 16px 24px;
  border-bottom: 1px solid var(--sidebar-border);
  min-height: 64px;
}

.brand-icon {
  font-size: 24px;
  color: var(--sidebar-active-color);
}

.brand-text {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  letter-spacing: -0.5px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.sidebar-nav li a i {
  width: 18px;
  text-align: center;
  font-size: 15px;
}

.sidebar-nav li a:hover {
  background: var(--sidebar-hover-bg);
  color: var(--sidebar-hover-text);
  transform: translateX(3px);
}

.sidebar-nav li.active a {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-color);
  border-left: 3px solid var(--sidebar-active-color);
}

.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  gap: 16px;
}

.sidebar-footer a {
  color: #6a7a94;
  font-size: 16px;
  transition: color 0.3s ease;
}

.sidebar-footer a:hover {
  color: var(--sidebar-active-color);
}

/* Sidebar Backdrop */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1040;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

/* ============================================================
   RESPONSIVE SIDEBAR BEHAVIOUR
   ============================================================ */

/* --- MOBILE (≤900 px) --- */
@media (max-width: 900px) {
  /* Sidebar hidden by default on mobile */
  .sidebar {
    transform: translateX(-100%);
  }

  /* Shown when body has .sidebar-open */
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  /* Navbar stretches full-width on mobile */
  body .navbar {
    left: 0 !important;
    width: 100% !important;
  }

  /* Content fills full width on mobile */
  .main, .main-content, .main-home, .full-page,
  main, .container, .page-content {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* --- DESKTOP (>900 px): sidebar-hidden collapses sidebar --- */
@media (min-width: 901px) {
  body.sidebar-hidden .sidebar {
    transform: translateX(-100%);
  }

  /* Navbar shifts to fill full width when sidebar is hidden */
  body.sidebar-hidden .navbar {
    left: 0 !important;
    width: 100% !important;
  }

  /* Content fills full width when sidebar is hidden */
  body.sidebar-hidden .main,
  body.sidebar-hidden .main-content,
  body.sidebar-hidden .main-home,
  body.sidebar-hidden .full-page,
  body.sidebar-hidden main,
  body.sidebar-hidden .container,
  body.sidebar-hidden .page-content {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* ============================================================
   SHARED PREMIUM FOOTER SYSTEM
   ============================================================ */
.footer {
  margin-top: auto;
  margin-left: var(--sidebar-width);
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 60px 80px 40px;
  text-align: left;
  width: calc(100% - var(--sidebar-width));
  display: block;
  flex-basis: 100%;
  clear: both;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #eb6835, #7b61ff, #00f7ff);
}

.footer-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.5fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.footer-col {
  padding: 0;
}

.footer-col.brand p {
  color: #94a3b8;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.footer-logo {
  font-family: var(--font-heading, "Syne", sans-serif);
  font-weight: 800;
  font-size: 24px;
  background: linear-gradient(135deg, #eb6835, #7b61ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0;
  display: inline-block;
}

.footer-col h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #e2e8f0;
  margin-bottom: 24px;
  margin-top: 0;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col p {
  margin: 0;
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
}

.footer-col a {
  text-decoration: none;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-block;
}

.footer-col a:hover {
  color: #a78bfa;
  transform: translateX(4px);
}

.footer-col .socials {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.footer-col .socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-col .socials a:hover {
  background: #a78bfa;
  color: white;
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 10px 20px rgba(167, 139, 250, 0.2);
}

.newsletter-form {
  display: flex;
  margin-top: 16px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.newsletter-form:focus-within {
  border-color: #7b61ff;
  box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.15);
}

.newsletter-form input {
  flex: 1;
  border: none;
  padding: 10px 12px;
  background: transparent;
  outline: none;
  font-size: 14px;
  min-width: 0;
  color: white;
}

.newsletter-form button {
  background: #0f172a;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.newsletter-form button:hover {
  background: #7b61ff;
}

.footer-bottom {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  color: #94a3b8;
  font-size: 14px;
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Footer responsive rules matching sidebar layout */
@media (max-width: 900px) {
  .footer {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 40px 24px 30px !important;
  }
  .footer-container {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    margin-top: 40px;
  }
}

@media (min-width: 901px) {
  body.sidebar-hidden .footer {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* ============================================================
   GLOBAL PREMIUM NAVBAR STYLES (MATCHING SCREENSHOT)
   ============================================================ */

body .navbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: 70px;
  background-color: #0b0f19 !important; /* Premium dark background */
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 24px !important;
  z-index: 1000 !important;
  box-sizing: border-box !important;
  transition: left 0.3s ease, width 0.3s ease !important;
}

body.sidebar-hidden .navbar {
  left: 0 !important;
}

/* Menu Toggle Button (Hamburger) */
body .navbar .menu-toggle,
body .navbar .menu-toggle-btn {
  background: none !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 20px !important;
  cursor: pointer !important;
  display: flex !important; /* Always show the hamburger button */
  align-items: center !important;
  justify-content: center !important;
  margin-right: 12px !important;
  transition: color 0.2s !important;
}

body .navbar .menu-toggle:hover,
body .navbar .menu-toggle-btn:hover {
  color: #ffffff !important;
}

@media (max-width: 900px) {
  body .navbar {
    left: 0 !important;
    padding: 0 16px !important;
  }
  body .navbar .menu-toggle,
  body .navbar .menu-toggle-btn {
    display: flex !important;
  }
}

/* Brand Area */
body .navbar .navbar-brand {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

body .navbar .brand-logo-svg {
  width: 22px;
  height: 22px;
  color: #eb6835; /* UIverse orange */
  flex-shrink: 0;
}

body .navbar .brand-text {
  font-family: "Syne", sans-serif !important;
  font-weight: 800 !important;
  font-size: 20px !important;
  color: #ffffff !important;
  letter-spacing: -0.5px !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
}

/* Vertical Divider */
body .navbar .navbar-divider {
  width: 1px;
  height: 24px;
  background-color: rgba(255, 255, 255, 0.15);
  margin: 0 16px;
}

@media (max-width: 768px) {
  body .navbar .navbar-divider {
    display: none !important;
  }
}

/* Search Bar */
body .navbar .search-bar {
  position: relative !important;
  max-width: 380px !important;
  width: 100% !important;
  margin: 0 16px !important;
  display: flex !important;
  align-items: center !important;
}

body .navbar .search-bar .search-icon {
  position: absolute !important;
  left: 14px !important;
  color: #475569 !important;
  font-size: 14px !important;
  pointer-events: none !important;
}

body .navbar .search-bar input {
  width: 100% !important;
  height: 38px !important;
  background-color: #131926 !important; /* Slightly lighter than navbar */
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 99px !important;
  padding: 0 16px 0 38px !important;
  color: #ffffff !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 14px !important;
  outline: none !important;
  transition: all 0.2s ease !important;
}

body .navbar .search-bar input::placeholder {
  color: #475569 !important;
}

body .navbar .search-bar input:focus {
  border-color: #eb6835 !important;
  box-shadow: 0 0 0 2px rgba(235, 104, 53, 0.15) !important;
}

@media (max-width: 640px) {
  body .navbar .search-bar {
    display: none !important; /* Hide search bar on mobile to fit elements */
  }
}

/* Right Controls */
body .navbar .nav-right {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-left: auto !important;
}

/* Premium Buttons */
body .navbar .nav-btn {
  font-family: "DM Sans", sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  height: 38px !important;
  padding: 0 18px !important;
  border-radius: 99px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

/* Docs Button: Dark Grey Pill */
body .navbar .docs-btn {
  background-color: #131926 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

body .navbar .docs-btn:hover {
  background-color: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Add Component Button: Orange/Purple Gradient */
body .navbar .add-btn {
  background: linear-gradient(135deg, #eb6835 0%, #7b61ff 100%) !important;
  border: none !important;
  color: #ffffff !important;
}

body .navbar .add-btn:hover {
  opacity: 0.95 !important;
  box-shadow: 0 0 12px rgba(235, 104, 53, 0.3) !important;
  transform: translateY(-1px) !important;
}

/* Dark Mode Toggle inside Navbar */
body .navbar .theme-toggle {
  background: none !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 16px !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}

body .navbar .theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
}

@media (max-width: 480px) {
  body .navbar .docs-btn {
    display: none !important; /* Hide docs on very small screen */
  }
}

/* Compatibility classes for inline toggle scripts */
.sidebar.open {
  transform: translateX(0) !important;
}
.sidebar-backdrop.visible {
  opacity: 1 !important;
  pointer-events: all !important;
}

/* ============================================================
   SIDEBAR CLOSE / TOGGLE BUTTON (inside the sidebar)
   ============================================================ */
.sidebar-toggle-btn {
  /* Push button all the way to the right of the brand row */
  margin-left: auto !important;
  flex-shrink: 0 !important;

  /* Reset all common overrides */
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;

  /* Size & appearance */
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;

  /* Colour */
  color: #64748b !important;
  font-size: 16px !important;

  /* Smooth hover */
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
}

.sidebar-toggle-btn:hover {
  background: rgba(235, 104, 53, 0.12) !important;
  color: #eb6835 !important;
  transform: scale(1.08) !important;
}

.sidebar-toggle-btn:active {
  transform: scale(0.95) !important;
}




