/* Page workbench shell. The sidebar is the only primary navigation;
   page heading owns context and utilities, not a second toolbar. */
:root {
  --canvas: #f6f4f2;
  --surface: #fff;
  --surface-soft: #faf8f7;
  --ink: #29232c;
  --muted: #6d6671;
  --muted-strong: #4f4753;
  --line: #e7e2e4;
  --line-strong: #cdc5cb;
  --radius: 16px;
  --shadow: 0 14px 40px rgb(47 30 44 / 9%);
  --shadow-small: 0 2px 12px rgb(47 30 44 / 4%);
}
body { background: var(--canvas); }
.app-shell { grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  justify-content: flex-start;
  gap: 0;
  padding: 27px 16px 16px;
  color: #f7f0f5;
  background: #302438;
  border-right: 1px solid #241b2c;
  backdrop-filter: none;
}
.sidebar > .brand { display: flex; align-items: center; gap: 10px; padding: 14px 11px; margin-bottom: 27px; background: #fff; border-radius: 12px; }
.sidebar > .brand .page-wordmark { --page-wordmark-width: 116px; }
.sidebar-label { margin: 0 13px 9px; color: #cbbcca; font-size: 11px; font-weight: 700; letter-spacing: .09em; }
.sidebar nav { display: grid; gap: 4px; }
.nav-item { position: relative; min-height: 48px; padding: 8px 12px; color: #e4dbe4; border-radius: 10px; font-size: 14px; font-weight: 600; }
.nav-item > span { width: 29px; height: 29px; flex-basis: 29px; color: #e4dbe4; background: rgb(255 255 255 / 9%); border: 0; border-radius: 8px; font-size: 13px; }
.nav-item:hover { color: #fff; background: rgb(255 255 255 / 10%); transform: none; }
.nav-item.active { color: var(--primary); background: #fff; box-shadow: 0 5px 14px rgb(14 8 18 / 17%); }
.nav-item.active > span { color: var(--primary); background: var(--primary-soft); }
.sidebar-bottom { display: grid; gap: 18px; margin-top: auto; }
.support-card, .safety-card { padding: 16px 11px 0; color: #f5ecf3; border: 0; border-top: 1px solid rgb(255 255 255 / 18%); }
.support-card strong, .safety-card strong { color: #fff; font-size: 13px; }
.support-card p, .safety-card p { margin: 6px 0 0; color: #d6c9d5; font-size: 12px; line-height: 1.6; }
.support-card a, .safety-card a { color: #f0bdd0; }
.account-summary { display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 10px 11px; background: rgb(255 255 255 / 8%); border: 1px solid rgb(255 255 255 / 15%); border-radius: 11px; }
.account-summary .avatar { width: 34px; height: 34px; flex: 0 0 34px; }
.account-summary .profile-copy { min-width: 0; }
.account-summary .profile-copy strong { display: block; overflow: hidden; color: #fff; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.account-summary .profile-copy small { display: block; color: #d6c9d5; font-size: 11px; }
.main-content { width: 100%; max-width: 1330px; padding: 42px clamp(24px, 4vw, 64px) 80px; }
.welcome-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-height: 0;
  padding: 0;
  margin: 0 0 28px;
  overflow: visible;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.welcome-row::before, .welcome-row::after { display: none; }
.welcome-row .eyebrow { margin: 0 0 9px; color: var(--page-rose, #c95879); font-size: 12px; font-weight: 700; }
.welcome-row h1 { margin: 0 0 9px; color: var(--ink); font-size: clamp(30px, 3vw, 40px); font-weight: 700; letter-spacing: -.035em; line-height: 1.15; }
.welcome-row p:last-child { margin: 0; color: var(--muted); font-size: 15px; }
.welcome-row .page-subtitle { margin: 0; color: var(--muted-strong); font-size: 15px; }
.welcome-row .workspace-purpose { margin-top: 6px; color: var(--muted-strong); font-size: 13px; }
.welcome-row #refresh-status:empty { display: none; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; max-width: 480px; }
.top-actions .environment-badge { flex: 0 0 auto; border-radius: 8px; }
.top-actions .support-launch, .top-actions .task-auth-account > summary { min-height: 40px; padding: 8px 12px; color: var(--primary); background: #fff; border: 1px solid var(--line-strong); border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; }
.top-actions .support-launch:hover, .top-actions .task-auth-account > summary:hover { background: var(--primary-soft); }
.top-actions .online-toggle { min-height: 40px; padding: 0 9px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.top-actions .date-chip { min-height: 40px; padding: 9px 11px; border-radius: 9px; }
.top-actions .date-chip[hidden] { display: none; }
.mobile-brand { display: none; }
.panel, .metric-grid article, .task-workspace, .work-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-small); }
.panel-heading { padding: 22px 26px; background: #fff; border-bottom: 1px solid var(--line); }
.panel-heading h2, .section-heading h2 { font-size: 21px; }
.wizard-panel { max-width: 1000px; }
.wizard-panel .panel-heading { padding-bottom: 15px; border-bottom: 0; }
.stepper { padding: 4px 26px 21px; border-bottom: 1px solid var(--line); }
.stepper li.active { color: var(--primary); }
.stepper li.active > span { box-shadow: 0 0 0 4px var(--primary-soft); }
.form-step { padding: 27px 26px; }
.wizard-actions { padding: 16px 26px; background: #fff; }
.primary-button, .task-auth-primary { box-shadow: none; }
.primary-button:hover:not(:disabled), .task-auth-primary:hover:not(:disabled) { box-shadow: 0 5px 14px rgb(69 37 64 / 18%); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.metric-grid article { min-height: 105px; padding: 18px; }
.metric-grid { margin-top: 18px; margin-bottom: 0; }
.metric-grid strong { font-size: 28px; }
.welcome-row + .section-block { margin-top: 0; }
.market-list { grid-template-columns: minmax(0, 1fr); padding: 0; background: #fff; }
.market-card { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.market-card:focus-within, .work-card:focus-within, .task-card:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.section-block { margin-top: 30px; }

@media (min-width: 821px) and (max-width: 1050px) {
  .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .nav-item { justify-content: flex-start; font-size: 14px; }
  .safety-card { display: block; }
}
@media (max-width: 820px) {
  .app-shell { display: block; min-height: 100vh; }
  .sidebar { position: fixed; z-index: 30; top: auto; bottom: 0; width: 100%; height: calc(68px + env(safe-area-inset-bottom)); padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); box-shadow: 0 -8px 28px rgb(47 30 44 / 7%); }
  .sidebar > .brand, .sidebar-label, .sidebar-bottom { display: none; }
  .sidebar nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; width: 100%; }
  .sidebar[aria-label="主导航"] nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .sidebar .nav-item { display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 0; min-height: 52px; padding: 2px; font-size: 11px; }
  .sidebar .nav-item > span { width: 24px; height: 24px; flex-basis: 24px; font-size: 11px; }
  .sidebar .nav-item.active { box-shadow: none; }
  .main-content { max-width: none; padding: 24px 18px calc(100px + env(safe-area-inset-bottom)); }
  .welcome-row { display: block; margin-bottom: 22px; }
  .mobile-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 22px; color: var(--muted); font-size: 12px; }
  .mobile-brand .page-wordmark { --page-wordmark-width: 96px; }
  .top-actions { justify-content: flex-start; max-width: none; margin-top: 17px; }
  .top-actions .support-launch { width: auto; min-width: 108px; padding-inline: 12px; overflow: visible; color: var(--primary); white-space: nowrap; }
  .top-actions .support-launch::after { display: none; }
  .top-actions .online-toggle b { display: inline; }
}
@media (max-width: 600px) {
  .main-content { padding-inline: 14px; }
  .welcome-row h1 { font-size: 30px; }
  .top-actions .date-chip { display: none; }
  .panel-heading, .form-step, .wizard-actions, .task-detail { padding-inline: 18px; }
  .stepper { padding-inline: 18px; }
  .stepper small { display: none; }
  .stepper strong { font-size: 11px; }
  .metric-grid { gap: 9px; }
  .metric-grid article { min-width: 0; min-height: 94px; padding: 14px; }
  .metric-grid strong { font-size: 23px; }
}
