:root {
  --pa-bg: #eef2f7;
  --pa-side: #0f172a;
  --pa-side-soft: #172033;
  --pa-text: #111827;
  --pa-muted: #6b7280;
  --pa-border: #e5e7eb;
  --pa-primary: #0f766e;
  --pa-font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

body.pa-shell {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  background: var(--pa-bg);
  color: var(--pa-text);
  font-family: var(--pa-font);
}

.pa-sidebar {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--pa-side);
  color: #fff;
  padding: 18px 14px;
  overflow: auto;
}

.pa-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px 22px;
}

.pa-brandMark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pa-primary);
  color: #fff;
  font-weight: 900;
  font-size: 20px;
}

.pa-brandTitle { font-weight: 900; font-size: 16px; }
.pa-brandSub { margin-top: 3px; color: rgba(255,255,255,.62); font-size: 12px; }

.pa-nav { display: grid; gap: 8px; }
.pa-navTitle {
  display: flex;
  align-items: center;
  min-height: 38px;
  color: rgba(255,255,255,.92);
  font-size: 14px;
  font-weight: 800;
  padding: 0 10px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}

.pa-navTitle:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}

.pa-navTitle::after {
  content: "›";
  margin-left: auto;
  color: rgba(255,255,255,.72);
  font-size: 18px;
  line-height: 1;
  transition: transform .2s ease;
}

.pa-navGroup.is-collapsed .pa-navTitle::after {
  transform: rotate(-90deg);
}

.pa-navGroup.is-collapsed .pa-navItem {
  display: none;
}

.pa-navGroup:not(.is-collapsed) .pa-navTitle {
  margin-bottom: 3px;
}

.pa-navItem {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px 0 16px;
  border-radius: 8px;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.pa-navItem:hover,
.pa-navItem.active {
  background: var(--pa-side-soft);
  color: #fff;
}

.pa-navFolder {
  margin: 4px 0;
}

.pa-navFolderTitle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  font-weight: 700;
}

.pa-subNav {
  display: grid;
  gap: 2px;
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,.12);
}

.pa-subNav .pa-navItem {
  min-height: 34px;
  padding-left: 8px;
  font-size: 13px;
}

.pa-subNav .pa-subNav {
  margin-left: 8px;
  padding-left: 10px;
}

.pa-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pa-icon svg { width: 18px; height: 18px; display: block; }

.pa-main {
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
}

.pa-topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--pa-border);
}

.pa-topTitle { font-weight: 900; font-size: 16px; }
.pa-topSub { margin-top: 4px; color: var(--pa-muted); font-size: 12px; }

.pa-content {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: var(--pa-bg);
}

@media (max-width: 760px) {
  body.pa-shell { grid-template-columns: 1fr; }
  .pa-sidebar {
    min-height: auto;
    max-height: 42vh;
    max-height: 42dvh;
  }
  .pa-brand { padding-bottom: 12px; }
  .pa-nav { gap: 10px; }
  .pa-main { min-height: 58vh; min-height: 58dvh; }
  .pa-topbar { height: auto; min-height: 56px; padding: 10px 14px; }
  .pa-topSub { display: none; }
}
