/* ========== Theme Variables ========== */
:root {
  --theme-primary: #000000;
  /* Yellow */
  --theme-light: #ffc107;
  /* Black */
  --theme-dark: #000000;
  /* Black */
  --sidebar-bg: #f8f9fa;
  /* Light sidebar */
  --topbar-bg: var(--theme-light);
  --text-light: #ffffff;
  --text-dark: #212529;
}

/* ========== Base ========== */
 html, body {
      height: 100%;
      margin: 0;
    }
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f8f9fa;
  display: flex;
      flex-direction: column;
}
a{
    color: #070707 !important;
    text-decoration: auto !important;
}

/* ========== Topbar ========== */
.topbar {
  height: 60px;
  background: var(--topbar-bg);
  color: var(--text-dark);
  margin-left: 250px;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1060;
}

/* ========== Content Area ========== */
.main-content {
  margin-left: 250px;
  padding: 1.5rem;
  background: #f8f9fa;
  flex: 1;
}
/* ========== Sidebar ========== */
.sidebar .collapse .nav-link {
  font-size: 0.95rem;
  padding-left: 1.5rem;
  color: #333;
}

.sidebar .collapse .nav-link:hover {
  color: var(--text-light);
  background-color: var(--theme-primary);
}

.sidebar .fa-chevron-down {
  transition: transform 0.3s ease;
}

.sidebar .nav-link[aria-expanded="true"] .fa-chevron-down {
  transform: rotate(180deg);
}

.sidebar {
  width: 250px;
  height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  padding-top: 0;
  padding-bottom: 1rem;
  padding-left: 0;
  padding-right: 0;
  overflow-y: auto;
  border-right: 1px solid #dee2e6;
}

.sidebar-logo {
  height: 60px;
}

.sidebar .nav-link {
  color: var(--text-dark);
  border-radius: 4px;
  margin-bottom: 0.3rem;
  transition: all 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background-color: var(--theme-primary);
  color: var(--text-light);
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;                  /* Ensure it's fixed */
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    background: var(--sidebar-bg, #f8f9fa);
    transform: translateX(-100%);     /* Initially hidden */
    z-index: 1055;                    /* Higher than content */
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
  }

  .sidebar.show {
    transform: translateX(0);         /* Slide in when toggled */
  }
}


#sidebarOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1050;
}

#sidebarOverlay.show {
  display: block !important;
}


/* ========== Responsive ========== */
@media (max-width: 768px) {
  .sidebar {
    position: absolute;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .topbar,
  .main-content {
    margin-left: 0;
  }
}
 
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(18 18 18 / 70%);
    z-index: 9999;
    display: none; /* initially hidden */ 
    align-items: center;        /* Vertical center */
    justify-content: center;    /* Horizontal center */
}
#loadingOverlay .spinner-border {
    width: 3rem;
    height: 3rem;
}
 