/* Left navigation layout for the PitchHub-inspired shell */

.app-main {
  min-height: 100vh;
  margin-left: 236px;
  padding-bottom: 0;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: 236px;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border-right: 1px solid var(--line);
  box-shadow: none;
  transform: none;
}

.sidebar .brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  height: 64px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.sidebar .brand img {
  width: 34px;
  height: 34px;
  border-radius: 4px;
}

.sidebar .brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.sidebar .brand-copy strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.sidebar .brand-copy small {
  margin-top: 3px;
  color: var(--ink-4);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.sidebar .sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 10px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.sidebar .nav-section {
  margin-bottom: 19px;
}

.sidebar .nav-label {
  padding: 0 10px 7px;
  color: var(--ink-4);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.sidebar .nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  margin: 1px 0;
  padding: 0 10px;
  border-radius: 3px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 400;
  transition: color 0.16s ease, background 0.16s ease;
}

.sidebar .nav-item:hover {
  color: var(--brand);
  background: #f5f8ff;
}

.sidebar .nav-item.active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}

.sidebar .nav-item.active::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--brand);
}

.sidebar .nav-item.active::after {
  display: none;
}

.sidebar .nav-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--ink-4);
}

.sidebar .nav-item:hover .nav-icon,
.sidebar .nav-item.active .nav-icon {
  color: var(--brand);
}

.sidebar .nav-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar .nav-badge {
  display: inline-grid;
  min-width: 16px;
  height: 16px;
  margin-left: auto;
  place-items: center;
  padding: 0 4px;
  border-radius: 2px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 8px;
  font-weight: 600;
}

.sidebar .nav-badge[hidden] {
  display: none;
}

.sidebar .sidebar-foot {
  flex: 0 0 auto;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.sidebar .sidebar-note {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-4);
  font-size: 9px;
  line-height: 1.5;
}

.sidebar .sidebar-note .live-dot {
  width: 5px;
  height: 5px;
  background: var(--lime);
}

.sidebar .sidebar-version {
  margin-top: 7px;
  color: #c1c8d1;
  font-size: 8px;
}

.sidebar .sidebar-version span {
  margin-left: 4px;
}

.sidebar .drawer-close {
  display: none;
}

/* The topbar is the content bar only; brand and menu become mobile-only. */
.topbar-brand {
  display: none;
}

.topbar {
  height: 64px;
  padding: 0 28px;
}

.topbar-left {
  gap: 14px;
  min-width: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  min-width: 0;
  color: var(--ink-4);
  font-size: 11px;
  white-space: nowrap;
}

.breadcrumb span {
  color: var(--ink-4);
}

.breadcrumb i {
  margin: 0 7px;
  color: var(--line-strong);
  font-style: normal;
}

.breadcrumb strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
}

.readonly-strip {
  padding-right: 28px;
  padding-left: 28px;
}

.sidebar-scrim {
  display: none;
}

@media (max-width: 1280px) {
  .topbar {
    padding: 0 24px;
  }

  .readonly-strip {
    padding-right: 24px;
    padding-left: 24px;
  }
}

@media (max-width: 1080px) {
  .app-main {
    margin-left: 0;
  }

  .sidebar {
    z-index: 80;
    width: 280px;
    padding: 24px 16px 16px;
    border-right: 1px solid var(--line);
    box-shadow: 20px 0 60px rgba(26, 42, 70, 0.16);
    transform: translateX(-102%);
    transition: transform 0.24s ease;
  }

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

  .sidebar .brand {
    height: auto;
    padding: 0 8px 24px;
    border-bottom: 0;
  }

  .sidebar .brand img {
    width: 40px;
    height: 40px;
  }

  .sidebar .brand-copy strong {
    font-size: 22px;
  }

  .sidebar .sidebar-nav {
    padding: 0;
  }

  .sidebar .nav-section {
    margin-bottom: 20px;
  }

  .sidebar .nav-label {
    padding: 0 10px 7px;
  }

  .sidebar .nav-item {
    height: 42px;
  }

  .sidebar .drawer-close {
    position: absolute;
    top: 20px;
    right: 12px;
    display: inline-grid;
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 75;
    display: block;
    background: rgba(26, 42, 70, 0.38);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .nav-open .sidebar-scrim {
    opacity: 1;
    visibility: visible;
  }

  .topbar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
  }

  .topbar-brand img {
    width: 32px;
    height: 32px;
  }

  .topbar-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
  }

  .topbar-brand-copy strong {
    color: var(--ink);
    font-size: 19px;
    font-weight: 700;
  }

  .topbar-brand-copy small {
    color: var(--ink-4);
    font-size: 7px;
    letter-spacing: 0.1em;
  }

  .breadcrumb {
    display: none;
  }

  .topbar {
    height: 60px;
    padding: 0 16px;
  }

  .topbar .menu-btn {
    display: inline-grid;
  }

  .readonly-strip {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: 58px;
    padding: 0 12px;
  }

  .topbar-left {
    gap: 7px;
  }

  .topbar-brand-copy small {
    display: none;
  }

  .topbar-brand-copy strong {
    font-size: 18px;
  }

  .readonly-strip {
    padding-right: 12px;
    padding-left: 12px;
  }
}
