/* ===================================================================
   DDS Inventory — Light Admin Theme
   Restyles the sidebar + top bar in a clean light-mode look.
   No dark mode variant is included, per request.
=================================================================== */

:root {
  --offcanvas-width: 270px;
  --topNavbarHeight: 64px;

  --lt-bg: #f4f6fb;
  --lt-sidebar-bg: #ffffff;
  --lt-sidebar-border: #edf0f6;
  --lt-topbar-bg: #ffffff;

  --lt-text: #1f2430;
  --lt-text-muted: #97a0b3;
  --lt-text-soft: #6b7280;

  --lt-hover-bg: #f3f6fd;
  --lt-active-grad-start: #7c9bff;
  --lt-active-grad-end: #4f6ef7;
  --lt-active-shadow: rgba(79, 110, 247, 0.35);

  --lt-icon-bg: #f1f3f9;
  --lt-icon-color: #6b7280;

  --lt-divider: #edf0f6;
}

body {
  background-color: var(--lt-bg);
  color: var(--lt-text);
}

/* ---------------- Top bar ---------------- */
.app-topbar {
  background-color: var(--lt-topbar-bg) !important;
  border-bottom: 1px solid var(--lt-sidebar-border);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  height: var(--topNavbarHeight);
}

.app-topbar .navbar-brand {
  color: var(--lt-text) !important;
  font-weight: 700;
}

.app-topbar .navbar-toggler {
  border: none;
  color: var(--lt-text);
}

.app-topbar .navbar-toggler .navbar-toggler-icon {
  filter: invert(20%);
}

.app-topbar .admin-name {
  color: var(--lt-text);
}

.app-topbar .btn-outline-primary {
  --bs-btn-color: #4f6ef7;
  --bs-btn-border-color: #4f6ef7;
  --bs-btn-hover-bg: #4f6ef7;
  --bs-btn-hover-border-color: #4f6ef7;
}

/* ---------------- Sidebar shell ---------------- */
.sidebar-nav {
  width: var(--offcanvas-width);
  background-color: var(--lt-sidebar-bg) !important;
  border-right: 1px solid var(--lt-sidebar-border);
}

.sidebar-nav .offcanvas-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ---------------- Brand block ---------------- */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--lt-divider);
}

.sidebar-brand .brand-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  background: linear-gradient(135deg, var(--lt-active-grad-start), var(--lt-active-grad-end));
}

.sidebar-brand .brand-title {
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--lt-text);
}

.sidebar-brand .brand-subtitle {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--lt-text-muted);
  text-transform: uppercase;
}

/* ---------------- Menu ---------------- */
.sidebar-menu {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 12px 24px;
}

.sidebar-menu::-webkit-scrollbar {
  width: 6px;
}
.sidebar-menu::-webkit-scrollbar-thumb {
  background: #dfe3ee;
  border-radius: 3px;
}

.nav-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lt-text-muted);
  padding: 18px 10px 8px;
}

.nav-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--lt-divider);
}

.sidebar-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 12px;
  color: var(--lt-text);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-link-item:hover {
  background-color: var(--lt-hover-bg);
  color: var(--lt-text);
}

.sidebar-link-item.active {
  color: #fff;
  background: linear-gradient(135deg, var(--lt-active-grad-start), var(--lt-active-grad-end));
  box-shadow: 0 8px 16px -6px var(--lt-active-shadow);
}

.menu-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background-color: var(--lt-icon-bg);
  color: var(--lt-icon-color);
}

.sidebar-link-item.active .menu-icon {
  background-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.menu-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-chevron {
  font-size: 0.75rem;
  color: var(--lt-text-muted);
  transition: transform 0.2s ease;
}

.sidebar-link-item.active .menu-chevron {
  color: #fff;
}

.sidebar-link-item[aria-expanded="true"] .menu-chevron {
  transform: rotate(180deg);
}

/* Pastel icon accent colors, mirrors the varied icon colors in the reference design */
.icon-blue   { background-color: #e8edff; color: #4f6ef7; }
.icon-purple { background-color: #f1e8ff; color: #8b5cf6; }
.icon-green  { background-color: #e4f8ee; color: #22c55e; }
.icon-orange { background-color: #fff1e0; color: #f97316; }
.icon-pink   { background-color: #ffe8f1; color: #ec4899; }
.icon-teal   { background-color: #e2faf7; color: #14b8a6; }
.icon-red    { background-color: #ffe9e9; color: #ef4444; }
.icon-indigo { background-color: #e9ecff; color: #6366f1; }
.icon-cyan   { background-color: #e2f6ff; color: #0ea5e9; }
.icon-amber  { background-color: #fff7de; color: #d97706; }

/* Submenu */
.submenu {
  padding-left: 10px;
}

.submenu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 34px;
  margin-bottom: 2px;
  border-radius: 10px;
  color: var(--lt-text-soft);
  font-weight: 500;
  font-size: 0.86rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.submenu-link:hover {
  background-color: var(--lt-hover-bg);
  color: var(--lt-active-grad-end);
}

.submenu-link i {
  font-size: 0.85rem;
  color: inherit;
}

/* ---------------- Main content area ---------------- */
main {
  min-height: calc(100vh - var(--topNavbarHeight));
}

@media (min-width: 992px) {
  body {
    overflow: auto !important;
  }
  main {
    margin-left: var(--offcanvas-width);
  }
  .offcanvas-backdrop::before {
    display: none;
  }
  .sidebar-nav {
    -webkit-transform: none;
    transform: none;
    visibility: visible !important;
    height: calc(100% - var(--topNavbarHeight));
    top: var(--topNavbarHeight);
  }
}
