:root {
  --sidebar-width: 260px;
}

body {
  background: #f6f8fb;
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

/* Dark vertical sidebar */
.navbar-vertical {
  background: #111827;
  border-right: 0;
  color: #fff;
}

/* Brand area */
.navbar-vertical .navbar-brand {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.navbar-vertical .navbar-brand a {
  color: #fff;
  text-decoration: none;
}

/* Optional subtitle under brand */
.navbar-vertical .navbar-brand-subtitle {
  display: block;
  color: #9ca3af;
  font-size: .75rem;
  font-weight: 400;
  margin-top: .25rem;
}

/* Sidebar nav spacing */
.navbar-vertical .navbar-nav {
  padding: 1rem;
}

/* Main nav links */
.navbar-vertical .nav-link {
  color: #d1d5db;
  border-radius: .5rem;
  padding: .7rem .85rem;
  font-size: .925rem;
  font-weight: 500;
  margin-bottom: .2rem;
}

/* Icons */
.navbar-vertical .nav-link-icon {
  color: inherit;
  opacity: 1;
  width: 1.25rem;
  margin-right: .65rem;
}

.navbar-vertical .nav-link-icon i {
  font-size: 1.15rem;
}

/* Hover and active states */
.navbar-vertical .nav-link:hover,
.navbar-vertical .nav-link.active,
.navbar-vertical .nav-item.active > .nav-link,
.navbar-vertical .nav-item.show > .nav-link {
  background: rgba(255,255,255,.09);
  color: #fff;
}

/* Dropdown arrow */
.navbar-vertical .dropdown-toggle::after {
  color: #9ca3af;
}

/* Dropdown menu inside sidebar */
.navbar-vertical .dropdown-menu {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: .25rem 0 .35rem 2.35rem;
  margin: 0;
}

/* Dropdown items */
.navbar-vertical .dropdown-item {
  color: #9ca3af;
  border-radius: .45rem;
  padding: .5rem .75rem;
  font-size: .875rem;
  margin-bottom: .15rem;
}

/* Dropdown item hover/active */
.navbar-vertical .dropdown-item:hover,
.navbar-vertical .dropdown-item:focus,
.navbar-vertical .dropdown-item.active {
  background: rgba(255,255,255,.08);
  color: #fff;
}

/* Keep opened dropdowns visible cleanly */
.navbar-vertical .dropdown-menu.show {
  display: block;
}

/* Footer/user area */
.navbar-vertical .sidebar-footer,
.navbar-vertical .navbar-footer {
  border-top: 1px solid rgba(255,255,255,.08);
  color: #9ca3af;
  font-size: .8rem;
}

/* Logout button in sidebar */
.navbar-vertical .btn-outline-secondary {
  color: #d1d5db;
  border-color: rgba(255,255,255,.18);
}

.navbar-vertical .btn-outline-secondary:hover {
  color: #fff;
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.25);
}

.sidebar {
  width: var(--sidebar-width);
  background: #111827;
  color: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand h1 {
  font-size: 1rem;
  margin: 0;
  color: #fff;
  font-weight: 700;
}

.sidebar-brand span {
  display: block;
  color: #9ca3af;
  font-size: .75rem;
  margin-top: .25rem;
}

.sidebar-nav {
  padding: 1rem;
  flex: 1;
}

.sidebar-nav .nav-link {
  color: #d1d5db;
  border-radius: .5rem;
  padding: .7rem .85rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .2rem;
  font-weight: 500;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  background: rgba(255,255,255,.09);
  color: #fff;
  text-decoration: none;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
  color: #9ca3af;
  font-size: .8rem;
}

.main {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
}

.topbar {
  height: 70px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.content {
  padding: 1.75rem;
}

.metric-card,
.table-card {
  border: 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: .75rem;
  display: grid;
  place-items: center;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 1.35rem;
}

.status-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
  display: inline-block;
  margin-right: .35rem;
}

.dot-green { background: #22c55e; }
.dot-yellow { background: #f59e0b; }
.dot-red { background: #ef4444; }

.aging-row {
  display: flex;
  justify-content: space-between;
  padding: .85rem 0;
  border-bottom: 1px solid #eef0f4;
}

.aging-row:last-child {
  border-bottom: 0;
}

@media (max-width: 992px) {
  .sidebar {
    position: static;
    width: 100%;
  }

  .app-shell {
    display: block;
  }

  .main {
    margin-left: 0;
    width: 100%;
  }

  .topbar {
    position: static;
  }
}