/*!
 * SB Admin 2 v4.1.4 (https://startbootstrap.com/theme/sb-admin-2)
 * Copyright 2013-2024 Start Bootstrap
 * Licensed under MIT
 * Adapted for Bootstrap 5
 */

/* -------------------------------------------------------
   Global Styles & Overrides
   ------------------------------------------------------- */
html {
  position: relative;
  min-height: 100%;
}

body {
  height: 100%;
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.875rem;
  color: #333;
}

a {
  color: #4e73df;
}
a:hover {
  color: #224abe;
}

#wrapper {
  display: flex;
  min-height: 100vh;
}

#content-wrapper {
  background-color: #f8f9fc;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

#content-wrapper #middle {
  flex: 1 0 auto;
}

/* -------------------------------------------------------
   Scrollbar Styling
   ------------------------------------------------------- */
::-webkit-scrollbar {
  width: 0.5rem;
}
::-webkit-scrollbar-track {
  background: #ddd;
}
::-webkit-scrollbar-thumb {
  background: #b7b9cc;
  border-radius: 0.25rem;
}

/* -------------------------------------------------------
   Sidebar
   ------------------------------------------------------- */
.sidebar {
  width: 235px;
  min-height: 100vh;
  flex-shrink: 0;
  transition: width 0.15s ease-in-out;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1040;
}

.sidebar .nav-item {
  position: relative;
}

.sidebar .nav-item:last-child {
  margin-bottom: 1rem;
}

.sidebar .nav-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 10px;
  font-size: 14px;
  line-height: 14px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .nav-link i {
  font-size: 18px;
  margin-right: 0.5rem;
  width: 1.5rem;
  text-align: center;
}

.sidebar .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active,
.sidebar .nav-item.active > .nav-link {
  color: #fff;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.15);
}

/* Sidebar Brand */
.sidebar-brand {
  height: 50px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
  padding: 10px;
  text-align: center;
  letter-spacing: 0.05rem;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-brand .sidebar-brand-icon i {
  font-size: 2rem;
}

.sidebar-brand .sidebar-brand-text {
  display: inline;
}

/* Sidebar Divider */
.sidebar-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 0 1rem 0.5rem;
}

/* Sidebar Heading */
.sidebar-heading {
  text-align: left;
  padding: 0 10px;
  font-weight: 700;
  font-size: 11px;
  line-height: 11px;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin: 6px 0;
}

/* Collapse inner */
.sidebar .collapse-inner {
  padding: 0;
  min-width: 10rem;
  font-size: 14px;
  margin: 0;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0;
}

.sidebar .collapse-inner .collapse-header {
  margin: 0;
  white-space: nowrap;
  padding: 0.5rem 1.5rem;
  font-weight: 800;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}

.sidebar .collapse-inner .collapse-item {
  padding: 6px 10px 6px 40px;
  margin: 0;
  display: block;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  white-space: nowrap;
  font-size: 14px;
  line-height: 18px;
  height: 32px;
  border: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .collapse-inner .collapse-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar .collapse-inner .collapse-item.active {
  color: #fff;
  font-weight: 700;
}

/* Sidebar Toggle */
.sidebar .sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.2s;
  font-size: 14px;
}
.sidebar .sidebar-toggle-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.25);
}
.sidebar.toggled .sidebar-toggle-btn i {
  transform: rotate(180deg);
}

/* Submenu arrow */
.sidebar .nav-link .submenu-arrow {
  float: right;
  transition: transform 0.15s;
}
.sidebar .nav-link[aria-expanded="true"] .submenu-arrow {
  transform: rotate(90deg);
}

/* -------------------------------------------------------
   Sidebar Toggled (Collapsed)
   ------------------------------------------------------- */
.sidebar.toggled {
  width: 6.5rem;
  overflow: visible;
}

.sidebar.toggled .sidebar-brand-text {
  display: none;
}

.sidebar.toggled .sidebar-heading {
  text-align: center;
  padding: 0 0.5rem;
  font-size: 0;
}

.sidebar.toggled .nav-link {
  text-align: center;
  padding: 0.75rem 1rem;
}

.sidebar.toggled .nav-link span {
  display: none;
}

.sidebar.toggled .nav-link i {
  font-size: 20px;
  margin-right: 0;
  width: auto;
}

.sidebar.toggled .collapse-inner {
  position: absolute;
  left: calc(100% + 0.5rem);
  top: 0;
  z-index: 1050;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
  border-radius: 0.35rem;
  min-width: 12rem;
}

.sidebar.toggled .sidebar-divider {
  margin: 0 0.5rem 0.5rem;
}

/* -------------------------------------------------------
   Topbar / Navbar
   ------------------------------------------------------- */
.topbar {
  height: 50px;
  z-index: 1030;
}

.topbar .navbar-brand {
  color: #333 !important;
  font-weight: 400;
  padding: 0;
  display: inline-block;
  height: 50px;
  line-height: 40px;
  margin-left: 15px;
}

.topbar .navbar-brand img {
  height: 35px;
}

.topbar .topbar-divider {
  width: 0;
  border-right: 1px solid #e3e6f0;
  height: 30px;
  margin: auto 1rem;
}

.topbar .nav-link {
  color: #858796 !important;
  padding: 0 10px;
  position: relative;
  height: 50px;
  display: flex;
  align-items: center;
  font-size: 14px;
}

.topbar .nav-link:hover {
  color: #333 !important;
  background-color: #eaecf4;
}

.topbar .dropdown-menu,
.navbar-expand.topbar .navbar-nav .dropdown-menu {
  position: absolute;
  right: 0;
  left: auto;
  font-size: 14px;
  background: #f9f9f9;
  border: 0;
  border-radius: 0;
  margin-top: 0;
  padding-top: 10px;
  padding-bottom: 10px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  z-index: 1050;
}

.topbar .dropdown-item {
  padding: 4px 13px;
  white-space: normal;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #333;
}

.topbar .dropdown-item:hover {
  background-color: #eee;
  color: #1F262C;
}

.topbar .dropdown-item i {
  width: 20px;
  text-align: center;
  margin-right: 6px;
}

.topbar .dropdown-item:active {
  background-color: #4e73df;
  color: #fff;
}

.topbar .badge-counter {
  position: absolute;
  transform: scale(0.7);
  transform-origin: top right;
  right: 0.25rem;
  top: 0.75rem;
}

.topbar .dropdown-toggle::after {
  display: none;
}

.topbar .dropdown {
  margin: 0;
}

/* Mobile toggle */
.topbar .sidebar-toggle {
  background: transparent;
  border: 0;
  color: #858796;
  font-size: 23px;
  padding: 0 0.75rem;
  height: 50px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.topbar .sidebar-toggle:hover {
  color: #333;
}

/* -------------------------------------------------------
   Cards
   ------------------------------------------------------- */
.card {
  margin-bottom: 1.5rem;
  border: none;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

.card > .card-header {
  background-color: #f8f9fc;
  border-bottom: 1px solid #e3e6f0;
  padding: 0.75rem 1.25rem;
}

.dashboard .card {
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

/* -------------------------------------------------------
   Page Header / Breadcrumb Area
   ------------------------------------------------------- */
#page-header {
  background: #fff;
  padding: 15px 15px;
  border-bottom: 1px solid #e3e6f0;
  margin-bottom: 1.5rem;
}

#page-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
}

/* -------------------------------------------------------
   Footer
   ------------------------------------------------------- */
.sticky-footer {
  padding: 2rem 0;
  flex-shrink: 0;
}
.sticky-footer .copyright {
  line-height: 1;
  font-size: 0.8rem;
}

/* -------------------------------------------------------
   Utility - Background Gradient
   ------------------------------------------------------- */
.bg-gradient-primary {
  background-color: #4e73df;
  background-image: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
  background-size: cover;
}

.bg-gradient-secondary {
  background-color: #858796;
  background-image: linear-gradient(180deg, #858796 10%, #60616f 100%);
  background-size: cover;
}

.bg-gradient-success {
  background-color: #1cc88a;
  background-image: linear-gradient(180deg, #1cc88a 10%, #13855c 100%);
  background-size: cover;
}

.bg-gradient-info {
  background-color: #36b9cc;
  background-image: linear-gradient(180deg, #36b9cc 10%, #258391 100%);
  background-size: cover;
}

.bg-gradient-warning {
  background-color: #f6c23e;
  background-image: linear-gradient(180deg, #f6c23e 10%, #dda20a 100%);
  background-size: cover;
}

.bg-gradient-danger {
  background-color: #e74a3b;
  background-image: linear-gradient(180deg, #e74a3b 10%, #be2617 100%);
  background-size: cover;
}

/* -------------------------------------------------------
   Utility - Borders
   ------------------------------------------------------- */
.border-left-primary   { border-left: 0.25rem solid #4e73df !important; }
.border-left-secondary { border-left: 0.25rem solid #858796 !important; }
.border-left-success   { border-left: 0.25rem solid #1cc88a !important; }
.border-left-info      { border-left: 0.25rem solid #36b9cc !important; }
.border-left-warning   { border-left: 0.25rem solid #f6c23e !important; }
.border-left-danger    { border-left: 0.25rem solid #e74a3b !important; }
.border-bottom-primary   { border-bottom: 0.25rem solid #4e73df !important; }
.border-bottom-secondary { border-bottom: 0.25rem solid #858796 !important; }
.border-bottom-success   { border-bottom: 0.25rem solid #1cc88a !important; }
.border-bottom-info      { border-bottom: 0.25rem solid #36b9cc !important; }
.border-bottom-warning   { border-bottom: 0.25rem solid #f6c23e !important; }
.border-bottom-danger    { border-bottom: 0.25rem solid #e74a3b !important; }

/* -------------------------------------------------------
   Animations
   ------------------------------------------------------- */
.animated--grow-in {
  animation-name: growIn;
  animation-duration: 200ms;
  animation-timing-function: transform cubic-bezier(0.18, 1.25, 0.4, 1), opacity cubic-bezier(0, 1, 0.4, 1);
}

@keyframes growIn {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.animated--fade-in {
  animation-name: fadeIn;
  animation-duration: 200ms;
  animation-timing-function: opacity cubic-bezier(0, 1, 0.4, 1);
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* -------------------------------------------------------
   Dropdowns - Animated
   ------------------------------------------------------- */
.dropdown .dropdown-menu {
  animation-name: growIn;
  animation-duration: 200ms;
  animation-timing-function: transform cubic-bezier(0.18, 1.25, 0.4, 1), opacity cubic-bezier(0, 1, 0.4, 1);
}

/* -------------------------------------------------------
   Responsive - Mobile
   ------------------------------------------------------- */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: -235px;
    height: 100vh;
    z-index: 1050;
    transition: left 0.2s ease-in-out;
  }

  .sidebar.show-mobile {
    left: 0;
  }

  .sidebar.toggled {
    width: 235px;
    left: -235px;
  }

  .sidebar.toggled.show-mobile {
    left: 0;
  }

  .sidebar.toggled .nav-link span {
    display: inline;
  }

  .sidebar.toggled .sidebar-brand-text {
    display: inline;
  }

  .sidebar.toggled .sidebar-heading {
    text-align: left;
    padding: 0 10px;
    font-size: 11px;
  }

  .sidebar.toggled .nav-link {
    text-align: left;
    padding: 12px 10px;
  }

  .sidebar.toggled .nav-link i {
    font-size: 18px;
    margin-right: 0.5rem;
    width: 1.5rem;
  }

  .sidebar.toggled .collapse-inner {
    position: static;
    left: auto;
    box-shadow: none;
    border-radius: 0;
  }

  /* Overlay when sidebar is visible on mobile */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1045;
  }

  .sidebar-overlay.show {
    display: block;
  }
}

@media (min-width: 769px) {
  .sidebar-overlay {
    display: none !important;
  }
}

/* -------------------------------------------------------
   Print styles
   ------------------------------------------------------- */
@media print {
  .sidebar,
  .topbar,
  .sticky-footer {
    display: none !important;
  }
  #content-wrapper #middle {
    margin: 0;
    padding: 0;
  }
}
