/* Web Dashboard Sidebar — Warm Studio */
.web-dashboard-page { margin: 0; background: var(--bg, #faf8f5); }

.web-mobile-bar,
.web-sidebar-backdrop,
.sidebar-close-button {
  display: none;
}

.web-mobile-bar {
  position: sticky;
  top: 0;
  z-index: 70;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(28, 25, 23, 0.08);
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(18px);
}

.web-mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.web-mobile-brand .logo-mark,
.sidebar-logo .logo-mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.web-mobile-brand .logo-mark img,
.sidebar-logo .logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.web-mobile-brand .logo-text,
.sidebar-logo .logo-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink, #1c1917);
  letter-spacing: -0.5px;
}

.sidebar-toggle-button,
.sidebar-close-button {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid rgba(28, 25, 23, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink, #1c1917);
  cursor: pointer;
}

.sidebar-toggle-button span,
.sidebar-close-button span {
  position: absolute;
  left: 50%;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%);
}

.sidebar-toggle-button span:nth-child(1) { top: 15px; }
.sidebar-toggle-button span:nth-child(2) { top: 21px; }
.sidebar-toggle-button span:nth-child(3) { top: 27px; }

.sidebar-close-button span:nth-child(1) {
  top: 21px;
  transform: translateX(-50%) rotate(45deg);
}

.sidebar-close-button span:nth-child(2) {
  top: 21px;
  transform: translateX(-50%) rotate(-45deg);
}

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

.web-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-panel, #fff);
  border-right: 1px solid var(--line, #e7e5e4);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
  transition: transform 0.25s ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 12px;
  border-bottom: 1px solid var(--line, #e7e5e4);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted, #78716c);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  text-align: left;
}

.nav-item:hover { background: var(--bg-subtle, #f5f2ed); color: var(--ink, #1c1917); }
.nav-item.is-active { background: rgba(13, 148, 136, 0.08); color: var(--accent, #0d9488); font-weight: 600; }

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: currentColor;
}

.sidebar-footer {
  border-top: 1px solid var(--line, #e7e5e4);
  padding: 12px 8px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-top: 4px;
}

.sidebar-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent, #0d9488), var(--accent-2, #d97706));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink, #1c1917);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-content {
  flex: 1;
  padding: 32px 32px 120px;
  min-width: 0;
  max-width: 1100px;
}

@media (max-width: 768px) {
  body.sidebar-open {
    overflow: hidden;
  }

  .web-mobile-bar {
    display: flex;
  }

  .web-shell {
    min-height: calc(100vh - 69px);
  }

  .web-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(82vw, 320px);
    max-width: 320px;
    z-index: 80;
    box-shadow: 0 24px 70px rgba(28, 25, 23, 0.18);
    transform: translateX(-100%);
  }

  .web-sidebar.open { transform: translateX(0); }

  .web-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 75;
    border: none;
    background: rgba(28, 25, 23, 0.28);
  }

  body.sidebar-open .web-sidebar-backdrop {
    display: block;
  }

  .sidebar-close-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .web-content {
    padding: 20px 16px 120px;
    width: 100%;
    max-width: none;
  }

  .sidebar-user {
    padding-inline: 10px;
  }

  .nav-item {
    min-height: 44px;
    font-size: 0.92rem;
  }
}
