/* ============================================================
   Forkast — Shared Sidebar (left-hand navigation)
   Used by all dashboard pages. Mirrors the Forkast Dashboard
   design (Sora/Inter stack, fixed 224px rail with active accent).
   ============================================================ */

:root {
  --sidebar-w: 224px;
  --sb-brand: #0fb857;
  --sb-brand-light: #f0fdf4;
  --sb-brand-text: #166534;
  --sb-brand-border: #bbf7d0;
  --sb-surface: #ffffff;
  --sb-surface-2: #f9fafb;
  --sb-border: #e5e7eb;
  --sb-border-soft: #f3f4f6;
  --sb-text: #111827;
  --sb-text-secondary: #6b7280;
  --sb-text-muted: #9ca3af;
}

/* Layout: fixed rail on the left, page content offset by sidebar width */
body { min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--sb-surface);
  border-right: 1px solid var(--sb-border);
  position: fixed;
  top: 0; bottom: 0; left: 0;
  display: flex;
  flex-direction: column;
  z-index: 30;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

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

/* Logo ------------------------------------------------------------ */
.logo-lock {
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--sb-border);
}
.logo-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 56px;
  object-fit: contain;
  object-position: left center;
}

/* Nav list -------------------------------------------------------- */
.nav {
  padding: 12px 10px;
  flex: 1;
  overflow-y: auto;
}
.nav-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--sb-text-muted);
  padding: 8px 10px 6px;
}

/* Scope ("master view") toggle — injected by scope.js, replaces the
   static nav-label. A compact two-segment control: West Coast / All Stores. */
.nav-label.fk-scope {
  padding: 10px 10px 8px;
  text-transform: none;
  letter-spacing: 0;
}
.fk-scope-toggle {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--sb-surface-2);
  border: 1px solid var(--sb-border);
  border-radius: 9px;
}
.fk-scope-seg {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--sb-text-secondary);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.fk-scope-seg:hover { color: var(--sb-text); }
.fk-scope-seg[data-active="true"] {
  background: var(--sb-brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
  cursor: default;
}
.fk-scope-n {
  font-size: 10px;
  font-weight: 700;
  opacity: .75;
}
.fk-scope-seg[data-active="true"] .fk-scope-n { opacity: .95; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  text-decoration: none;
  background: none;
  border: 0;
  border-left: 2px solid transparent;
  color: var(--sb-text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 10px;
  margin: 2px 0;
  border-radius: 8px;
  transition: background-color .15s, color .15s;
  cursor: pointer;
  font-family: inherit;
}
.nav-item:hover {
  background: var(--sb-surface-2);
  color: var(--sb-text);
}
.nav-item.active {
  background: var(--sb-brand-light);
  color: var(--sb-brand-text);
  border-left-color: var(--sb-brand);
  font-weight: 600;
}
.nav-item.active svg {
  color: var(--sb-brand);
  stroke-width: 2.4;
}
.nav-item svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  stroke-width: 2;
}

.nav-foot {
  padding: 10px;
  border-top: 1px solid var(--sb-border);
}

/* Responsive: collapse rail under 900px -------------------------- */
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .main { margin-left: 0; }
}
