/* ================================================================
   InspectDue sidebar (centralized)
   Stripe-inspired white sidebar, 180px wide, solid-blue active state.
   One source of truth — referenced by every page via <link>.
================================================================ */

:root {
  --sidebar-width: 180px;
  --sidebar-bg: #ffffff;
  --sidebar-border: #e6ebf1;
  --sidebar-text: #425466;
  --sidebar-text-muted: #8792a2;
  --sidebar-text-hover: #1a56db;
  --sidebar-section: #8792a2;
  --sidebar-active-bg: #1a56db;
  --sidebar-active-text: #ffffff;
  --sidebar-hover-bg: #f5f7fa;
  --sidebar-logo: #1a56db;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  font-family: 'DM Sans', sans-serif;
}

.sidebar-logo {
  padding: 0;
  border-bottom: 1px solid #f1f4f8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.sidebar-logo img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 8px;
  overflow-y: auto;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--sidebar-section);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--sidebar-text);
  text-decoration: none;
  margin-bottom: 1px;
  transition: background 0.12s, color 0.12s;
  cursor: pointer;
  line-height: 1.3;
}

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

.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
}

.nav-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}
.nav-icon svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--sidebar-border);
}

.company-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  background: var(--sidebar-hover-bg);
}
.company-avatar {
  width: 28px;
  height: 28px;
  background: var(--sidebar-active-bg);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.company-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--sidebar-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.company-plan {
  font-size: 10px;
  color: var(--sidebar-text-muted);
}

.main {
  margin-left: var(--sidebar-width);
  flex: 1;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}
.sidebar-overlay.show {
  display: block;
}

@media (max-width: 700px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s;
    width: 240px;
  }
  .sidebar.mobile-open {
    left: 0;
  }
  .main {
    margin-left: 0 !important;
  }
}
