:root {
  --ad-orange: #f27022;
  --ad-blue: #012c78;
  --ad-blue-dark: #011a47;
  --ad-light-bg: #f8f9fa;
  --ad-dark-bg: #121212;
  --ad-dark-card: #1e1e1e;
  --ad-sidebar-width: 250px;
}

[data-bs-theme="dark"] {
  --bs-body-bg: var(--ad-dark-bg);
  --bs-body-color: #e9ecef;
  --ad-card-bg: var(--ad-dark-card);
  --ad-border-color: #333;
}

[data-bs-theme="light"] {
  --bs-body-bg: var(--ad-light-bg);
  --bs-body-color: #212529;
  --ad-card-bg: #ffffff;
  --ad-border-color: #e9ecef;
}

body {
  font-family: 'Inter', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Utilities */
.text-orange { color: var(--ad-orange) !important; }
.bg-orange { background-color: var(--ad-orange) !important; color: #fff; }
.text-blue { color: var(--ad-blue) !important; }
.bg-blue { background-color: var(--ad-blue) !important; color: #fff; }

.btn-brand-orange {
  background-color: var(--ad-orange);
  color: white;
  border: none;
  transition: all 0.3s ease;
}
.btn-brand-orange:hover {
  background-color: #d95e19;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(242, 112, 34, 0.3);
}

.btn-brand-blue {
  background-color: var(--ad-blue);
  color: white;
  border: none;
  transition: all 0.3s ease;
}
.btn-brand-blue:hover {
  background-color: var(--ad-blue-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(1, 44, 120, 0.3);
}

/* Glassmorphism Card */
.glass-card {
  background: var(--ad-card-bg);
  border: 1px solid var(--ad-border-color);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* Sidebar */
#sidebar {
  width: var(--ad-sidebar-width);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 999;
  background: var(--ad-blue);
  color: #fff;
  transition: all 0.3s;
  box-shadow: 4px 0 10px rgba(0,0,0,0.1);
  /* overflow-y: auto; removed */
}

/* Custom Scrollbar for Sidebar Menu */
#sidebar ul.components::-webkit-scrollbar {
  width: 6px;
}
#sidebar ul.components::-webkit-scrollbar-track {
  background: var(--ad-blue-dark);
}
#sidebar ul.components::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}
#sidebar ul.components::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

#sidebar .sidebar-header {
  padding: 20px;
  background: var(--ad-blue-dark);
  text-align: center;
}

#sidebar ul.components {
  padding: 20px 0;
}

#sidebar ul li a {
  padding: 15px 25px;
  font-size: 1.1em;
  display: block;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 15px;
}

#sidebar ul li a:hover,
#sidebar ul li.active > a {
  color: #fff;
  background: rgba(255,255,255,0.1);
  border-left: 4px solid var(--ad-orange);
}

/* Main Content */
#content {
  width: calc(100% - var(--ad-sidebar-width));
  min-height: 100vh;
  transition: all 0.3s;
  position: absolute;
  top: 0;
  right: 0;
}

/* Navbar */
.top-navbar {
  background: var(--ad-card-bg);
  border-bottom: 1px solid var(--ad-border-color);
  padding: 15px 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

/* Login Page specific */
.login-split {
  height: 100vh;
  display: flex;
}
.login-left {
  flex: 1;
  background: linear-gradient(135deg, var(--ad-blue), var(--ad-blue-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-direction: column;
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.login-left::after {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(242,112,34,0.1) 0%, transparent 60%);
  top: -50%;
  left: -50%;
  animation: pulse 10s infinite alternate;
}
@keyframes pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bs-body-bg);
}
.login-form-container {
  width: 100%;
  max-width: 400px;
  padding: 40px;
}

@media (min-width: 769px) {
    #sidebar.active {
        margin-left: calc(-1 * var(--ad-sidebar-width)) !important;
    }
    #content.active {
        width: 100% !important;
    }
}

@media (max-width: 768px) {
  #sidebar {
      margin-left: calc(-1 * var(--ad-sidebar-width));
  }
  #sidebar.active {
      margin-left: 0;
  }
  #content {
      width: 100%;
  }
  #content.active {
      width: calc(100% - var(--ad-sidebar-width));
  }
  .login-split {
      flex-direction: column;
  }
  .login-left {
      padding: 60px 20px;
  }
}
