@charset "UTF-8";
body {
  background-color: #e1e1e1;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.nb-nav-bar-header {
  background-color: #000 !important;
  height: 90px;
}

.logo {
  height: 50px;
  width: 50px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.nb-login-header-title {
  color: #fff;
  font-weight: 600;
  margin: 0;
  text-align: center;
  font-size: 1.4rem;
}

.nb-login-header-subtitle {
  font-weight: 300;
  font-size: medium;
}

.nb-nav-dropdown {
  color: #fff;
  font-size: 1.2rem;
  margin-right: 15px;
}

.nb-login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 15px;
}
.nb-login-container .nb-container-margin-top {
  margin-top: 40px;
}
.nb-login-container .nb-container-margin-bottom {
  margin-bottom: 80px;
}
.nb-login-container .row {
  width: 100%;
  max-width: 900px;
}
.nb-login-container .nb-image-container img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  background-color: #f4f4f6;
}
@media (max-width: 768px) {
  .nb-login-container .nb-image-container img {
    border-radius: 10px 10px 0 0;
    height: 250px;
  }
}
.nb-login-container .nb-login-form {
  background-color: #fff;
  padding: 40px;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
}
@media (max-width: 768px) {
  .nb-login-container .nb-login-form {
    border-radius: 0 0 10px 10px;
  }
}
.nb-login-container .nb-login-form h2 {
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #000;
  color: #fff;
  padding: 15px 0;
  text-align: center;
  font-size: 14px;
}

/* Sidebar Styles */
/* Sidebar base */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  background: black;
  border-right: 1px solid black;
  width: 70px; /* collapsed width */
  transition: all 0.3s ease;
  overflow-x: hidden;
  z-index: 1050;
}

.sidebar-header {
  padding-top: 50px;
  padding-left: 5px;
}

.nb-sidebar-small-logo {
  height: 50px;
  width: 50px;
  border-radius: 50%;
  -o-object-fit: cover;
  object-fit: cover;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.3s, transform 0.3s;
}

.sidebar:hover .nb-sidebar-small-logo {
  display: none;
}

/* Keep only small logo visible on mobile */
.sidebar .nb-sidebar-small-logo {
  display: inline-block !important;
}

/* Expanded on hover (desktop only) */
@media (min-width: 768px) {
  .sidebar:hover {
    width: 245px; /* expanded width */
  }
  .sidebar:hover .sidebar-header {
    padding: 25px;
    margin-top: 20px;
    margin-bottom: -95px;
  }
}
/* Nav links */
.sidebar .nav-link {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  color: white;
  white-space: nowrap;
}

.sidebar .nav-link i {
  font-size: 18px;
  width: 30px;
  text-align: center;
}

/* Hide text when collapsed */
.sidebar .link-text {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  margin-left: 5px;
  color: white;
}

/* Show text on hover (desktop only) */
@media (min-width: 768px) {
  .sidebar:hover .link-text {
    opacity: 1;
    visibility: visible;
    color: white;
  }
  .nb-mobile-view-logo {
    display: none;
  }
  .nb-main-sidebar-items {
    padding-top: 60px;
  }
}
/* Submenu styling */
.sidebar .sub-nav {
  padding-left: 30px;
}

.sidebar .collapse .nav-link {
  font-size: 14px;
}

/* ---------- MOBILE BEHAVIOR ---------- */
/* Sidebar hidden on mobile by default */
@media (max-width: 767.98px) {
  .sidebar {
    left: -250px; /* hidden */
    width: 250px; /* full size */
  }
  .sidebar.show {
    left: 0; /* slide in */
  }
}
@media (min-width: 768px) {
  .sidebar:not(:hover) .sub-nav .nav-link {
    justify-content: center;
    text-align: center;
  }
  /* Restore default color when expanded */
  .sidebar:hover .sub-nav .nav-link {
    color: white !important;
    justify-content: flex-start;
    text-align: left;
  }
}
/* On mobile (sidebar is toggled open/closed), keep default color */
@media (max-width: 767.98px) {
  .sidebar .sub-nav .nav-link {
    color: white !important;
  }
}
@media (min-width: 768px) {
  /* make collapsed layout reliably centered */
  .sidebar {
    width: 70px; /* collapsed width (keep) */
  }
  /* collapsed: center icon + hide text */
  .sidebar:not(:hover) .nav-link {
    justify-content: center !important;
    padding: 12px 0 !important;
  }
  .sidebar:not(:hover) .nav-link i {
    margin: 0 auto;
    width: auto; /* allow icon natural width */
    text-align: center;
  }
  .sidebar:not(:hover) .link-text {
    display: none; /* completely hide text on collapsed */
    opacity: 0;
    visibility: hidden;
    width: 0;
    margin-left: 0;
  }
  .sidebar:not(:hover) .nb-main-sidebar-items {
    padding-top: 0px;
  }
  /* collapsed: center submenu items and color red */
  .sidebar:not(:hover) .sub-nav .nav-link {
    justify-content: center !important;
    text-align: center;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .sidebar:not(:hover) .sub-nav .nav-link i {
    display: block;
  }
  /* expanded on hover: restore left-aligned layout + text + normal color */
  .sidebar:hover {
    width: 245px; /* expanded width (matches your original) */
  }
  .sidebar:hover .nav-link {
    justify-content: flex-start !important;
    padding: 10px 15px !important;
  }
  .sidebar:hover .link-text {
    display: inline-block;
    opacity: 1;
    visibility: visible;
    width: auto;
    margin-left: 8px;
  }
  .sidebar:hover .sub-nav .nav-link {
    justify-content: flex-start !important;
    text-align: left;
    padding-left: 30px !important; /* keep indented */
    color: white !important; /* default color */
  }
}
/* ---------- MOBILE (toggle) ---------- */
@media (max-width: 767.98px) {
  /* when hidden / shown via .show class already in your CSS */
  .sidebar {
    left: -250px;
    width: 250px;
  }
  .sidebar.show {
    left: 0;
  }
  /* On mobile, always left-align and show text */
  .sidebar .nav-link {
    justify-content: flex-start !important;
    padding: 10px 15px !important;
  }
  .sidebar .nav-link i {
    margin-right: 10px;
  }
  .sidebar .link-text {
    display: inline-block;
    opacity: 1;
    visibility: visible;
    width: auto;
    margin-left: 5px;
  }
  .sidebar .sub-nav .nav-link {
    padding-left: 30px;
  }
  .nb-mobile-small-logo .logo {
    display: none;
  }
  .nb-mobile-view-heading {
    display: none;
  }
  .nb-mobile-view-logo .logo {
    display: inline-block;
  }
  .nb-mobile-view-logo {
    padding-right: 80px;
  }
}
/* Mobile toggle button */
#sidebarToggle {
  position: fixed;
  top: 25px;
  left: 10px;
  z-index: 1100;
}

.nb-header-action-dropdown {
  text-align: right;
}

/* ✅ Fix navbar alignment and dropdown issue */
.nb-nav-bar-header {
  height: 85px; /* fixed navbar height */
  align-items: center;
  z-index: 1050;
}

/* Center logo properly */
.nb-login-header-title img {
  height: 40px;
  width: auto;
}

/* Right dropdown stays aligned */
.nb-navbar-collapse {
  flex-grow: 0; /* prevent full width stretch */
}

/* Prevent navbar shift when dropdown opens */
.navbar .dropdown-menu {
  position: absolute !important;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  z-index: 2000;
}

/* Small logo sizing */
.nb-mobile-small-logo img {
  height: 35px;
  width: auto;
}

/* Mobile view tweaks */
@media (max-width: 767.98px) {
  .nb-login-header-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  .nb-navbar-collapse {
    position: absolute;
    top: 100%;
    right: 0;
    background: #212529;
    width: 100%;
    z-index: 1500;
  }
  .navbar-nav .dropdown-menu {
    position: static !important;
    float: none;
  }
}
/* Custom Right-Side Modal */
/* Full-Screen Right-Side Modal */
.modal.right-modal .modal-dialog {
  position: fixed;
  margin: 0;
  right: 0;
  top: 0;
  height: 100vh;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  max-width: 100%;
  width: 40%;
  display: flex;
  flex-direction: column;
  padding-bottom: 50px;
}

.modal.right-modal.show .modal-dialog {
  transform: translateX(0);
}

.modal.right-modal .modal-content {
  height: 100%;
  border-radius: 0;
  display: flex;
  flex-direction: column; /* make content flex */
}

.modal.right-modal form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto; /* let form fill height */
  min-height: 0; /* important for flexbox scrolling */
}

.modal.right-modal .modal-header {
  height: 85px;
  background-color: black;
  border-radius: 0;
  flex-shrink: 0; /* fixed at top */
}

.modal.right-modal .modal-header .modal-title {
  color: white;
}

.modal.right-modal .modal-header .btn-close {
  filter: invert(1);
}

.modal.right-modal .modal-body {
  flex: 1 1 auto; /* fills remaining space */
  overflow-y: auto; /* scrollable */
  padding: 1rem;
  min-height: 0; /* crucial for scroll */
}

.modal.right-modal .modal-footer {
  flex-shrink: 0; /* fixed at bottom */
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  padding: 0.75rem 1rem;
}

/* Responsive for mobile */
@media (max-width: 768px) {
  .modal.right-modal .modal-dialog {
    max-width: 100%;
    width: 80%;
  }
}
.spinner-border {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
