/* —— App shell（侧栏推拉） —— */
.app-screen {
  position: relative;
  min-height: 100vh;
}

.app-screen.sidebar-collapsed .main {
  margin-left: 0;
  width: 100%;
  padding-left: 28px;
  padding-right: 28px;
}

/* —— Sidebar —— */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 10;
  transition: transform 0.28s ease;
  will-change: transform;
}

.app-screen.sidebar-collapsed .sidebar {
  transform: translateX(calc(-1 * var(--sidebar-width)));
  pointer-events: none;
}

.sidebar-edge-toggle {
  position: absolute;
  right: -13px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 12;
  width: 26px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.sidebar-edge-toggle:hover {
  background: #fff;
  color: var(--text);
  border-color: rgba(0, 0, 0, 0.12);
}

.sidebar-expand-handle {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 11;
  width: 28px;
  height: 56px;
  padding: 0;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s, color 0.2s;
}

.sidebar-expand-handle:hover {
  background: #fff;
  color: var(--text);
}

.sidebar-expand-handle.hidden {
  display: none;
}

.brand {
  padding: 0 12px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.brand-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.nav {
  list-style: none;
  flex: 1;
}

.nav-section {
  margin-bottom: 12px;
}

.nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 4px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.05);
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s, border-color 0.2s;
}

.nav-section-header:hover {
  background: rgba(0, 0, 0, 0.08);
}

.nav-section-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.nav-section-chevron {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  transition: transform 0.25s ease;
  transform: rotate(90deg);
}

.nav-section.collapsed .nav-section-chevron {
  transform: rotate(0deg);
}

.nav-section-body {
  overflow: hidden;
  transition: max-height 0.28s ease, opacity 0.2s ease;
  max-height: 320px;
  opacity: 1;
}

.nav-section.collapsed .nav-section-body {
  max-height: 0;
  opacity: 0;
}

.nav-sublist {
  list-style: none;
  padding: 4px 0 0;
}

.nav-item {
  display: block;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.nav-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

.nav-item.active {
  background: var(--text);
  color: #fff;
}

.sidebar-footer {
  padding: 12px;
  font-size: 11px;
  color: var(--text-secondary);
}

/* —— Main —— */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 40px 48px 60px;
  width: calc(100% - var(--sidebar-width));
  max-width: none;
  transition: margin-left 0.28s ease, width 0.28s ease, padding 0.28s ease;
}

.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.page-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.5;
}

