/* -------------------------------------------------------------------------
   GHOSTLY DEEP DARK SIDEBAR
   ------------------------------------------------------------------------- */
:root {
  --sidebar-bg: #111111;
  --sidebar-item-hover: #222222;
  --sidebar-accent: var(--bs-primary);
  --sidebar-text: #ffffff;
  --sidebar-text-muted: #9ca3af;
  --tree-line-color: #333333;
}

.app-sidebar {
  background-color: var(--sidebar-bg) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: 1040;
}

.sidebar-brand {
  background-color: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  height: 4rem;
  flex-shrink: 0;
}

.sidebar-brand .brand-link {
  padding: 1.5rem 1rem;
}

/* Sidebar Search */
.sidebar-search {
  padding: 0 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.sidebar-search .form-control {
  background-color: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  border-radius: 8px;
  padding-left: 2.5rem;
  height: 42px;
}

.sidebar-search .search-icon {
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sidebar-text-muted);
}

/* Nav Links */
.nav-sidebar .nav-item {
  margin: 4px 12px;
}

.nav-sidebar .nav-link {
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--sidebar-text-muted);
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-sidebar .nav-link:hover {
  background-color: var(--sidebar-item-hover);
  color: #fff;
}

.nav-sidebar .nav-link.active {
  background-color: var(--sidebar-item-hover);
  color: #fff;
  box-shadow: none;
}

/* Sub-menu (Tree) Styling */
.nav-treeview {
  padding-left: 1.5rem;
  margin-left: 1rem;
  border-left: 1px solid var(--tree-line-color);
}

.nav-treeview .nav-item {
  margin: 2px 0;
}

.nav-treeview .nav-link {
  padding: 8px 12px;
  font-size: 0.9rem;
}

.nav-treeview .nav-link i {
  font-size: 0.5rem; /* Small dot or circle */
  margin-right: 10px;
}

/* Arrow adjustment */
.nav-sidebar .nav-arrow {
  font-size: 0.75rem;
  transition: transform 0.3s;
}

.menu-open > .nav-link .nav-arrow {
  transform: rotate(90deg);
}

/* -------------------------------------------------------------------------
   COLLAPSED STATE (MINI SIDEBAR)
   ------------------------------------------------------------------------- */
body.sidebar-collapse .app-sidebar {
  width: 80px !important;
}

.sidebar-collapse .brand-text,
.sidebar-collapse .nav-link p,
.sidebar-collapse .sidebar-search span,
.sidebar-collapse .info,
.sidebar-collapse .nav-arrow {
  display: none !important;
}

.sidebar-collapse .nav-sidebar .nav-item {
  margin: 8px 0;
  display: flex;
  justify-content: center;
}

.sidebar-collapse .nav-link {
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
}

.sidebar-collapse .nav-icon {
  margin: 0 !important;
  font-size: 1.3rem;
}

.sidebar-collapse .nav-treeview {
  display: none !important;
}

.sidebar-collapse .sidebar-search {
  display: flex;
  justify-content: center;
}

.sidebar-collapse .sidebar-search .form-control {
  width: 42px;
  padding: 0;
  text-align: center;
}

.sidebar-collapse .sidebar-search .search-icon {
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Sidebar wrapper fills remaining space and scrolls */
.sidebar-wrapper {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

.sidebar-wrapper::-webkit-scrollbar {
  width: 4px;
}
.sidebar-wrapper::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

/* Footer Section */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  background-color: var(--sidebar-bg);
}

.user-panel {
  padding: 10px;
  border-radius: 12px;
  background: transparent;
}

.user-panel img {
  border-radius: 10px;
  width: 40px;
  height: 40px;
}

/* Vehicle Search Bar (Main Content) */
.vehicle-search-bar {
  background-color: #1a1a1a;
  border: 1px solid #333;
  padding: 20px;
  border-radius: 12px;
}

.vehicle-search-bar .btn-search {
  background-color: var(--sidebar-accent);
  border-radius: 8px;
}

/* Extra Tweaks */
.app-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 6px;
}

/* Global Heading Size Reductions */
h1, .h1 { font-size: calc(2.5rem - 10px) !important; }
h2, .h2 { font-size: calc(2.0rem - 10px) !important; }
h3, .h3 { font-size: calc(1.75rem - 10px) !important; }
h4, .h4 { font-size: calc(1.5rem - 10px) !important; }
h5, .h5 { font-size: calc(1.25rem - 10px) !important; }
h6, .h6 { font-size: calc(1.0rem - 10px) !important; }
