/* ============================================================
   PearlFlow · 设计契约共享层（tokens + 组件 + App Shell）
   页面禁止自创样式，只允许填充 .page-body 与 page-head 槽位
   ============================================================ */

:root {
  --primary: #0E3B35;
  --primary-hover: #16544B;
  --accent: #C6A15B;
  --bg: #F6F3ED;
  --surface: #FFFFFF;
  --border: #E5DFD4;
  --border-soft: #EFEBE2;
  --text: #212724;
  --text-sub: #6E756F;
  --text-mut: #9AA09B;
  --success: #2F7D5C;
  --warning: #C98A2B;
  --danger: #BF4A32;
  --info: #3A6EA5;

  --font-display: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --font-body: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: Consolas, "SF Mono", ui-monospace, monospace;

  --r-sm: 6px; --r-md: 10px; --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(33, 39, 36, .06);
  --shadow-md: 0 4px 16px rgba(33, 39, 36, .08);
  --shadow-lg: 0 12px 32px rgba(33, 39, 36, .12);
  --sidebar-w: 232px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 88% -80px, rgba(198, 161, 91, .14), transparent 70%),
    radial-gradient(700px 500px at -10% 110%, rgba(14, 59, 53, .05), transparent 65%),
    var(--bg);
  min-height: 100vh;
}

/* 极淡噪点纹理 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
svg { flex-shrink: 0; }

/* ============================ App Shell ============================ */
.app-nav {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, #1c5c52 60%, var(--accent) 160%);
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--font-display); font-size: 17px; letter-spacing: .02em; }
.brand-text small { font-size: 11px; color: var(--text-sub); letter-spacing: .08em; }

.nav-list { display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; flex: 1; }
.nav-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--text-sub);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.nav-list a:hover { background: #F4F1EA; color: var(--text); }
.nav-list a.active {
  background: rgba(14, 59, 53, .08);
  color: var(--primary);
  font-weight: 600;
}
.nav-list a.active svg { color: var(--primary); }

.nav-foot { padding: 14px 16px; border-top: 1px solid var(--border-soft); }
.provider-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: #FAF8F4;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
}
.provider-pill div { display: flex; flex-direction: column; line-height: 1.3; }
.provider-pill strong { font-size: 12px; }
.provider-pill small { font-size: 11px; color: var(--text-sub); font-family: var(--font-mono); }

.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-ok { background: var(--success); box-shadow: 0 0 0 3px rgba(47, 125, 92, .15); }
.dot-warn { background: var(--warning); box-shadow: 0 0 0 3px rgba(201, 138, 43, .15); }
.dot-danger { background: var(--danger); box-shadow: 0 0 0 3px rgba(191, 74, 50, .15); }
.dot-muted { background: var(--text-mut); box-shadow: 0 0 0 3px rgba(154, 160, 155, .15); }

.app-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* page-head：内容槽位顶部，样式共享但内容各页不同 */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 32px 32px 20px;
  max-width: 1280px;
}
.page-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: .02em; }
.page-sub { font-size: 13px; color: var(--text-sub); margin-top: 4px; }
.page-head-r { display: flex; align-items: center; gap: 8px; }

.page-body {
  padding: 4px 32px 48px;
  max-width: 1280px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 页面加载 staggered reveal */
.page-body > * { animation: rise .5s var(--ease) both; }
.page-body > *:nth-child(1) { animation-delay: .04s; }
.page-body > *:nth-child(2) { animation-delay: .08s; }
.page-body > *:nth-child(3) { animation-delay: .12s; }
.page-body > *:nth-child(4) { animation-delay: .16s; }
.page-body > *:nth-child(5) { animation-delay: .20s; }
.page-body > *:nth-child(6) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================ 按钮 ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: #F4F1EA; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #2C2214; font-weight: 600; }
.btn-accent:hover { background: #BFA468; border-color: #BFA468; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-sub); }
.btn-ghost:hover { background: rgba(33, 39, 36, .06); color: var(--text); }
.btn-danger { background: var(--surface); border-color: rgba(191, 74, 50, .4); color: var(--danger); }
.btn-danger:hover { background: rgba(191, 74, 50, .07); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-sm svg { width: 14px; height: 14px; }

/* ============================ 表单 ============================ */
.input, .select, .textarea {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.textarea { height: auto; padding: 9px 12px; line-height: 1.6; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 59, 53, .12);
}
.input::placeholder, .textarea::placeholder { color: var(--text-mut); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 500; color: var(--text-sub); }
.field .hint { font-size: 12px; color: var(--text-mut); }

/* ============================ 卡片 ============================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.card-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-title .sub { font-size: 12px; font-weight: 400; color: var(--text-mut); }

.kpi-label { font-size: 12px; color: var(--text-sub); letter-spacing: .04em; }
.kpi-value { font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1.2; margin-top: 6px; }
.kpi-value .unit { font-size: 14px; font-weight: 400; color: var(--text-sub); margin-left: 2px; }
.kpi-delta { font-size: 12px; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.kpi-delta.up { color: var(--success); }
.kpi-delta.down { color: var(--danger); }
.kpi-delta.flat { color: var(--text-mut); }

/* ============================ 标签 ============================ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  white-space: nowrap;
}
.tag-success { background: rgba(47, 125, 92, .1); color: #256349; }
.tag-warn { background: rgba(201, 138, 43, .12); color: #96631E; }
.tag-danger { background: rgba(191, 74, 50, .1); color: #A03D28; }
.tag-info { background: rgba(58, 110, 165, .1); color: #2F5A87; }
.tag-muted { background: rgba(154, 160, 155, .14); color: var(--text-sub); }
.tag-accent { background: rgba(198, 161, 91, .16); color: #8A6A2E; }

/* ============================ 表格 ============================ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
  letter-spacing: .04em;
  background: #FAF8F4;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.table tbody tr { transition: background .16s var(--ease); }
.table tbody tr:hover { background: #FBFAF7; }
.table tbody tr:last-child td { border-bottom: none; }
.mono { font-family: var(--font-mono); font-size: 12px; }

/* ============================ Tabs ============================ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab {
  position: relative;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text-sub);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .16s var(--ease), border-color .16s var(--ease);
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.tab .count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(33, 39, 36, .07);
  margin-left: 5px;
}

/* ============================ 进度条 ============================ */
.progress {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: #EDE9DF;
  overflow: hidden;
}
.progress > i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width .6s var(--ease);
}
.progress.is-failed > i { background: var(--danger); }
.progress.is-accent > i { background: var(--accent); }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-row .progress { flex: 1; }
.progress-row .pct { font-family: var(--font-mono); font-size: 12px; color: var(--text-sub); min-width: 34px; text-align: right; }

/* ============================ Modal ============================ */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(33, 39, 36, .45);
  backdrop-filter: blur(2px);
}
.modal-mask.open { display: flex; animation: fadeIn .2s var(--ease); }
.modal {
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  animation: popIn .2s var(--ease);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-head h3 { font-family: var(--font-display); font-size: 18px; }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 22px;
  border-top: 1px solid var(--border-soft);
}
.modal-close { width: 30px; height: 30px; padding: 0; border: none; background: none; border-radius: var(--r-sm); color: var(--text-sub); display: grid; place-items: center; }
.modal-close:hover { background: rgba(33, 39, 36, .07); color: var(--text); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

/* ============================ Toast ============================ */
.toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  font-size: 13px;
  background: var(--text);
  color: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s var(--ease);
}
.toast.success svg { color: #7BD4B0; }
.toast.error svg { color: #F2A08D; }
.toast.leaving { animation: toastOut .25s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ============================ 其他共享 ============================ */
.thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  object-fit: cover;
  border: 1px solid var(--border-soft);
  background: #F1EDE4;
  flex-shrink: 0;
}
.thumb.lg { width: 100%; height: auto; aspect-ratio: 1; }

.cell-flex { display: flex; align-items: center; gap: 10px; }
.cell-stack { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.cell-stack strong { font-size: 13px; font-weight: 600; }
.cell-stack small { font-size: 12px; color: var(--text-sub); }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-mut);
}
.empty-state svg { width: 32px; height: 32px; }
.empty-state .es-title { font-size: 16px; color: var(--text); font-weight: 600; }
.empty-state .es-desc { font-size: 14px; color: var(--text-sub); }

.skeleton {
  background: linear-gradient(90deg, #EFEBE2 25%, #F7F4EE 50%, #EFEBE2 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--text-sub); }
.small { font-size: 12px; }
.spacer { flex: 1; }

.checkbox {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* 行内加载图标旋转 */
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================ 本地生成 ============================ */
.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: var(--r-lg);
  background: #FAF8F4;
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: #EDF3F1; }
.dropzone svg { color: var(--text-mut); margin-bottom: 8px; }
.dropzone .dz-title { font-size: 14px; font-weight: 600; color: var(--text); }
.dropzone .dz-hint { font-size: 12px; color: var(--text-mut); margin-top: 4px; }

.dz-preview { display: flex; gap: 14px; align-items: center; }
.dz-preview img {
  width: 116px; height: 88px; object-fit: cover;
  border-radius: var(--r-md); border: 1px solid var(--border);
  background: #fff;
}
.dz-meta { flex: 1; min-width: 0; }
.dz-meta .dz-name {
  font-size: 13.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dz-meta .dz-sub { font-size: 12px; color: var(--text-mut); margin-top: 3px; }

.tpl-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tpl-card {
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: #fff;
  padding: 14px;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.tpl-card:hover { border-color: var(--text-sub); }
.tpl-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 59, 53, .08); }
.tpl-card .tpl-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.tpl-card .tpl-check { color: var(--primary); display: none; }
.tpl-card.selected .tpl-check { display: inline-flex; }
.tpl-card .tpl-prompt {
  font-size: 12px; line-height: 1.55; color: var(--text-sub);
  margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tpl-card .tpl-tags { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.tpl-card .tpl-tags span {
  font-size: 11px; color: var(--text-sub);
  background: #FAF8F4; border: 1px solid var(--border-soft);
  border-radius: 999px; padding: 2px 8px;
}

.local-progress { display: flex; flex-direction: column; gap: 14px; }
.local-now {
  display: flex; gap: 14px; align-items: center;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: #fff; padding: 14px;
}
.local-now img {
  width: 108px; height: 74px; object-fit: cover;
  border-radius: 9px; border: 1px solid var(--border-soft);
}
.local-now .ln-body { flex: 1; min-width: 0; }
.local-now .ln-title { font-size: 14px; font-weight: 700; color: var(--text); }
.local-now .ln-sub { font-size: 12px; color: var(--text-mut); margin: 3px 0 9px; }

.pbar { height: 7px; background: var(--border-soft); border-radius: 999px; overflow: hidden; }
.pbar > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px; transition: width .3s ease;
}

.local-done {
  position: relative; border: 1px solid var(--border); border-radius: var(--r-md);
  overflow: hidden; background: var(--primary);
}
.local-done img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; opacity: .9; }
.local-done .ld-mask {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,59,53,.05) 40%, rgba(9,25,23,.82));
  display: flex; flex-direction: column; justify-content: flex-end; padding: 16px;
}
.local-done .ld-title { font-size: 15px; font-weight: 700; color: #fff; }
.local-done .ld-sub { font-size: 12px; color: rgba(255,255,255,.72); margin-top: 4px; }
.local-done .ld-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(9,25,23,.35);
}

.local-history { display: flex; flex-direction: column; gap: 10px; }
.lh-item {
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: #fff; padding: 10px 12px;
}
.lh-item img {
  width: 64px; height: 46px; object-fit: cover;
  border-radius: 7px; border: 1px solid var(--border-soft);
}
.lh-body { flex: 1; min-width: 0; }
.lh-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lh-sub { font-size: 11.5px; color: var(--text-mut); margin-top: 3px; }

.gen-side { position: sticky; top: 24px; }

/* 本地预览播放器 */
.player-wrap {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #091917;
  border: 1px solid var(--border);
}
.player-wrap canvas { width: 100%; display: block; }
.player-toggle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.92); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(9,25,23,.35);
  cursor: pointer; transition: opacity .2s ease;
}
.player-wrap.playing .player-toggle { opacity: 0; }
.player-wrap.playing:hover .player-toggle { opacity: 1; }
.player-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; background: #0B211E;
}
.player-bar .track {
  flex: 1; height: 5px; background: rgba(255,255,255,.18);
  border-radius: 999px; cursor: pointer; position: relative;
}
.player-bar .track > i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: var(--accent); border-radius: 999px;
}
.player-bar .mono { font-size: 11.5px; color: rgba(255,255,255,.72); }

@media (max-width: 768px) {
  .tpl-pick { grid-template-columns: 1fr; }
  .gen-side { position: static; }
}

/* ============================ 响应式 ============================ */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .app-nav {
    position: sticky;
    inset: auto;
    width: 100%;
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
  }
  .brand { padding: 12px 14px; border-bottom: none; border-right: 1px solid var(--border-soft); }
  .brand-text small { display: none; }
  .nav-list { flex-direction: row; padding: 8px; gap: 2px; }
  .nav-list a { padding: 7px 10px; white-space: nowrap; }
  .nav-list a span { display: none; }
  .nav-list a svg { width: 18px; height: 18px; }
  .nav-foot { display: none; }
  .app-content { margin-left: 0; }
  .page-head { padding: 20px 16px 14px; }
  .page-body { padding: 4px 16px 40px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
