/* styles.css */

/* 1) Base body styling */
body {
  background-color: #EBEBEB;
  font-family: sans-serif;
  margin: 0;
  padding: 0;
}

/* ---------------------------------------------
   2) TOP BAR (40px high, sticky at top)
   --------------------------------------------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;                 /* Full width from left */
  width: 100%;
  height: 40px;            /* top bar height */
  background-color: #515763;
  color: #ffffff;
  font-size: 14px;
  z-index: 10000;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

/* The menu button on the left */
.menu-btn {
  background-color: transparent;
  color: #fff;
  border: none;
  font-size: 20px;         /* bigger icon */
  cursor: pointer;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
}

/* ---------------------------------------------
   3) SIDEBAR
   --------------------------------------------- */
/* By default, the sidebar is:
   - CLOSED on mobile  => transform: -250px
   - OPEN on desktop   => override with media query
*/
.sidebar {
  position: fixed;
  top: 40px;               /* below top bar */
  left: 0;
  width: 250px;
  height: calc(100vh - 40px);
  background-color: #515763;
  overflow-y: auto;
  z-index: 9999;
  transition: transform 0.3s ease;
  /* Mobile default => closed */
  transform: translateX(-250px);
}

/* Desktop default => open => override transform none if not toggled */
@media (min-width: 769px) {
  .sidebar {
    transform: none; /* open on desktop by default */
  }
}

/* We use .toggled to flip from the default:
   - On mobile => .toggled => open => transform: none
   - On desktop => .toggled => closed => transform: -250px
*/
.sidebar.toggled {
  transform: none; /* flips from base => open on mobile */
}
@media (min-width: 769px) {
  .sidebar.toggled {
    transform: translateX(-250px); /* closed on desktop if toggled */
  }
}

/* Sidebar styling for links, title, version text, etc. */
.sidebar h3 {
  color: #fff;
  margin: 1rem;
}
.sidebar a {
  display: block;
  width: 100%;
  color: #fff !important;
  text-decoration: none;
  padding: 15px;
}
.sidebar a:hover {
  background-color: #3A4252 !important;
}
.sidebar a.logout-link {
  color: orange !important;
}
.sidebar-version {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px;
  text-align: center;
  color: #bbbbbb;
  font-size: 0.85rem;
  background: rgba(0,0,0,0.2);
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ---------------------------------------------
   4) CONTENT
   --------------------------------------------- */
/* 
   Content sits under the top bar (40px).
   On desktop, default => sidebar open => margin-left: 250
   On mobile, default => sidebar closed => margin-left: 0
   If user toggles => .sidebar.toggled => we do the opposite
*/
.content {
  margin-top: 40px; /* below top bar */
  padding: 20px; /* Default spacing */
  transition: margin-left 0.3s ease;
  margin-left: 0; /* mobile default */
}

/* Reduce padding on mobile for less left/right margin */
@media (max-width: 768px) {
  .content {
    padding: 6px; /* Reduce left/right space on small screens */
  }
}

/* Desktop default => open => margin-left: 250 */
@media (min-width: 769px) {
  .content {
    margin-left: 250px;
  }
}

/* If the sidebar has .toggled => on desktop we want margin-left:0
   on mobile => remains 0 
   We'll do a sibling selector if the HTML places .sidebar before .content
*/
.sidebar.toggled ~ .content {
  margin-left: 0 !important;
}

/* ---------------------------------------------
   5) Additional styling for cards, tables, etc.
   --------------------------------------------- */
.card {
  background-color: #ffffff;
  border-radius: 8px;
  border: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}
.card-header {
  font-size: 1.1rem;
  font-weight: 500;
}

/* Example colorful headers */
.bg-custom-blue {
  background-color: #418BCA !important;
  color: #ffffff !important;
}
.bg-custom-orange {
  background-color: #E9573F !important;
  color: #ffffff !important;
}
.bg-custom-yellow {
  background-color: #F89A14 !important;
  color: #ffffff !important;
}

/* Table styling */
.table {
  background-color: #ffffff;
  border-radius: 0px 0px 8px 8px !important; /* Only round bottom corners */
  overflow: hidden;
}

.table tbody td {
  vertical-align: middle;
}

/* Pagination styling */
.pagination .page-link {
  border-radius: 2%;
  color: #418BCA;
  border: none;
}
.pagination .page-item.active .page-link {
  background-color: #418BCA;
  color: #ffffff;
  border: none;
}

/* Example heading style */
h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.modal-content {margin-top: 50px;}

/* Default text logo style */
.logo-text {
  font-size: 1.8rem;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  padding: 15px 0;
  color: #ffffff;
  position: relative;
}

/* Lines above and below the logo text */
.logo-text::before,
.logo-text::after {
  content: "";
  display: block;
  width: 75%;
  height: 3px;
  background-color: #ffffff;
  margin: 10px auto;
}


