/* =========================================
   PLATFORM SIDEBAR — left nav for platform admin tools.
   Lives inside .app-container alongside .main-container.
   ========================================= */

.platform-layout .sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 1.25rem 0;
  overflow-y: auto;
}

.sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  padding: 0.5rem 1.25rem 0.35rem;
  margin-top: 1.25rem;
}

.sidebar-label:first-child {
  margin-top: 0;
}

.sidebar-link {
  display: block;
  padding: 0.35rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.sidebar-link:hover {
  color: var(--ink);
  background: var(--bg-2);
}

.sidebar-link.is-active {
  color: var(--accent);
  font-weight: 600;
}

.sidebar-empty {
  padding: 0.35rem 1.25rem;
  font-size: 0.85rem;
  color: var(--ink-4);
  font-style: italic;
}

/* ── Sidebar FAB (hidden on desktop) ── */

.platform-sidebar-fab {
  display: none;
}

/* ── Sidebar backdrop (hidden on desktop) ── */

.sidebar-backdrop {
  display: none;
}

/* ── Mobile ── */

@media (max-width: 767px) {
  .platform-layout .sidebar {
    position: fixed;
    z-index: 200;
    top: 0;
    bottom: 0;
    left: 0;
    width: 220px;
    transform: translateX(-100%);
    transition: transform 200ms ease-out;
    box-shadow: none;
  }
  .platform-layout .sidebar.is-open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  }

  .platform-layout .sidebar-link {
    min-height: 44px;
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0,0,0,0.25);
  }
  .sidebar-backdrop.is-open {
    display: block;
  }

  .platform-sidebar-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    font-size: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 100;
  }
}
