:root {
  --sidebar-width: 290px;
  --sidebar-collapsed: 84px;
  --sidebar-bg: linear-gradient(180deg, #0f172a, #1e3a8a);
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #f8fafc;
  color: #1e293b;
}

/* =======================
   MAIN
======================= */

#mainContent {
  margin-left: var(--sidebar-width);
  height: 100vh;
  transition: margin-left 0.3s ease;

  display: flex;
  flex-direction: column;

  overflow: hidden;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;

  height: 64px;
  flex-shrink: 0;

  background: white;
  border-bottom: 1px solid #e2e8f0;
}

.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.app-footer {
  background: white;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  padding: 1rem;
  color: #64748b;

  flex-shrink: 0;
}

/* -----------------------------
   Top Progress Bar
----------------------------- */
#globalProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 2000;
  display: none;
}

#globalProgressBar .progress-line {
  height: 100%;
  width: 30%;
  background: #0d6efd;
  animation: progressSlide 1.2s infinite ease-in-out;
}

@keyframes progressSlide {
  0% {
    margin-left: -30%;
    width: 30%;
  }

  50% {
    width: 50%;
  }

  100% {
    margin-left: 100%;
    width: 30%;
  }
}

/* -----------------------------
   Full Screen Loader
----------------------------- */
.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 1999;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(2px);

  display: flex;
  justify-content: center;
  align-items: center;
}
