@font-face {
  font-family: "Noto Serif SC";
  src: url("//static.resopeak.cn/fonts/NotoSerifSC-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif SC";
  src: url("//static.resopeak.cn/fonts/NotoSerifSC-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif SC";
  src: url("//static.resopeak.cn/fonts/NotoSerifSC-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif SC";
  src: url("//static.resopeak.cn/fonts/NotoSerifSC-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif SC";
  src: url("//static.resopeak.cn/fonts/NotoSerifSC-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --app: #0e1117;
  --bar: #12161e;
  --side: #12161e;
  --card: #161b24;
  --card-2: #1c2330;
  --bd: #28303d;
  --hair: #1f2733;
  --ink: #e8edf4;
  --sub: #9aa6b8;
  --dim: #6b7689;
  --acc: #204469;
  --acc-soft: #16233a;
  --teal: #5bb3a8;
  --teal-soft: #13241f;
  --green: #4a9b6e;
  --green-soft: #13231a;
  --red: #b23a48;
  --red-soft: #2a160f;
  --gold: #c99e4d;
  /* 官方辅助灰（A08，0702 版）：深 / 中 / 浅 */
  --gray-dark: #545556;
  --gray: #8e8e8e;
  --gray-light: #dddddd;
  --font-display: "Noto Serif SC", "Linux Libertine", "Linux Libertine O", Georgia, "Songti SC", "STSong", serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--app);
}

body {
  margin: 0;
  min-width: 1180px;
  background: var(--app);
  color: var(--ink);
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

.login-body {
  min-width: 0;
}

/* Embedded login (shown as an in-page modal via iframe: index.html?embed=1) */
html.embed-login,
html.embed-login body {
  background: transparent !important;
  min-height: 100%;
}

html.embed-login .login-page {
  background: transparent;
  min-height: 100vh;
  display: block;
}

html.embed-login .login-page::before {
  display: none;
}

html.embed-login .login-left {
  display: none;
}

html.embed-login .login-right {
  width: 100%;
  min-width: 0;
  flex: none;
  background: transparent;
  padding: 28px 22px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

html.embed-login .login-card {
  max-width: 360px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.serif {
  font-family: var(--font-display);
}

.mono {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

.muted {
  color: var(--dim);
}

.sub {
  color: var(--sub);
}

.accent {
  color: var(--acc);
}

.teal {
  color: var(--teal);
}

.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--app);
}

.topbar {
  height: 62px;
  flex: 0 0 auto;
  background: var(--bar);
  border-bottom: 1px solid var(--bd);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 9px;
  white-space: nowrap;
}

.brand-cn {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ink);
}

.brand-cn strong {
  color: var(--acc);
  font-weight: 700;
}

.brand-en {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 9.5px;
  letter-spacing: 2px;
  color: var(--dim);
  text-transform: uppercase;
}

.search {
  flex: 1;
  max-width: 360px;
  margin-left: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--card-2);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 8px 13px;
  color: var(--dim);
  font-size: 13px;
}

.top-spacer {
  flex: 1;
}

.user {
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 1px solid var(--bd);
  padding-left: 16px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--acc), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

.shell {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
}

.sidebar {
  width: var(--sidebar-width, 210px);
  flex: 0 0 var(--sidebar-width, 210px);
  position: relative;
  background: var(--side);
  border-right: 1px solid var(--bd);
  padding: 18px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  /* 高于 .content(z-index:1)：账号弹层、tooltip 等飞出侧栏的临时层不被主体内容遮盖 */
  z-index: 10;
  transition: width .2s ease, flex-basis .2s ease, padding .2s ease, border-color .2s ease;
}

.sidebar-resizing .sidebar {
  transition: none;
  user-select: none;
}

.shell.sidebar-hidden .sidebar {
  width: 0;
  flex-basis: 0;
  padding-left: 0;
  padding-right: 0;
  border-right-color: transparent;
  overflow: hidden;
  pointer-events: none;
}

.sidebar-restore {
  width: 28px;
  height: 28px;
  border: 1px solid var(--bd);
  border-radius: 9px;
  background: rgba(255, 255, 255, .72);
  color: var(--dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(40, 55, 70, .08);
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

/* 收起/展开按钮：外观与收起后的导航图标完全一致(40x40、主题色高亮、tooltip) */
.sidebar-toggle {
  position: absolute;
  top: 18px;
  right: 10px;
  z-index: 20;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--sub);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.sidebar-restore {
  position: absolute;
  top: 18px;
  left: 12px;
  z-index: 50;
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

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

.sidebar-restore:hover {
  background: #fff;
  color: var(--ink);
}

.sidebar-toggle:hover {
  background: var(--acc-soft);
  color: var(--acc);
}

.sidebar-toggle:hover::before {
  opacity: 1;
}

.sidebar-toggle:active,
.sidebar-restore:active {
  transform: translateY(1px);
}

.sidebar-toggle::before,
.sidebar-restore::before {
  content: "";
  width: 15px;
  height: 15px;
  display: block;
  background: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.sidebar-toggle::before {
  /* 图标固定 20px，与收起后导航图标尺寸一致 */
  width: 20px;
  height: 20px;
  opacity: .7;
  transition: opacity .18s ease;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M9 4v16'/%3E%3Cpath d='M15 9l-3 3 3 3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M9 4v16'/%3E%3Cpath d='M15 9l-3 3 3 3'/%3E%3C/svg%3E");
}

/* hover 文字说明：与收起后导航图标的 tooltip 完全一致 */
.sidebar-toggle::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30, 30, 30, .9);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
  z-index: 100;
}

.sidebar-toggle:hover::after {
  opacity: 1;
}

.sidebar-restore::before {
  width: 19px;
  height: 19px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M9 4v16'/%3E%3Cpath d='M12 9l3 3-3 3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M9 4v16'/%3E%3Cpath d='M12 9l3 3-3 3'/%3E%3C/svg%3E");
}

.sidebar-resizer {
  position: absolute;
  top: 0;
  right: -5px;
  bottom: 0;
  z-index: 30;
  width: 10px;
  cursor: col-resize;
  touch-action: none;
}

.sidebar-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  right: 4px;
  width: 2px;
  height: 100%;
  background: transparent;
  transition: background-color .18s ease;
}

.sidebar-resizer:hover::after,
.sidebar-resizer:focus-visible::after,
.sidebar-resizing .sidebar-resizer::after {
  background: var(--acc);
}

.shell.sidebar-hidden .sidebar-resizer,
.shell.sidebar-hidden .sidebar-toggle {
  display: none;
}

.side-brand {
  height: 48px;
  margin: 0 8px 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.side-brand .brand-logo {
  width: auto;
  height: 68px;
  margin: -14px 0;
  display: block;
}

.side-label {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--dim);
  text-transform: uppercase;
  padding: 0 13px 8px;
  display: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border-radius: 10px;
  color: var(--sub);
  font-size: 13.5px;
}

.nav-link.active {
  background: var(--acc-soft);
  color: var(--acc);
  font-weight: 700;
}

.nav-link.teal-active {
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 700;
}

.divider {
  height: 1px;
  background: var(--bd);
  margin: 14px 4px;
  display: none;
}

.side-note {
  margin-top: auto;
  background: var(--card-2);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 14px;
}

.sidebar-footer {
  margin-top: auto;
  margin-left: -14px;
  margin-right: -14px;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-footer .side-note {
  margin: 0 14px 10px;
}

.sidebar-footer .user {
  border-left: 0;
  width: 100%;
  min-height: 58px;
  padding: 10px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-width: 0;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}

.sidebar-account-copy,
.sidebar-footer .user span:last-child {
  min-width: 0;
  flex: 1;
}

.sidebar-account-personal .sidebar-account-copy {
  display: flex;
  align-items: center;
}

.sidebar-footer .user strong,
.sidebar-footer .user small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer .user small[hidden] {
  display: none;
}

.sidebar-footer .logout-btn {
  justify-content: center;
  padding: 8px 11px;
  font-size: 12px;
  width: 100%;
}

.sidebar-account-divider {
  height: 1px;
  margin: 0;
  background: var(--bd);
}

.sidebar-account {
  position: relative;
}

.sidebar-account-trigger:hover,
.sidebar-account.open .sidebar-account-trigger {
  background: rgba(255, 255, 255, .62);
}

.sidebar-account-trigger:active {
  transform: translateY(1px);
}

.sidebar-account-menu {
  position: absolute;
  /* 始终靠左对齐、固定宽度：弹层在触发按钮正上方，鼠标只需纵向移动 */
  left: 14px;
  width: 200px;
  bottom: calc(100% + 8px);
  z-index: 60;
  padding: 6px;
  border: 1px solid var(--bd);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 46px rgba(40, 55, 70, .16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sidebar-account-menu[hidden] {
  display: none;
}

.sidebar-account-menu a,
.sidebar-account-menu button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--sub);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.sidebar-account-menu a:hover,
.sidebar-account-menu button:hover {
  background: var(--soft);
  color: var(--ink);
}

.sidebar-account-menu button {
  color: #b04a3a;
}

.sidebar-account-menu [data-menu-icon]::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  display: block;
  background: currentColor;
  opacity: .78;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.sidebar-account-menu [data-menu-icon="account"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 3.6-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 3.6-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
}

.sidebar-account-menu [data-menu-icon="settings"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h10'/%3E%3Cpath d='M18 6h2'/%3E%3Cpath d='M4 12h2'/%3E%3Cpath d='M10 12h10'/%3E%3Cpath d='M4 18h8'/%3E%3Cpath d='M16 18h4'/%3E%3Ccircle cx='16' cy='6' r='2'/%3E%3Ccircle cx='8' cy='12' r='2'/%3E%3Ccircle cx='14' cy='18' r='2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h10'/%3E%3Cpath d='M18 6h2'/%3E%3Cpath d='M4 12h2'/%3E%3Cpath d='M10 12h10'/%3E%3Cpath d='M4 18h8'/%3E%3Cpath d='M16 18h4'/%3E%3Ccircle cx='16' cy='6' r='2'/%3E%3Ccircle cx='8' cy='12' r='2'/%3E%3Ccircle cx='14' cy='18' r='2'/%3E%3C/svg%3E");
}

.sidebar-account-menu [data-menu-icon="logout"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E");
}

.sidebar-account-menu-divider {
  height: 1px;
  margin: 4px 4px;
  background: var(--bd);
}

.content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 30px 34px;
}

.container {
  max-width: 1180px;
}

.container.narrow {
  max-width: 940px;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--dim);
  margin-bottom: 22px;
}

.crumb span:last-child {
  color: var(--acc);
  font-weight: 700;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 24px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.page-subtitle {
  font-size: 13.5px;
  color: var(--sub);
  margin-top: 7px;
}

.eyebrow {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--dim);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 13px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 20px;
}

.panel.pad-lg {
  padding: 26px;
}

.kpi {
  padding: 17px 18px;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.kpi-label {
  font-size: 12.5px;
  color: var(--sub);
  margin-top: 10px;
}

.module-card {
  padding: 24px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.module-card h2,
.panel h2,
.panel h3 {
  margin: 0;
  color: var(--ink);
}

.module-card h2 {
  font-family: var(--font-display);
  font-size: 21px;
}

.module-card p,
.panel p {
  color: var(--sub);
  font-size: 13px;
  line-height: 1.7;
}

.icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid currentColor;
  background: var(--acc-soft);
  color: var(--acc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.icon-box.teal {
  background: var(--teal-soft);
  color: var(--teal);
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.feature-list div {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--sub);
}

.check {
  color: var(--acc);
  font-weight: 700;
}

.check.teal {
  color: var(--teal);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid var(--bd);
  background: var(--card-2);
  color: var(--ink);
  padding: 10px 16px;
  font-size: 13px;
  cursor: default;
}

.btn.primary {
  border-color: var(--acc);
  background: var(--acc);
  color: #FFFFFF;
  font-weight: 700;
}

.btn.teal {
  border-color: var(--teal);
  background: var(--teal);
  color: #06120f;
  font-weight: 700;
}

.btn.ghost {
  background: transparent;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  border: 1px solid var(--bd);
  color: var(--sub);
  background: var(--card-2);
}

.badge.acc {
  color: var(--acc);
  background: var(--acc-soft);
  border-color: var(--acc);
}

.badge.teal {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: var(--teal);
}

.badge.green {
  color: var(--green);
  background: var(--green-soft);
  border-color: var(--green);
}

.badge.red {
  color: var(--red);
  background: var(--red-soft);
  border-color: var(--red);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  border-bottom: 1px solid var(--hair);
  padding: 12px 14px;
  text-align: left;
  font-size: 12.5px;
}

.table th {
  color: var(--dim);
  font-weight: 500;
  font-size: 11px;
}

.table td {
  color: var(--sub);
}

.table td strong {
  color: var(--ink);
}

.patient-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hair);
}

.patient-row:last-child {
  border-bottom: 0;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--card-2);
  border: 1px solid var(--bd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  flex: 0 0 auto;
}

.two-col {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 330px;
  gap: 16px;
  align-items: start;
}

.patient-picker {
  padding: 14px;
}

.patient-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 4px 13px;
}

.patient-picker-head strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.patient-picker-create {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 7px 10px;
  white-space: nowrap;
}

.patient-picker-plus {
  color: var(--acc);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 14px;
  font-size: 15px;
  font-weight: 700;
  line-height: 14px;
  transform: translateY(-.5px);
}

.patient-picker-search {
  position: relative;
  display: block;
  margin-bottom: 10px;
}

.patient-picker-search::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background: var(--dim);
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
}

.patient-picker-search input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--bd);
  border-radius: 10px;
  background: var(--card-2);
  color: var(--ink);
  outline: 0;
  padding: 0 12px 0 36px;
  font-size: 12.5px;
}

.patient-picker-search input::placeholder {
  color: var(--dim);
}

.patient-picker-search input:focus {
  border-color: rgba(32, 68, 105, .7);
  box-shadow: 0 0 0 3px rgba(32, 68, 105, .12);
}

.patient-picker-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.color-pick-page {
  width: 100%;
  max-width: none;
}

.color-pick-workspace {
  width: 100%;
}

.color-pick-workspace>.panel.pad-lg {
  position: relative;
  z-index: 20;
}

.patient-header {
  position: relative;
  z-index: 120;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.patient-title {
  min-width: 0;
}

.patient-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.patient-menu {
  position: relative;
}

.patient-menu[open] {
  z-index: 120;
}

.patient-menu summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.patient-menu summary::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 3h5v5'/%3E%3Cpath d='M4 20 21 3'/%3E%3Cpath d='M21 16v5h-5'/%3E%3Cpath d='M15 15l6 6'/%3E%3Cpath d='M4 4l5 5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 3h5v5'/%3E%3Cpath d='M4 20 21 3'/%3E%3Cpath d='M21 16v5h-5'/%3E%3Cpath d='M15 15l6 6'/%3E%3Cpath d='M4 4l5 5'/%3E%3C/svg%3E");
}

.patient-menu summary::-webkit-details-marker {
  display: none;
}

.patient-menu[open] summary {
  border-color: var(--acc);
  color: var(--acc);
}

.patient-picker-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  width: 380px;
  max-height: calc(100vh - 132px);
  max-width: calc(100vw - 64px);
  overflow: hidden;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 28px 72px rgba(40, 55, 70, .22), inset 0 1px 0 rgba(255, 255, 255, .92);
}

body.reso-app .card.patient-picker-popover {
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 28px 72px rgba(40, 55, 70, .22), inset 0 1px 0 rgba(255, 255, 255, .92);
}

.picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid transparent;
  margin-bottom: 4px;
}

.picker-copy {
  flex: 1;
  min-width: 0;
}

.picker-copy strong,
.picker-copy small {
  display: block;
}

.picker-copy strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.picker-copy .mono {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.35;
}

.picker-created {
  margin-top: 2px;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.35;
}

.picker-item[hidden] {
  display: none;
}

.picker-item:last-child {
  margin-bottom: 0;
}

.picker-item.active {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.picker-item.acc-active {
  border-color: var(--acc);
  background: var(--acc-soft);
}

/* 流程步骤条：箭头带(chevron)样式，段与段首尾咬合体现流转方向。
   形状由 clip-path 裁出(左侧凹口 + 右侧箭头)，故不用 border，
   层次感交给 .stepper 上的整体 drop-shadow。 */
.stepper {
  --step-arrow: 15px;
  display: flex;
  gap: 5px;
  margin: 18px 0;
  filter: drop-shadow(0 6px 14px rgba(29, 29, 31, .07));
}

.step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px calc(8px + var(--step-arrow) * .5) 9px calc(8px + var(--step-arrow));
  /* 未开始态：浅灰底 + 中灰字，保证在白色面板上清晰可辨 */
  background: var(--peak-1, var(--card-2));
  color: var(--sub);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - var(--step-arrow)) 0, 100% 50%,
      calc(100% - var(--step-arrow)) 100%, 0 100%, var(--step-arrow) 50%);
  transition: background-color .2s ease, color .2s ease;
}

/* 首段无凹口、尾段无箭头，形成完整的带状首尾 */
.step:first-child {
  padding-left: calc(8px + var(--step-arrow) * .5);
  border-radius: 9px 0 0 9px;
  clip-path: polygon(0 0, calc(100% - var(--step-arrow)) 0, 100% 50%,
      calc(100% - var(--step-arrow)) 100%, 0 100%);
}

.step:last-child {
  padding-right: calc(8px + var(--step-arrow) * .5);
  border-radius: 0 9px 9px 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, var(--step-arrow) 50%);
}

/* 序号 / 完成勾 徽标 */
.step-idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 10.5px;
  font-weight: 700;
  flex: none;
}

.step.done {
  color: var(--teal);
  background: var(--teal-soft);
}

.step.current {
  color: #fff;
  background: var(--acc);
}

.step.current .step-idx {
  border-color: rgba(255, 255, 255, .65);
  background: rgba(255, 255, 255, .16);
}

.upload-box {
  min-height: 310px;
  border: 1px dashed var(--bd);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(32, 68, 105, .08), rgba(91, 179, 168, .06)), var(--card-2);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  padding: 18px;
}

.demo-image {
  width: 100%;
  min-height: 250px;
  object-fit: cover;
  border-radius: 11px;
  border: 1px solid var(--bd);
  background: var(--app);
}

.zone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.zone-card {
  background: var(--card-2);
  border: 1px solid var(--bd);
  border-radius: 11px;
  padding: 13px;
}

.shade-strip {
  height: 34px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .12);
  margin-bottom: 7px;
}

.shade-grid {
  display: grid;
  grid-template-columns: repeat(7, 46px);
  gap: 12px;
}

.shade {
  text-align: center;
  color: var(--sub);
  font-size: 11px;
}

.shade-swatch {
  width: 46px;
  height: 52px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, .12);
  margin-bottom: 6px;
}

.shade.active .shade-swatch {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px var(--teal-soft);
}

.shade.active {
  color: var(--teal);
  font-weight: 700;
}

.tooth {
  width: 70px;
  height: 112px;
  border-radius: 50% 50% 44% 44% / 34% 34% 62% 62%;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 -18px 30px rgba(0, 0, 0, .16), 0 12px 28px rgba(0, 0, 0, .26);
}

.tooth.small {
  width: 52px;
  height: 86px;
}

.tooth.base {
  background: linear-gradient(to bottom, #c09e75, #b1875f 52%, #d5bb92);
}

.tooth.pred {
  background: linear-gradient(to bottom, #e2d0ac, #d8bc8d 52%, #f1dfb9);
}

.metric-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--hair);
  padding: 9px 0;
  color: var(--sub);
  font-size: 12px;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22);
  vertical-align: middle;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  margin-bottom: 15px;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--sub);
  margin-bottom: 8px;
}

.input {
  width: 100%;
  border: 1px solid var(--bd);
  background: var(--card-2);
  color: var(--ink);
  border-radius: 10px;
  padding: 12px 13px;
  outline: none;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  transition: transform .2s ease;
}

.input-wrap .input {
  padding-left: 40px;
}

.input-icon {
  position: absolute;
  left: 14px;
  z-index: 1;
  display: flex;
  color: var(--dim);
  pointer-events: none;
  transition: color .2s ease, transform .2s ease;
}

.input-icon svg {
  pointer-events: none;
}

.login-page .input::placeholder {
  color: var(--dim);
}

.login-page .input-wrap:focus-within {
  transform: translateY(-1px);
}

.login-page .input-wrap:focus-within .input {
  border-color: var(--acc);
  background: #FFFFFF;
}

.login-page .input-wrap:focus-within .input-icon {
  color: var(--acc);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hair);
}

.setting-row:last-child {
  border-bottom: 0;
}

.toggle {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: var(--teal);
  position: relative;
  flex: 0 0 auto;
}

.toggle:after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #06120f;
  right: 3px;
  top: 3px;
}

.paper {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 16px;
  padding: 34px 38px;
}

.report-head {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--bd);
  padding-bottom: 22px;
  margin-bottom: 24px;
}

.info-line {
  display: flex;
  gap: 30px;
  margin-bottom: 26px;
}

.info-line small {
  display: block;
  color: var(--dim);
  font-size: 11px;
  margin-bottom: 4px;
}

.info-line strong {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
}

.login-page {
  --app: #FFFFFF;
  --bar: #FFFFFF;
  --card: #FFFFFF;
  --card-2: #F3F3F3;
  --bd: #D8D8D8;
  --hair: #E7E7E7;
  --ink: #333333;
  --sub: #666666;
  --dim: #8A8A8A;
  --acc: #204469;
  --acc-soft: #e7edf5;
  min-height: 100vh;
  display: flex;
  position: relative;
  background: #F3F3F3;
  color: #333333;
}

.login-left {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--bd);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 54px 56px 128px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1.32;
  font-weight: 700;
  color: var(--ink);
  max-width: 560px;
  margin: 0;
}

.hero-title span {
  color: var(--acc);
}

.hero-copy {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--sub);
  max-width: 520px;
  margin-top: 22px;
}

.login-stats {
  display: flex;
  gap: 30px;
  margin-top: 40px;
}

.login-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--acc);
  line-height: 1;
}

.login-stat span {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin-top: 9px;
  font-weight: 700;
}

.login-stat small {
  display: block;
  font-size: 11.5px;
  color: var(--dim);
  margin-top: 3px;
}

.login-right {
  width: 500px;
  min-width: 500px;
  flex: 0 0 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F3F3F3;
  padding: 40px 40px 72px;
}

.login-card {
  width: 100%;
  max-width: 360px;
}

.login-meta {
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: flex-start;
  color: var(--dim);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.login-meta-line {
  font: inherit;
  color: inherit;
}

.login-footer {
  text-align: left;
  font: inherit;
  color: inherit;
}

.login-footer a {
  transition: color .2s ease;
}

.login-footer a:hover {
  color: var(--acc);
}

.tab-pill {
  position: relative;
  display: flex;
  gap: 34px;
  border-bottom: 1px solid var(--bd);
  margin: 28px 0 26px;
  --tab-indicator-left: 0px;
  --tab-indicator-width: 0px;
}

/* 已登录时通过 hidden 属性隐藏登录方式切换栏（覆盖 display:flex） */
.tab-pill[hidden] {
  display: none !important;
}

.tab-pill button {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--dim);
  border-radius: 0;
  padding: 0 0 14px;
  font-size: 14.5px;
  font-weight: 700;
}

.tab-indicator {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: var(--tab-indicator-width);
  height: 3px;
  border-radius: 999px;
  background: var(--acc);
  transform: translateX(var(--tab-indicator-left));
  transition: transform .28s ease, width .28s ease;
}

.tab-pill button:hover {
  color: var(--sub);
}

.tab-pill button.active {
  color: var(--ink);
  font-weight: 700;
}

.login-panel-window {
  overflow: hidden;
}

.login-page .login-panel-window {
  margin: -8px -10px -14px;
  padding: 8px 10px 14px;
}

.login-panel-track {
  display: block;
  width: 100%;
}

.login-form-panel {
  display: none;
  min-width: 0;
}

.login-form-panel.active {
  display: block;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 24px;
  font-size: 12.5px;
}

.login-link {
  color: var(--acc);
  font-weight: 700;
  cursor: pointer;
}

.login-link.sub {
  color: var(--sub);
}

.login-link:hover {
  color: var(--ink);
}

.remember-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sub);
  cursor: pointer;
  user-select: none;
}

.remember-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.remember-box {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--acc);
  border-radius: 4px;
  color: var(--acc);
}

.remember-box svg {
  pointer-events: none;
  opacity: 0;
}

.remember-check input:checked+.remember-box svg {
  opacity: 1;
  background: var(--acc-soft);
}

.remember-check input:focus-visible+.remember-box {
  box-shadow: 0 0 0 3px rgba(32, 68, 105, .18);
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 10px;
}

.code-btn {
  justify-content: center;
  padding: 0 12px;
  white-space: nowrap;
  cursor: pointer;
}

.login-status {
  min-height: 20px;
  margin: -14px 0 12px;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.45;
}

.login-status[data-tone="success"] {
  color: var(--acc);
}

.login-status[data-tone="error"] {
  color: var(--red);
}

.code-btn:disabled,
.login-page .btn.primary:disabled {
  cursor: default;
  opacity: .68;
  transform: none;
  filter: none;
}

.modal-backdrop {
  --card: #FFFFFF;
  --card-2: #F3F3F3;
  --bd: #D8D8D8;
  --ink: #333333;
  --sub: #666666;
  --dim: #8A8A8A;
  --acc: #204469;
  --acc-soft: #e7edf5;
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(51, 51, 51, .28);
  padding: 24px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(360px, 100%);
  border: 1px solid var(--bd);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 24px 70px rgba(51, 51, 51, .18);
  padding: 24px;
}

.reset-modal-card {
  width: min(420px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border-color: var(--bd);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 24px 70px rgba(51, 51, 51, .18);
  padding: 24px;
}

.modal-card h3 {
  margin: 0;
  font-size: 22px;
  color: var(--ink);
}

.modal-card p {
  margin: 14px 0 22px;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.7;
}

.modal-card .btn {
  width: 100%;
}

/* 统一关闭按钮：圆形、中性默认态、藏蓝悬停反馈(见 Design-v1.1.md §6.5)。
   × 用 CSS 伪元素绘制，不依赖字体字形，保证图标始终居中。 */
.modal-close,
.login-legal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(29, 29, 31, .05);
  color: #6e7378;
  cursor: pointer;
  font-size: 0;
  /* 隐藏文本 ×，改用伪元素绘制 */
  line-height: 0;
  transition: background .18s ease, color .18s ease, transform .12s ease;
}

.modal-close::before,
.modal-close::after,
.login-legal-close::before,
.login-legal-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
}

.modal-close::before,
.login-legal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close::after,
.login-legal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-close:hover,
.login-legal-close:hover {
  background: #e7edf5;
  color: #204469;
}

.modal-close:active,
.login-legal-close:active {
  transform: scale(.92);
}

.modal-close:focus-visible,
.login-legal-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(32, 68, 105, .28);
}

.reset-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-message-view[hidden],
.reset-form[hidden],
.register-form[hidden],
.reset-step[hidden] {
  display: none;
}

.reset-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.3;
}

.reset-intro {
  margin: 6px 0 4px;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.7;
}

.reset-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.register-form {
  gap: 12px;
}

.register-form .reset-step {
  gap: 12px;
}

.reset-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reset-field label {
  color: var(--sub);
  font-size: 14px;
  font-weight: 600;
}

.reset-input {
  width: 100%;
  height: 50px;
  border: 1px solid rgba(29, 29, 31, .13);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, .5);
  color: var(--ink);
  padding: 0 15px;
  font-size: 14px;
  font-weight: 400;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.reset-input::placeholder {
  color: var(--dim);
}

.reset-input:focus {
  border-color: var(--acc);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(32, 68, 105, .12), 0 12px 28px rgba(32, 68, 105, .14);
  transform: translateY(-1px);
}

.password-guide {
  display: grid;
  gap: 4px;
  margin-top: 2px;
}

.password-guide[hidden] {
  display: none;
}

.password-strength {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  height: 6px;
}

.password-strength span {
  border-radius: 999px;
  background: rgba(29, 29, 31, .1);
  transition: background-color .18s ease, opacity .18s ease;
}

.password-strength[data-level="weak"] [data-strength-segment="weak"] {
  background: #d95d4f;
}

.password-strength[data-level="medium"] [data-strength-segment="weak"] {
  background: #d95d4f;
}

.password-strength[data-level="medium"] [data-strength-segment="medium"] {
  background: #e59a3a;
}

.password-strength[data-level="strong"] [data-strength-segment="weak"] {
  background: #d95d4f;
}

.password-strength[data-level="strong"] [data-strength-segment="medium"] {
  background: #e59a3a;
}

.password-strength[data-level="strong"] [data-strength-segment="strong"] {
  background: #4f9f6f;
}

.password-strength-text {
  margin: -1px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--dim);
}

.password-strength-text[data-level="weak"] {
  color: #c94f43;
}

.password-strength-text[data-level="medium"] {
  color: #c77d22;
}

.password-strength-text[data-level="strong"] {
  color: #3f8f62;
}

.reset-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

.reset-code-btn,
.reset-submit {
  border: 1px solid var(--bd);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, opacity .2s ease, filter .2s ease;
}

.reset-code-btn {
  height: 50px;
  border-color: rgba(32, 68, 105, .35);
  background: var(--acc-soft);
  color: var(--acc);
  white-space: nowrap;
}

.reset-code-btn:hover {
  border-color: var(--acc);
  transform: translateY(-1px);
}

.reset-code-btn:disabled {
  cursor: default;
  opacity: .58;
  transform: none;
}

.register-terms {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  align-self: flex-start;
  margin-top: 0;
  font-size: 13px;
}

.register-terms .remember-check {
  margin-top: 0;
  /* 容器高度对齐文字首行行高(见 .register-terms-text line-height:1.7)，
     配合 .remember-check 自身的 align-items:center，让复选框在首行内垂直居中；
     行内文字换行时(align-items:flex-start)复选框仍与首行对齐。 */
  height: 1.7em;
}

.register-terms-text {
  color: var(--sub);
  line-height: 1.7;
  user-select: none;
}

.register-terms-text [data-register-terms-toggle] {
  cursor: pointer;
}

.register-terms-text .login-link {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--acc);
  cursor: pointer;
  user-select: text;
}

.register-terms-text .login-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

.reset-submit {
  width: 100%;
  height: 52px;
  margin-top: 8px;
  border-color: transparent;
  background: linear-gradient(180deg, #285585, #204469);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 16px 28px rgba(32, 68, 105, .24);
}

.register-form .reset-status {
  min-height: 16px;
  margin: -8px 0 -2px;
}

.register-form .reset-submit {
  margin-top: 0;
}

.reset-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 36px rgba(32, 68, 105, .28);
  filter: saturate(1.04);
}

.reset-status {
  min-height: 20px;
  margin: -6px 0 0;
  color: var(--dim);
  font-size: 13px;
}

.reset-status[data-tone="success"] {
  color: var(--acc);
}

.reset-status[data-tone="error"] {
  color: var(--red);
}

.captcha-backdrop {
  --card: #FFFFFF;
  --card-2: #F3F3F3;
  --bd: #D8D8D8;
  --ink: #333333;
  --sub: #666666;
  --dim: #8A8A8A;
  --acc: #204469;
  --acc-soft: #e7edf5;
  --red: #b23a48;
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(51, 51, 51, .34);
  padding: 24px;
}

.captcha-backdrop[hidden] {
  display: none;
}

.captcha-card {
  position: relative;
  width: min(360px, 100%);
  border: 1px solid var(--bd);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 24px 70px rgba(51, 51, 51, .2);
  padding: 24px;
}

.captcha-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
}

.captcha-card p {
  margin: 12px 0 16px;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.6;
}

.aliyun-captcha-box {
  display: grid;
  gap: 14px;
  margin: 4px 0 16px;
}

.aliyun-captcha-box[hidden] {
  display: none;
}

#aliyun-captcha-element {
  min-height: 44px;
}

.captcha-action {
  margin-top: 0;
}

.mini-product {
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mini-card {
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--bd);
  border-radius: 13px;
  padding: 14px;
}

.mini-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--ink);
}

.mini-card p {
  margin: 0;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.6;
}

.login-page {
  --app: #f7f8f6;
  --bar: #fbfaf7;
  --card: rgba(255, 255, 255, .72);
  --card-2: rgba(255, 255, 255, .5);
  --bd: rgba(29, 29, 31, .12);
  --hair: rgba(29, 29, 31, .08);
  --ink: #1d1d1f;
  --sub: #6e7378;
  --dim: #8d9296;
  --acc: #204469;
  --acc-soft: #e7edf5;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, .96), rgba(255, 255, 255, 0) 30%),
    linear-gradient(105deg, #f7f8f6 0%, #f1f2f1 63%, #fbfaf7 63%, #f7f8f6 100%);
  color: var(--ink);
  isolation: isolate;
}

.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .42;
  background-image:
    linear-gradient(90deg, rgba(29, 29, 31, .03) 1px, transparent 1px),
    linear-gradient(0deg, rgba(29, 29, 31, .024) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
}

.login-page .brand {
  align-items: flex-start;
  gap: 0;
}

.brand-logo {
  display: block;
  width: 118px;
  height: auto;
}

.login-left {
  border-right: 1px solid rgba(29, 29, 31, .14);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(18px, 2.4vh, 28px);
  padding: clamp(34px, 5vh, 52px) clamp(34px, 4.4vw, 58px) clamp(24px, 3.4vh, 34px);
  background: #111318;
  isolation: isolate;
}

.login-left::after {
  content: none;
}

.login-left>* {
  position: relative;
  z-index: 1;
}

.login-showcase-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  background: #111318;
}

.login-video-scrim {
  display: none;
}

.login-left>.brand,
.login-legal-footer {
  position: absolute;
  z-index: 3;
}

.login-left>.brand {
  top: 0;
  left: 0;
  padding: 22px 30px 28px 24px;
  border: 0;
  border-radius: 0;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.login-left>.brand .brand-logo {
  width: 126px;
}

@media (prefers-reduced-motion: reduce) {
  .login-left {
    background: #111318 url("125-frames/frame-20.jpg") center / cover no-repeat;
  }

  .login-showcase-video {
    display: none;
  }
}

.login-hero {
  align-self: center;
}

.peak {
  filter: url(#reliefShadow);
  stroke: rgba(255, 255, 255, .78);
  stroke-width: 2.2;
}

.peak-back {
  fill: url(#peakFillA);
  opacity: .66;
}

.peak-mid {
  fill: #e9ebea;
  opacity: .86;
}

.peak-front {
  fill: url(#peakFillB);
  opacity: .92;
}

.ridge {
  fill: none;
  stroke: rgba(111, 116, 119, .33);
  stroke-width: 2.6;
  filter: url(#reliefShadow);
}

.vein {
  fill: none;
  stroke: rgba(255, 255, 255, .72);
  stroke-width: 1.35;
  opacity: .75;
}

.login-page .eyebrow {
  color: #5e6266;
  font-size: 13px;
  letter-spacing: 3px;
  margin-bottom: clamp(14px, 2.2vh, 24px);
  font-weight: 700;
}

.hero-title {
  font-size: clamp(42px, 4vw, 58px);
  line-height: 1.18;
  max-width: 690px;
  letter-spacing: 0;
}

.hero-copy {
  font-size: 16px;
  line-height: 1.85;
  max-width: 670px;
  margin: clamp(18px, 3vh, 30px) 0 0;
}

.login-stats {
  width: min(620px, 100%);
  gap: 0;
  margin-top: clamp(42px, 7vh, 88px);
  background: rgba(255, 255, 255, .28);
  backdrop-filter: blur(14px);
}

.login-stat {
  flex: 1;
  padding: 16px 20px 14px;
  border-right: 1px solid rgba(29, 29, 31, .08);
}

.login-stat:last-child {
  border-right: 0;
}

.login-stat strong {
  font-size: 28px;
  font-weight: 700;
}

.login-stat span {
  font-size: 15px;
}

.login-stat small {
  font-size: 13px;
  margin-top: 5px;
}

.login-right {
  width: 520px;
  min-width: 520px;
  flex-basis: 520px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    radial-gradient(circle at 42% 20%, rgba(255, 255, 255, .86), rgba(255, 255, 255, 0) 36%),
    rgba(251, 250, 247, .54);
  padding: clamp(28px, 5.2vh, 40px) 56px clamp(34px, 6vh, 68px);
}

.login-card {
  width: 100%;
  max-width: 420px;
  margin: auto 0;
  padding-top: 10px;
}

.login-mobile-brand {
  display: none;
}

.login-mobile-brand[hidden] {
  display: none !important;
}

.login-card.is-session .login-mobile-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 0 32px;
}

.login-mobile-logo {
  display: block;
  width: 118px;
  height: auto;
}

.login-mobile-brand span {
  display: block;
  margin-top: 12px;
  color: var(--acc);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.login-legal-footer {
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #747a80;
  font-size: 12px;
  padding: 14px clamp(24px, 4.4vw, 56px);
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .46);
  border-radius: 0;
  background: rgba(255, 255, 255, .58);
  box-shadow: 0 -18px 46px rgba(20, 28, 38, .10), inset 0 1px 0 rgba(255, 255, 255, .56);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.login-footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.login-footer-logo {
  width: 82px;
  height: auto;
  flex: 0 0 auto;
  opacity: .9;
}

.login-footer-brand div {
  min-width: 0;
  display: grid;
  gap: 2px;
  line-height: 1.5;
}

.login-footer-brand strong {
  color: #54585d;
  font-size: 12px;
  font-weight: 700;
}

.login-footer-brand span,
.login-footer-brand a {
  color: #747a80;
  font-size: 11px;
}

.login-footer-brand a:hover {
  color: var(--acc);
}

.login-footer-brand .login-filing-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.login-filing-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.login-filing-links img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.login-legal-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 0;
}

.login-legal-sep {
  display: inline-block;
  width: 1px;
  height: 12px;
  background: rgba(29, 29, 31, .18);
  margin: 0 2px;
}

.login-legal-links .login-meta-line {
  color: var(--dim);
  font-size: 11px;
  white-space: nowrap;
}

.login-legal-links a {
  border: 0;
  background: transparent;
  color: #747a80;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  line-height: 1.5;
  text-decoration: none;
}

.login-legal-links a:hover,
.login-legal-links a.active {
  color: var(--acc);
}

.login-legal-modal {
  /* Snow Peak / Apple-like 浅色系（参考 service/Design-v1.1.md） */
  --legal-ink: #1d1d1f;
  --legal-muted: #6e7378;
  --legal-paper: #fbfaf7;
  --legal-line: rgba(29, 29, 31, .10);
  --legal-blue: #284f73;
  --legal-orange: #204469;
  --legal-orange-hover: #183454;
  --legal-orange-soft: #e7edf5;
  --font-display: "Noto Serif SC", "Linux Libertine", "Linux Libertine O", Georgia, "Songti SC", "STSong", serif;
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: min(8vh, 72px) 24px;
  background: rgba(28, 40, 55, .34);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.login-legal-modal[hidden] {
  display: none;
}

.login-legal-dialog {
  position: relative;
  width: min(860px, calc(100vw - 48px));
  height: min(780px, calc(100vh - 64px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(251, 250, 247, .96));
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 24px 80px rgba(40, 55, 70, .16), 0 2px 8px rgba(40, 55, 70, .06);
}

/* 法律弹层关闭按钮：沿用统一关闭按钮样式，仅微调位置以适配其标题留白 */
.login-legal-close {
  top: 20px;
  right: 22px;
}

.login-legal-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 28px 96px 0 34px;
  border-bottom: 1px solid var(--legal-line);
}

.login-legal-tabs button {
  min-width: 132px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--legal-muted);
  cursor: pointer;
  padding: 0 0 18px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  transition: color .18s, border-color .18s;
}

.login-legal-tabs button:hover {
  color: var(--legal-ink);
}

.login-legal-tabs button.active {
  color: var(--legal-ink);
  border-bottom-color: var(--legal-orange);
}

.login-legal-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 34px 48px 46px;
}

.login-legal-content {
  color: var(--legal-ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.78;
}

.login-legal-content h3,
.login-legal-content h4 {
  margin: 26px 0 10px;
  font-family: var(--font-display);
  color: var(--legal-blue);
  font-weight: 600;
  line-height: 1.42;
}

.login-legal-content h3 {
  font-size: 24px;
}

.login-legal-content h4 {
  font-size: 18px;
}

.login-legal-content h3:first-child {
  margin-top: 0;
}

.login-legal-content p {
  margin: 0 0 18px;
}

.login-legal-content ul {
  margin: 0 0 22px;
  padding-left: 24px;
}

.login-legal-content li {
  margin: 9px 0;
  padding-left: 4px;
}

.login-legal-content strong {
  color: var(--legal-ink);
  font-weight: 600;
}

.login-legal-content code {
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--legal-orange-soft);
  color: var(--legal-orange-hover);
}

.login-legal-content .legal-warn {
  margin: 12px 0 20px;
  padding: 14px 18px;
  border-left: 4px solid var(--legal-orange);
  border-radius: 9px;
  background: var(--legal-orange-soft);
  color: #8a4a12;
}

.login-legal-content .legal-en {
  margin-top: 18px;
  padding-left: 18px;
  border-left: 3px solid var(--legal-line);
  color: var(--legal-muted);
}

.login-card h2 {
  font-size: 30px !important;
  line-height: 1.2;
}

.login-card>p {
  font-size: 15px !important;
  margin-top: 12px !important;
}

.login-session {
  display: grid;
  gap: 13px;
}

.login-session[hidden] {
  display: none;
}

.login-session-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(29, 29, 31, .1);
  border-radius: 16px;
  background: rgba(255, 255, 255, .42);
  box-shadow: 0 16px 38px rgba(40, 55, 70, .08), inset 0 1px 0 rgba(255, 255, 255, .72);
  text-decoration: none;
  cursor: pointer;
}

.login-session-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--acc), var(--teal));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.login-session-user strong,
.login-session-user small {
  display: block;
}

.login-session-user strong {
  color: var(--ink);
  font-size: 15px;
}

.login-session-user small {
  color: var(--sub);
  margin-top: 4px;
  font-size: 12px;
}

.login-session-switch {
  justify-self: center;
  border: 0;
  background: transparent;
  padding: 2px 0;
  font: inherit;
}


.tab-pill {
  border-bottom: 0;
  margin: clamp(24px, 4vh, 34px) 0 clamp(18px, 3vh, 26px);
}

.tab-pill button {
  font-size: 16px;
  padding-bottom: 13px;
}

.login-page .field {
  margin-bottom: 21px;
}

.login-page .field label {
  font-size: 14px;
  margin-bottom: 9px;
}

.login-page .input {
  min-height: 58px;
  border-color: rgba(29, 29, 31, .13);
  background: rgba(255, 255, 255, .5);
  border-radius: 12px;
  padding: 18px 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

.login-page .input-wrap .input {
  padding-left: 50px;
}

.login-page .input-icon {
  left: 20px;
}

.input-action {
  position: absolute;
  right: 20px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.input-action:hover,
.input-action:focus-visible {
  background: rgba(32, 68, 105, .08);
  color: var(--acc);
}

.input-action:focus-visible {
  outline: 2px solid rgba(32, 68, 105, .38);
  outline-offset: 2px;
}

.input-action .password-eye-slash {
  opacity: 0;
  transition: opacity .2s ease;
}

.input-action.is-visible .password-eye-slash {
  opacity: 1;
}

#password {
  padding-right: 50px;
}

.login-page .input-wrap:focus-within .input {
  box-shadow: 0 0 0 4px rgba(32, 68, 105, .13), 0 16px 34px rgba(84, 92, 98, .08);
}

.login-page .input-wrap:focus-within .input-action {
  color: var(--acc);
}

.login-options {
  margin: 4px 0 26px;
  font-size: 14px;
}

.login-page .btn.primary {
  min-height: 58px;
  border-color: transparent;
  background: linear-gradient(180deg, #285585, #204469);
  border-radius: 10px;
  font-size: 16px !important;
  box-shadow: 0 16px 28px rgba(32, 68, 105, .24);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
  cursor: pointer;
}

.login-page .btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 36px rgba(32, 68, 105, .28);
  filter: saturate(1.04);
}

.login-page .btn.primary:disabled,
.login-page .btn.primary:disabled:hover {
  transform: none;
  box-shadow: 0 16px 28px rgba(32, 68, 105, .18);
  filter: none;
}

.login-page [data-login-submit].is-loading {
  pointer-events: none;
}

.login-page [data-login-submit].is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: login-submit-spin .8s linear infinite;
}

@keyframes login-submit-spin {
  to {
    transform: rotate(360deg);
  }
}

.mini-product {
  width: min(920px, 100%);
  margin-top: 16px;
  gap: 12px;
}

.mini-card {
  min-height: 106px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-color: rgba(255, 255, 255, .74);
  border-radius: 10px;
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 24px 70px rgba(40, 55, 70, .12), inset 0 1px 0 rgba(255, 255, 255, .86);
  backdrop-filter: blur(24px);
}

.mini-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5d6266;
  background: rgba(237, 239, 239, .82);
}

.mini-icon svg {
  width: 27px;
  height: 27px;
}

.mini-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.mini-card p {
  font-size: 13px;
  line-height: 1.8;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-arrow {
  color: var(--acc);
  font-size: 21px;
}

/* 低于此宽度：登录模块优先展示，宣传模块下移 */
@media (max-width: 1024px) {
  .login-page {
    display: flex;
    flex-direction: column;
    min-height: auto;
    background:
      radial-gradient(circle at 50% 8%, rgba(255, 255, 255, .96), rgba(255, 255, 255, 0) 34%),
      linear-gradient(180deg, #fbfaf7 0%, #f7f8f6 54%, #f1f2f1 100%);
  }

  .login-left {
    order: 2;
    grid-template-rows: minmax(0, 1fr) auto;
    border-right: 0;
    border-top: 0;
    border-bottom: 0;
    min-height: 560px;
    background: #111318;
  }

  .login-right {
    order: 1;
    width: auto;
    min-width: 0;
    flex: none;
    background:
      radial-gradient(circle at 50% 10%, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 38%),
      linear-gradient(180deg, rgba(251, 250, 247, .9) 0%, rgba(247, 248, 246, .82) 72%, rgba(247, 248, 246, 0) 100%);
    padding: 44px 32px 76px;
  }

  .login-card {
    max-width: 460px;
    margin: 0 auto;
  }

  .login-card.is-session .login-mobile-brand {
    margin: 0 0 28px;
  }

  .login-left>.brand {
    display: flex;
  }
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  .shell,
  .two-col,
  .three-col,
  .upload-box,
  .grid-2,
  .grid-3,
  .grid-4 {
    display: block;
  }

  .topbar {
    display: none;
  }

  .shell {
    position: relative;
  }

  .shell::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(14, 17, 23, .18);
    opacity: 1;
    pointer-events: auto;
  }

  .shell.sidebar-hidden::before {
    opacity: 0;
    pointer-events: none;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 80;
    width: min(270px, calc(100vw - 64px));
    max-width: calc(100vw - 64px);
    flex-basis: auto;
    padding: 18px 14px 0;
    border-right-color: var(--bd);
    transform: translateX(0);
    overflow: hidden;
    pointer-events: auto;
    transition: transform .22s ease, box-shadow .22s ease;
    box-shadow: 18px 0 50px rgba(40, 55, 70, .18);
  }

  .shell.sidebar-hidden .sidebar {
    width: min(270px, calc(100vw - 64px));
    flex-basis: auto;
    padding: 18px 14px 0;
    border-right-color: var(--bd);
    transform: translateX(calc(-100% - 18px));
    overflow: hidden;
    pointer-events: none;
    box-shadow: none;
  }

  .sidebar-restore {
    display: inline-flex;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 90;
  }

  .content {
    padding: 70px 22px 22px;
  }

  .panel,
  .card,
  .module-card {
    margin-bottom: 14px;
  }

  .login-page {
    display: flex;
    min-height: auto;
  }

  .login-left {
    min-height: 620px;
    padding: 28px 18px 18px;
    gap: 28px;
    border-right: 0;
    border-top: 0;
    border-bottom: 0;
  }

  .login-page .brand {
    gap: 0;
  }

  .brand-logo {
    width: 104px;
  }

  .login-left>.brand {
    padding: 16px 23px 22px 18px;
  }

  .login-left>.brand .brand-logo {
    width: 108px;
  }

  .login-page .eyebrow {
    margin-top: 0;
    font-size: 11px;
    letter-spacing: 2px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-copy {
    font-size: 15px;
    max-width: none;
  }

  .login-stats {
    margin-top: 70px;
  }

  .login-stat {
    padding: 14px 10px;
  }

  .login-stat strong {
    font-size: 24px;
  }

  .login-stat span {
    font-size: 13px;
  }

  .login-stat small {
    font-size: 11px;
  }

  .mini-product {
    grid-template-columns: 1fr;
  }

  .login-right {
    width: auto;
    min-width: 0;
    min-height: auto;
    padding: 34px 22px 68px;
  }

  .login-card {
    max-width: none;
    margin: 0;
  }

  .login-card.is-session .login-mobile-brand {
    margin-bottom: 24px;
  }

  .login-mobile-logo {
    width: 110px;
  }

  .login-mobile-brand span {
    margin-top: 10px;
    font-size: 13.5px;
  }

  .login-legal-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
  }

  .login-legal-links {
    justify-content: flex-start;
  }

  .login-legal-dialog {
    width: min(680px, calc(100vw - 28px));
    height: calc(100vh - 28px);
    border-radius: 16px;
  }

  .login-legal-tabs {
    overflow-x: auto;
    padding: 24px 72px 0 18px;
  }

  .login-legal-tabs button {
    min-width: 102px;
    font-size: 14px;
  }

  .login-legal-scroll {
    padding: 26px 24px 34px;
  }

  .login-legal-content {
    font-size: 15px;
  }

}

/* ============================================================
   ResoPeak App Skin  ·  scoped to .reso-app
   Applies the service/Design-v1.1.md system (Light / Snow Peak / Paper /
   Clinical Decision) to the in-app pages without altering the
   dark default theme or the login page.
   ============================================================ */
html:has(body.reso-app) {
  background: #f1f2f1;
}

body.reso-app {
  /* Re-map shared tokens to the ResoPeak light palette */
  --app: #f7f8f6;
  --bar: rgba(255, 255, 255, .72);
  --side: rgba(251, 250, 247, .55);
  --card: rgba(255, 255, 255, .72);
  --card-2: rgba(255, 255, 255, .55);
  --bd: rgba(29, 29, 31, .10);
  --hair: rgba(29, 29, 31, .08);
  --ink: #1d1d1f;
  --sub: #6e7378;
  --dim: #8d9296;
  --acc: #204469;
  --acc-hover: #183454;
  --acc-soft: #e7edf5;
  /* clinical blue takes the place of teal as secondary / clinical color */
  --teal: #284f73;
  --teal-soft: #dcecf7;
  --green: #4a9b6e;
  --green-soft: #e4f2ea;
  --red: #b23a48;
  --red-soft: #f7e3e1;
  --gold: #c99e4d;
  /* peak 灰阶对齐 A08 官方三灰（0702 版）：浅 → 中 → 深 */
  --peak-1: #dddddd;
  --peak-2: #8e8e8e;
  --peak-3: #545556;

  --font-display: "Noto Serif SC", "Linux Libertine", "Linux Libertine O", Georgia, "Songti SC", "STSong", serif;

  color: var(--ink);
  background:
    radial-gradient(circle at 16% -8%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 42%),
    linear-gradient(158deg, #f7f8f6 0%, #eef0f1 58%, #fbfaf7 100%);
}

/* Subtle paper grain / pressed-grid texture (clean but tactile) */
body.reso-app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .4;
  background-image:
    linear-gradient(90deg, rgba(29, 29, 31, .028) 1px, transparent 1px),
    linear-gradient(0deg, rgba(29, 29, 31, .022) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
}

.reso-app .layout {
  background: transparent;
  position: relative;
  z-index: 1;
  /* Bound to the viewport so .content scrolls internally and the
     sidebar (with its bottom-pinned account controls) stays fixed. */
  height: 100vh;
  overflow: hidden;
}

/* Translucent glass chrome */
.reso-app .topbar {
  background: var(--bar);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--bd);
}

.reso-app .sidebar {
  background: var(--side);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--bd);
}

.reso-app .content {
  background: transparent;
  position: relative;
  z-index: 1;
}

.reso-app .search {
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--bd);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.reso-app .avatar {
  background: linear-gradient(135deg, var(--acc), var(--teal));
  box-shadow: none;
}

.reso-app .nav-link.active {
  background: var(--acc-soft);
}

.reso-app .nav-link.teal-active {
  background: var(--teal-soft);
}

/* Serif display headings per the type scale */
.reso-app .page-title,
.reso-app .module-card h2,
.reso-app .kpi-value,
.reso-app .decision-title {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.reso-app .page-title {
  font-size: 30px;
  line-height: 1.16;
  font-weight: 700;
  color: var(--acc);
  letter-spacing: -0.03em;
}

.reso-app .workbench-title,
.reso-app .vpl-title {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.16;
  font-weight: 700;
  color: var(--acc);
  letter-spacing: -0.03em;
}

.reso-app .help-info h2 {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--acc);
  letter-spacing: -0.02em;
}

.patient-title .patient-case-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.18;
  font-weight: 700;
  color: var(--acc);
  letter-spacing: -0.02em;
}

.patient-title .patient-case-sub {
  color: var(--sub);
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}

/* Apple-style glass cards with a soft snow shadow */
.reso-app .card,
.reso-app .panel,
.reso-app .side-note {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .72);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 20px 60px rgba(40, 55, 70, .10), inset 0 1px 0 rgba(255, 255, 255, .8);
}

.reso-app .side-note,
.reso-app .sidebar-account-menu {
  box-shadow: 0 14px 36px rgba(40, 55, 70, .08);
}

/* Report sheet reads as printed paper, not glass */
.reso-app .paper {
  background: #ffffff;
  border-color: var(--bd);
  box-shadow: 0 24px 70px rgba(40, 55, 70, .12);
}

/* Module cards — clinical decision entries with a peak-breathing hover */
.reso-app .module-card {
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.reso-app .module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(32, 68, 105, .35);
  box-shadow: 0 30px 70px rgba(40, 55, 70, .16), inset 0 1px 0 rgba(255, 255, 255, .85);
}

.reso-app .module-card .mono {
  color: var(--peak-2) !important;
  /* 官方中灰 #8e8e8e，作弱化标签文字 */
}

.reso-app .icon-box {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}

/* 去掉强调色「光晕」：用于系统设置页头图标，呈中性无发光样式 */
.reso-app .icon-box.flat {
  background: var(--card-2);
  border-color: var(--bd);
  color: var(--sub);
  box-shadow: none;
}

/* Navy CTA — the primary action color (§6.1) */
.reso-app .btn.primary {
  background: linear-gradient(180deg, #285585, #204469);
  border-color: transparent;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 14px 26px rgba(32, 68, 105, .28);
  transition: transform .2s ease, box-shadow .2s ease;
}

.reso-app .btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(32, 68, 105, .32);
}

/* Clinical-blue secondary button needs light-on-dark text */
.reso-app .btn.teal {
  color: #ffffff;
  border-radius: 999px;
}

.reso-app .btn {
  border-radius: 999px;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.reso-app .btn.ghost:hover {
  border-color: var(--acc);
  color: var(--acc);
}

.reso-app .patient-row {
  transition: background-color .2s ease;
}

.reso-app .patient-row:hover {
  background: rgba(255, 255, 255, .5);
}

/* Form inputs — navy focus glow + lift (§8) */
.reso-app .input {
  background: rgba(255, 255, 255, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.reso-app .input:focus {
  border-color: var(--acc);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(32, 68, 105, .13), 0 14px 30px rgba(32, 68, 105, .12);
  transform: translateY(-1px);
}

/* Toggle: white knob on clinical-blue track */
.reso-app .toggle:after {
  background: #ffffff;
}

/* Light-surface fixes for color chips, swatches and tooth visuals */
.reso-app .shade-strip {
  border-color: rgba(29, 29, 31, .12);
}

.reso-app .shade-swatch {
  border-color: rgba(29, 29, 31, .12);
}

.reso-app .shade.active .shade-swatch {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px var(--teal-soft);
}

.reso-app .dot {
  border-color: rgba(29, 29, 31, .18);
}

.reso-app .tooth {
  border-color: rgba(29, 29, 31, .12);
  box-shadow: inset 0 -18px 30px rgba(0, 0, 0, .10), 0 12px 28px rgba(40, 55, 70, .16);
}

.reso-app .upload-box {
  background:
    linear-gradient(135deg, rgba(32, 68, 105, .07), rgba(40, 79, 115, .06)),
    rgba(255, 255, 255, .5);
}

.reso-app .demo-image {
  background: #f1f2f1;
}

/* Snow-peak relief — layered mountain lines behind a page header */
.wb-relief {
  position: absolute;
  top: -10px;
  right: -20px;
  width: min(640px, 60%);
  height: 230px;
  z-index: 0;
  opacity: .5;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 35%, transparent 100%);
}

.reso-app .container {
  position: relative;
  z-index: 1;
}

/* Clinical decision chips — green / cream / pink quick-reference (§6.4) */
.reso-app .decision-card {
  padding: 22px 24px;
}

.decision-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

.chip-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.chip {
  border-radius: 16px;
  border: 1px solid rgba(29, 29, 31, .07);
  padding: 15px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}

.chip.s-green {
  background: #e4f2ea;
}

.chip.s-cream {
  background: #f7efd9;
}

.chip.s-pink {
  background: #f7e3e1;
}

.chip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.chip-tag {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.chip-note {
  font-size: 11.5px;
  color: var(--sub);
}

.chip-flow {
  margin-top: 9px;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  letter-spacing: .5px;
  color: #3a4a55;
}

/* Help center */
.help-head {
  align-items: stretch;
}

.help-head .page-subtitle {
  max-width: 780px;
  line-height: 1.8;
}

.help-contact {
  width: 250px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 8px;
  background: rgba(255, 255, 255, .58);
  padding: 18px;
  box-shadow: 0 16px 42px rgba(40, 55, 70, .08), inset 0 1px 0 rgba(255, 255, 255, .8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
}

.help-contact strong {
  font-size: 15px;
  color: var(--ink);
}

.help-contact small {
  color: var(--sub);
  font-size: 12px;
  line-height: 1.6;
}

.help-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.help-info {
  padding: 20px;
  min-height: 172px;
}

.help-info-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--acc-soft);
  color: var(--acc);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.help-info h2,
.help-section-title {
  margin: 0;
  color: var(--acc);
}

.help-info h2 {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.help-info p {
  margin: 10px 0 0;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.75;
}

.help-section {
  margin-top: 16px;
}

.help-section-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.help-section-copy {
  max-width: 820px;
  margin: 10px 0 0;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.75;
}

.help-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.help-step {
  min-height: 190px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  background: rgba(255, 255, 255, .48);
  padding: 16px 14px;
}

/* 可选步骤(比色片校准)：虚线边框与主流程四步区分 */
.help-step-optional {
  border-style: dashed;
  background: rgba(255, 255, 255, .28);
}

.help-step span {
  display: inline-flex;
  margin-bottom: 16px;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  color: var(--acc);
}

/* 仅步骤标题(直接子元素)占整行；正文里的 <strong> 强调保持行内 */
.help-step>strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.help-step p strong {
  color: var(--ink);
}

.help-step p {
  margin: 9px 0 0;
  color: var(--sub);
  font-size: 12.5px;
  line-height: 1.7;
}

/* 流程图：接在五步流程条之后，作为整条流程的图示总览 */
.help-flow-figure {
  margin: 18px 0 0;
}

.help-flow-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: #ffffff;
}

/* 从工作台欢迎弹层跳过来时，锚点定位留出顶部呼吸空间 */
#shade-flow {
  scroll-margin-top: 24px;
}

/* 流程要点：流程条下方的条件与卡点补充 */
.help-notes {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--hair);
}

.help-notes-title {
  color: var(--acc);
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 8px;
}

.help-notes ul {
  margin: 0;
  padding-left: 18px;
  max-width: 940px;
}

.help-notes li {
  margin: 7px 0;
  color: var(--sub);
  font-size: 12.5px;
  line-height: 1.7;
}

.help-notes strong {
  color: var(--ink);
}

.help-decision-label {
  margin-top: 18px;
}

.help-legal {
  overflow: hidden;
}

.legal-block,
.faq-list details {
  border-top: 1px solid var(--hair);
}

.legal-block:first-of-type,
.faq-list details:first-child {
  margin-top: 18px;
}

.legal-block summary,
.faq-list summary {
  list-style: none;
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.legal-block summary {
  padding: 18px 0 14px;
  font-size: 15px;
}

.faq-list summary {
  padding: 17px 0;
  font-size: 14px;
}

.legal-block summary::-webkit-details-marker,
.faq-list summary::-webkit-details-marker {
  display: none;
}

.legal-block summary::after,
.faq-list summary::after {
  content: "+";
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid var(--bd);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--acc);
  font-weight: 500;
}

.legal-block[open] summary::after,
.faq-list details[open] summary::after {
  content: "-";
}

.legal-copy {
  max-width: 940px;
  padding: 0 0 20px;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.78;
}

/* 帮助页法律文本直接注入 legal-v1 原文：h3 是文本标题(summary 已给出，弱化处理)，
   h4 才是条目标题，沿用原先 h3 的样式 */
.legal-copy h3 {
  margin: 2px 0 10px;
  color: var(--ink);
  font-size: 15px;
}

.legal-copy h4 {
  margin: 18px 0 6px;
  color: var(--acc);
  font-size: 13.5px;
}

.legal-status {
  color: var(--dim);
}

.legal-status.error {
  color: var(--red);
}

.legal-copy p {
  margin: 9px 0;
}

.legal-copy ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.legal-copy li {
  margin: 6px 0;
}

.legal-copy strong {
  color: var(--ink);
}

.legal-copy code {
  border-radius: 6px;
  background: var(--acc-soft);
  color: var(--acc-hover);
  padding: 2px 6px;
  font-size: 12px;
}

/* .legal-warn 为 legal-v1 免责声明原文里的警示块，与本页 .legal-warning 同款 */
.legal-warning,
.legal-copy .legal-warn {
  border-left: 4px solid var(--acc);
  background: var(--acc-soft);
  padding: 12px 14px;
  border-radius: 8px;
}

.legal-copy .legal-warn {
  margin: 10px 0;
  color: var(--ink);
}

.legal-copy .legal-consent-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--hair);
  color: var(--dim);
  font-size: 12.5px;
}

.legal-consent-note span {
  color: var(--acc);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

.faq-list {
  margin-top: 2px;
}

.faq-list p {
  margin: -4px 0 18px;
  max-width: 860px;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.75;
}

/* Sidebar brand logo (replaces the 齿色预见 wordmark).
   The asset is a vertical lockup with ~40% empty margin, so we scale it
   up and crop the dead space with an overflow box for a legible mark. */
.reso-app .side-brand {
  align-items: center;
  height: 48px;
  overflow: hidden;
}

.reso-app .side-brand .brand-logo {
  width: auto;
  height: 68px;
  margin: -14px 0;
  display: block;
}

/* Navigation menu icons — line SVGs tinted with currentColor so they
   inherit the link colour (grey → orange/blue when active). */
.reso-app .nav-link::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  background-color: currentColor;
  opacity: .85;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

.reso-app .nav-link.active::before,
.reso-app .nav-link.teal-active::before {
  opacity: 1;
}

.reso-app .nav-link[href="workbench.html"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E");
}

.reso-app .nav-link[href="color-pick.html"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 22 1-1h3l9-9'/%3E%3Cpath d='M3 21v-3l9-9'/%3E%3Cpath d='m15 6 3.4-3.4a2.12 2.12 0 0 1 3 3L18 9l.4.4a2.12 2.12 0 0 1-3 3l-3.8-3.8a2.12 2.12 0 0 1 3-3l.4.4Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 22 1-1h3l9-9'/%3E%3Cpath d='M3 21v-3l9-9'/%3E%3Cpath d='m15 6 3.4-3.4a2.12 2.12 0 0 1 3 3L18 9l.4.4a2.12 2.12 0 0 1-3 3l-3.8-3.8a2.12 2.12 0 0 1 3-3l.4.4Z'/%3E%3C/svg%3E");
}

.reso-app .nav-link[href="color-forecast.html"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 3 7.8 12 12.6 21 7.8 12 3Z'/%3E%3Cpath d='M3 12 12 16.8 21 12'/%3E%3Cpath d='M3 16.2 12 21 21 16.2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 3 7.8 12 12.6 21 7.8 12 3Z'/%3E%3Cpath d='M3 12 12 16.8 21 12'/%3E%3Cpath d='M3 16.2 12 21 21 16.2'/%3E%3C/svg%3E");
}

.reso-app .nav-link[href="order.html"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5h6'/%3E%3Cpath d='M9 3h6v4H9z'/%3E%3Crect x='5' y='5' width='14' height='16' rx='2'/%3E%3Cpath d='M8 11h8M8 15h5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5h6'/%3E%3Cpath d='M9 3h6v4H9z'/%3E%3Crect x='5' y='5' width='14' height='16' rx='2'/%3E%3Cpath d='M8 11h8M8 15h5'/%3E%3C/svg%3E");
}

.reso-app .nav-link[href="report-list.html"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M9 13h6'/%3E%3Cpath d='M9 17h6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M9 13h6'/%3E%3Cpath d='M9 17h6'/%3E%3C/svg%3E");
}

.reso-app .nav-link[href="account.html"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 3.6-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 3.6-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
}

.reso-app .nav-link[href="setting.html"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h10'/%3E%3Cpath d='M18 6h2'/%3E%3Cpath d='M4 12h2'/%3E%3Cpath d='M10 12h10'/%3E%3Cpath d='M4 18h8'/%3E%3Cpath d='M16 18h4'/%3E%3Ccircle cx='16' cy='6' r='2'/%3E%3Ccircle cx='8' cy='12' r='2'/%3E%3Ccircle cx='14' cy='18' r='2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h10'/%3E%3Cpath d='M18 6h2'/%3E%3Cpath d='M4 12h2'/%3E%3Cpath d='M10 12h10'/%3E%3Cpath d='M4 18h8'/%3E%3Cpath d='M16 18h4'/%3E%3Ccircle cx='16' cy='6' r='2'/%3E%3Ccircle cx='8' cy='12' r='2'/%3E%3Ccircle cx='14' cy='18' r='2'/%3E%3C/svg%3E");
}

.reso-app .nav-link[href="help.html"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9.1 9a3 3 0 0 1 5.8 1c0 2-3 2.4-3 4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9.1 9a3 3 0 0 1 5.8 1c0 2-3 2.4-3 4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
}

/* ============================================================
   Collapsible Sidebar — icon-only collapsed state
   Toggled via .sidebar-collapsed on .shell
   ============================================================ */
.shell.sidebar-collapsed .sidebar {
  width: 56px;
  flex-basis: 56px;
  /* 顶部留出展开按钮的位置(18 + 40 + 16)，按钮绝对定位占用原 Logo 槽位 */
  padding: 74px 8px 0;
  /* 不裁剪溢出内容：账号弹层、导航悬浮提示都要伸出侧栏 */
  overflow: visible;
}

.shell.sidebar-collapsed .sidebar .side-brand {
  display: none;
}

.shell.sidebar-collapsed .sidebar .side-label,
.shell.sidebar-collapsed .sidebar .divider {
  display: none;
}

.shell.sidebar-collapsed .sidebar .nav-link {
  justify-content: center;
  padding: 12px 0;
  gap: 0;
  border-radius: 10px;
  font-size: 0;
  position: relative;
}

.shell.sidebar-collapsed .sidebar .nav-link.active {
  background: var(--acc-soft);
}

.shell.sidebar-collapsed .sidebar .nav-link.teal-active {
  background: var(--teal-soft);
}

.shell.sidebar-collapsed .sidebar .nav-link::before {
  width: 20px;
  height: 20px;
  opacity: .7;
  background-color: var(--sub);
}

.shell.sidebar-collapsed .sidebar .nav-link.active::before,
.shell.sidebar-collapsed .sidebar .nav-link.teal-active::before {
  opacity: 1;
  background-color: var(--acc);
}

.shell.sidebar-collapsed .sidebar .nav-link:hover {
  background: var(--acc-soft);
}

.shell.sidebar-collapsed .sidebar .nav-link:hover::before {
  opacity: 1;
  background-color: var(--acc);
}

.shell.sidebar-collapsed .sidebar .sidebar-footer {
  margin-left: -8px;
  margin-right: -8px;
}

.shell.sidebar-collapsed .sidebar .sidebar-footer .side-note {
  display: none;
}

.shell.sidebar-collapsed .sidebar .sidebar-footer .user {
  justify-content: center;
  padding: 10px 4px;
}

.shell.sidebar-collapsed .sidebar .sidebar-footer .user span:last-child {
  display: none;
}

.shell.sidebar-collapsed .sidebar .sidebar-footer .logout-btn {
  display: none;
}

.shell.sidebar-collapsed .sidebar .sidebar-account-menu {
  /* 临时弹层：靠左对齐并突破收起后的侧栏宽度，位于触发按钮上方 */
  left: 8px;
}

.shell.sidebar-collapsed .sidebar .sidebar-toggle {
  /* 占用收起后 Logo 的位置：顶部水平居中 (56 - 40) / 2 = 8 */
  top: 18px;
  right: 8px;
}

.shell.sidebar-collapsed .sidebar .sidebar-toggle::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M9 4v16'/%3E%3Cpath d='M12 9l3 3-3 3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M9 4v16'/%3E%3Cpath d='M12 9l3 3-3 3'/%3E%3C/svg%3E");
}

.shell.sidebar-collapsed .sidebar .sidebar-resizer {
  display: none;
}

/* Tooltip on hover for collapsed nav items */
.shell.sidebar-collapsed .sidebar .nav-link::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30, 30, 30, .9);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
  z-index: 100;
}

.shell.sidebar-collapsed .sidebar .nav-link:hover::after {
  opacity: 1;
}

@media (max-width: 900px) {
  .wb-relief {
    display: none;
  }

  .chip-row {
    grid-template-columns: 1fr;
  }

  .help-head {
    flex-direction: column;
  }

  .help-contact {
    width: 100%;
  }

  .help-info-grid,
  .help-flow {
    grid-template-columns: 1fr;
  }

  .help-step {
    min-height: 0;
  }

  /* Mobile stacks the layout and relies on normal page scroll */
  .reso-app .layout {
    height: auto;
    overflow: visible;
  }
}
