/* =============================================================================
   维护站样式 — 幻境 Forge 门户设计语言
   ============================================================================= */

/* ---------- 基础 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  font-family: "SF Pro Display","SF Pro Text","PingFang SC","Microsoft YaHei","Helvetica Neue",sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1c1917;
  background: #f0ebe3;
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.dark {
  color: #f5f5f4;
  background: #171616;
  color-scheme: dark;
}

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

img, svg {
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- 全局动效 ---------- */
@keyframes ms-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ms-rise {
  animation: ms-rise 0.7s cubic-bezier(0.2, 0.75, 0.25, 1) both;
  animation-delay: var(--rise-delay, 0s);
}

@media (prefers-reduced-motion: reduce) {
  .ms-rise {
    animation: none;
    opacity: 1;
  }
}

/* ---------- Layout ---------- */
.ms-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.ms-main {
  flex: 1;
  display: flex;
}

/* ---------- 环境光 ---------- */
.ms-lights {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ms-lights span {
  position: absolute;
  border-radius: 9999px;
  filter: blur(72px);
  will-change: transform, opacity;
}

.ms-light-one {
  top: -8rem; right: -5rem;
  width: 30rem; height: 30rem;
  background: rgb(252 211 77 / 0.24);
  animation: ms-light-drift 14s ease-in-out infinite;
}

.ms-light-two {
  top: 22%; left: 5%;
  width: 18rem; height: 18rem;
  background: rgb(255 255 255 / 0.3);
  animation: ms-light-breathe 9s ease-in-out infinite;
}

.ms-light-three {
  top: 38%; right: 8%;
  width: 13rem; height: 13rem;
  background: rgb(251 191 36 / 0.16);
  filter: blur(62px);
  animation: ms-light-orbit 17s ease-in-out -5s infinite;
}

.ms-light-four {
  top: 58%; left: 34%;
  width: 10rem; height: 10rem;
  background: rgb(253 224 71 / 0.12);
  filter: blur(54px);
  animation: ms-light-orbit-reverse 20s ease-in-out -8s infinite;
}

.ms-light-five {
  top: 80%; right: 24%;
  width: 16rem; height: 16rem;
  background: rgb(245 158 11 / 0.1);
  filter: blur(78px);
  animation: ms-light-breathe 16s ease-in-out -4s infinite;
}

@keyframes ms-light-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.72; }
  50%      { transform: translate3d(-3rem, 2.25rem, 0) scale(1.08); opacity: 1; }
}

@keyframes ms-light-breathe {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.92); opacity: 0.28; }
  50%      { transform: translate3d(1.5rem, -1rem, 0) scale(1.12); opacity: 0.62; }
}

@keyframes ms-light-orbit {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.86); opacity: 0.35; }
  33%      { transform: translate3d(-4rem, 2rem, 0) scale(1.1); opacity: 0.7; }
  66%      { transform: translate3d(2rem, -3rem, 0) scale(0.96); opacity: 0.48; }
}

@keyframes ms-light-orbit-reverse {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.82); opacity: 0.24; }
  40%      { transform: translate3d(5rem, 3rem, 0) scale(1.14); opacity: 0.6; }
  75%      { transform: translate3d(-2rem, 1rem, 0) scale(0.94); opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
  .ms-lights span { animation: none; }
}

/* ---------- 气团光球 ---------- */
.ms-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ms-orb {
  position: absolute;
  display: block;
  border-radius: 9999px;
  filter: blur(48px);
  opacity: 0.64;
  will-change: transform, opacity;
}

.ms-orb-amber {
  top: -4rem; right: 7%;
  width: 10rem; height: 10rem;
  background: rgb(245 158 11 / 0.7);
  animation: ms-orb-amber 12s ease-in-out infinite;
}

.ms-orb-violet {
  top: 16%; right: 28%;
  width: 8rem; height: 8rem;
  background: rgb(139 92 246 / 0.58);
  animation: ms-orb-violet 16s ease-in-out -4s infinite;
}

.ms-orb-cyan {
  top: 48%; right: 4%;
  width: 7rem; height: 7rem;
  background: rgb(6 182 212 / 0.5);
  animation: ms-orb-cyan 14s ease-in-out -7s infinite;
}

.ms-orb-rose {
  top: 8%; right: 48%;
  width: 6rem; height: 6rem;
  background: rgb(244 63 94 / 0.44);
  animation: ms-orb-rose 18s ease-in-out -9s infinite;
}

@keyframes ms-orb-amber {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.86); opacity: 0.5; }
  50%      { transform: translate3d(-4rem, 3rem, 0) scale(1.18); opacity: 0.82; }
}

@keyframes ms-orb-violet {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.9); opacity: 0.38; }
  50%      { transform: translate3d(3rem, 2rem, 0) scale(1.2); opacity: 0.72; }
}

@keyframes ms-orb-cyan {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.82); opacity: 0.32; }
  45%      { transform: translate3d(-2rem, -3rem, 0) scale(1.16); opacity: 0.66; }
  75%      { transform: translate3d(1rem, 1rem, 0) scale(0.95); opacity: 0.46; }
}

@keyframes ms-orb-rose {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.84); opacity: 0.28; }
  50%      { transform: translate3d(4rem, -2rem, 0) scale(1.2); opacity: 0.58; }
}

@media (prefers-reduced-motion: reduce) {
  .ms-orb { animation: none; }
}

/* ---------- 渐变文字 ---------- */
.ms-text-gradient {
  background: linear-gradient(120deg, #d97706 0%, #a855f7 55%, #0891b2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.dark .ms-text-gradient {
  background: linear-gradient(120deg, #fbbf24 0%, #c084fc 55%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- 巨型分区关键词 ---------- */
.ms-zone-word {
  display: none;
  font-size: 9rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.3;
  letter-spacing: 0.02em;
  pointer-events: none;
  user-select: none;
  background: linear-gradient(120deg, #d97706 0%, #a855f7 55%, #0891b2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.dark .ms-zone-word {
  background: linear-gradient(120deg, #fbbf24 0%, #c084fc 55%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

@media (min-width: 768px) {
  .ms-zone-word {
    display: block;
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 19rem;
  }
}

/* ---------- Header ---------- */
.ms-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: rgb(240 235 227 / 0.4);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.dark .ms-header {
  background: rgb(23 22 22 / 0.4);
}

.ms-header.scrolled {
  border-color: rgb(231 229 228 / 0.8);
  background: rgb(255 255 255 / 0.8);
  box-shadow: 0 8px 30px -18px rgba(0,0,0,0.2);
}

.dark .ms-header.scrolled {
  border-color: rgb(255 255 255 / 0.1);
  background: rgb(23 22 22 / 0.8);
}

.ms-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

@media (min-width: 640px) {
  .ms-header-inner { padding: 0 32px; }
}

.ms-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- 品牌 ---------- */
.ms-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ms-logo {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
}

/* 明暗主题 logo 切换（仿 Tailwind dark: 前缀） */
.dark .dark\:hidden { display: none; }
.dark .dark\:block { display: block; }
.hidden { display: none; }
.block { display: block; }

/* ---------- 图标按钮 ---------- */
.ms-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  color: #78716c;
  transition: background 0.15s, color 0.15s;
}

.ms-icon-btn:hover {
  background: rgb(231 229 228 / 0.6);
  color: #1c1917;
}

.dark .ms-icon-btn {
  color: #a8a29e;
}

.dark .ms-icon-btn:hover {
  background: rgb(255 255 255 / 0.1);
  color: #f5f5f4;
}

.ms-icon-btn svg {
  width: 18px;
  height: 18px;
}

/* 明暗切换图标（.dark 仅存在于 html 元素上） */
html.dark .ms-sun { display: none; }
html:not(.dark) .ms-moon { display: none; }

/* ---------- Hero ---------- */
.ms-hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 100px 24px 80px;
  overflow: hidden;
}

.ms-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ---------- 核心装饰（仅完成态显示静态标记） ---------- */
.ms-emblem {
  width: 72px;
  height: 72px;
  margin-bottom: 32px;
}

.ms-emblem-core {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgb(6 182 212 / 0.2), rgb(245 158 11 / 0.18));
  display: flex;
  align-items: center;
  justify-content: center;
}

.ms-emblem-core svg {
  width: 28px;
  height: 28px;
  color: rgb(6 182 212 / 0.9);
}

/* ---------- 徽章 ---------- */
.ms-pill-wrap { margin-bottom: 24px; }

.ms-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  border: 1px solid rgb(231 229 228 / 0.8);
  background: rgb(255 255 255 / 0.7);
  font-size: 14px;
  color: #57534e;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dark .ms-pill {
  border-color: rgb(255 255 255 / 0.1);
  background: rgb(255 255 255 / 0.05);
  color: #d6d3d1;
}

.ms-pill.is-finished {
  border-color: rgb(6 182 212 / 0.3);
  background: rgb(6 182 212 / 0.08);
  color: #0891b2;
}

.dark .ms-pill.is-finished {
  border-color: rgb(34 211 238 / 0.3);
  background: rgb(34 211 238 / 0.08);
  color: #22d3ee;
}

.ms-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #f59e0b;
  animation: ms-pulse-dot 2s ease-in-out infinite;
}

.is-finished .ms-pill-dot {
  background: #0891b2;
  animation: none;
}

.dark .is-finished .ms-pill-dot {
  background: #22d3ee;
}

@keyframes ms-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.8); }
}

/* ---------- 标题 & 文案 ---------- */
.ms-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 580px;
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  .ms-title { font-size: 2.8rem; }
}

@media (min-width: 1024px) {
  .ms-title { font-size: 3.4rem; }
}

.ms-message {
  font-size: 15px;
  line-height: 1.7;
  color: #57534e;
  max-width: 480px;
  margin-bottom: 40px;
}

.dark .ms-message { color: #d6d3d1; }

/* ---------- 面板（单一进度面板） ---------- */
.ms-panel {
  width: 100%;
  padding: 32px 28px;
  border-radius: 28px;
  border: 1px solid rgb(231 229 228 / 0.8);
  background: rgb(255 255 255 / 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 32px;
}

.dark .ms-panel {
  border-color: rgb(255 255 255 / 0.08);
  background: rgb(255 255 255 / 0.04);
}

@media (min-width: 640px) {
  .ms-panel { padding: 40px 36px; }
}

/* 进度头 */
.ms-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ms-percent {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.ms-percent i {
  font-style: normal;
  font-size: 1.2rem;
  font-weight: 500;
  color: #78716c;
}

.dark .ms-percent i { color: #a8a29e; }

.ms-progress-label {
  font-size: 13px;
  color: #78716c;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.dark .ms-progress-label { color: #a8a29e; }

/* 进度条 */
.ms-bar {
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: rgb(231 229 228 / 0.6);
  overflow: hidden;
  margin-bottom: 36px;
}

.dark .ms-bar {
  background: rgb(255 255 255 / 0.08);
}

.ms-bar-fill {
  display: block;
  height: 100%;
  border-radius: 9999px;
  width: var(--bar-w, 0%);
  background: linear-gradient(90deg, #d97706, #a855f7 55%, #0891b2);
  transition: width 0.8s cubic-bezier(0.2, 0.75, 0.25, 1);
  position: relative;
  overflow: hidden;
}

.ms-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  animation: ms-shimmer 2.5s ease-in-out infinite;
}

.dark .ms-bar-fill {
  background: linear-gradient(90deg, #fbbf24, #c084fc 55%, #22d3ee);
}

@keyframes ms-shimmer {
  100% { transform: translateX(100%); }
}

/* ---------- 阶段时间线 ---------- */
.ms-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.ms-step {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 0 0 28px 0;
}

.ms-step:last-child {
  padding-bottom: 0;
}

.ms-step::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: rgb(231 229 228 / 0.6);
}

.dark .ms-step::before {
  background: rgb(255 255 255 / 0.08);
}

.ms-step:last-child::before {
  display: none;
}

.ms-step.is-done::before {
  background: linear-gradient(180deg, #d97706, #a855f7 55%, #0891b2);
}

/* 节点圆圈 */
.ms-step-node {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgb(214 211 209);
  background: rgb(240 235 227);
  color: #78716c;
  font-size: 14px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.dark .ms-step-node {
  border-color: rgb(255 255 255 / 0.1);
  background: #171616;
  color: #a8a29e;
}

.ms-step.is-done .ms-step-node {
  border-color: #0891b2;
  background: linear-gradient(135deg, rgb(217 119 6 / 0.15), rgb(168 85 247 / 0.12), rgb(8 145 178 / 0.15));
  color: #0891b2;
}

.dark .ms-step.is-done .ms-step-node {
  border-color: #22d3ee;
  background: linear-gradient(135deg, rgb(251 191 36 / 0.15), rgb(192 132 252 / 0.12), rgb(34 211 238 / 0.15));
  color: #22d3ee;
}

.ms-step.is-done .ms-step-node i {
  display: none;
}

.ms-step.is-done .ms-step-node svg {
  width: 16px;
  height: 16px;
}

.ms-step:not(.is-done) .ms-step-node svg {
  display: none;
}

.ms-step.is-active .ms-step-node {
  border-color: #f59e0b;
  background: rgb(245 158 11 / 0.1);
  color: #d97706;
  box-shadow: 0 0 0 4px rgb(245 158 11 / 0.15);
}

.dark .ms-step.is-active .ms-step-node {
  border-color: #fbbf24;
  background: rgb(251 191 36 / 0.1);
  color: #fbbf24;
  box-shadow: 0 0 0 4px rgb(251 191 36 / 0.12);
}

/* 步骤文案 */
.ms-step-body {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

.ms-step-body b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.ms-step-body em {
  font-style: normal;
  font-weight: 500;
  font-size: 12px;
  color: #d97706;
  margin-left: 8px;
  vertical-align: middle;
}

.dark .ms-step-body em { color: #fbbf24; }

.ms-step-body small {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.55;
  color: #78716c;
}

.dark .ms-step-body small { color: #a8a29e; }

.ms-step.is-done .ms-step-body b,
.ms-step.is-done .ms-step-body small {
  color: #a8a29e;
}

.dark .ms-step.is-done .ms-step-body b,
.dark .ms-step.is-done .ms-step-body small {
  color: #78716c;
}

.ms-step.is-active .ms-step-body b {
  color: #1c1917;
}

.dark .ms-step.is-active .ms-step-body b {
  color: #f5f5f4;
}

/* ---------- 时间元信息 ---------- */
.ms-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 32px;
  margin-bottom: 32px;
}

.ms-meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.ms-meta-item span {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #78716c;
}

.dark .ms-meta-item span { color: #a8a29e; }

.ms-meta-item b {
  font-size: 14px;
  font-weight: 600;
}

/* ---------- 按钮 ---------- */
.ms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 9999px;
  background: #1c1917;
  color: #f5f5f4;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: opacity 0.15s, transform 0.15s;
}

.ms-btn:hover {
  opacity: 0.9;
}

.ms-btn:active {
  transform: scale(0.97);
}

.dark .ms-btn {
  background: #f5f5f4;
  color: #1c1917;
}

.ms-btn svg {
  width: 16px;
  height: 16px;
}

.ms-btn-full {
  width: 100%;
}

.ms-btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #78716c;
  padding: 6px 12px;
  border-radius: 9999px;
  transition: background 0.15s, color 0.15s;
}

.ms-btn-ghost-sm:hover {
  background: rgb(231 229 228 / 0.6);
  color: #1c1917;
}

.dark .ms-btn-ghost-sm {
  color: #a8a29e;
}

.dark .ms-btn-ghost-sm:hover {
  background: rgb(255 255 255 / 0.1);
  color: #f5f5f4;
}

.ms-btn-ghost-sm svg {
  width: 14px;
  height: 14px;
}

/* ---------- Footer ---------- */
.ms-footer {
  position: relative;
  z-index: 1;
  padding: 28px 20px;
  border-top: 1px solid rgb(231 229 228 / 0.7);
  text-align: center;
}

.dark .ms-footer {
  border-color: rgb(255 255 255 / 0.1);
}

.ms-footer-brand {
  margin-bottom: 6px;
  justify-content: center;
}

.ms-footer p {
  font-size: 14px;
  color: #78716c;
}

.dark .ms-footer p { color: #a8a29e; }

.ms-footer small {
  font-size: 12px;
  color: #a8a29e;
  margin-top: 4px;
  display: block;
}

.dark .ms-footer small { color: #78716c; }

.ms-footer small a {
  opacity: 0.5;
  transition: opacity 0.15s;
}

.ms-footer small a:hover { opacity: 0.8; }

/* =============================================================================
   管理后台附加样式
   ============================================================================= */

.ms-admin .ms-header {
  position: relative;
}

.ms-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgb(245 158 11 / 0.12);
  color: #d97706;
  margin-left: 4px;
}

.dark .ms-badge {
  background: rgb(251 191 36 / 0.12);
  color: #fbbf24;
}

.ms-admin-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px 80px;
  position: relative;
  z-index: 1;
}

.ms-console {
  width: 100%;
  max-width: 640px;
}

/* ---------- 登录卡 ---------- */
.ms-auth-wrap {
  width: 100%;
  min-height: 80dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ms-auth-card {
  width: 100%;
  max-width: 380px;
  padding: 40px 28px;
  border-radius: 28px;
  border: 1px solid rgb(231 229 228 / 0.8);
  background: rgb(255 255 255 / 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: center;
  position: relative;
  z-index: 1;
}

.dark .ms-auth-card {
  border-color: rgb(255 255 255 / 0.08);
  background: rgb(255 255 255 / 0.04);
}

.ms-auth-logo {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  object-fit: contain;
}

.ms-auth-card h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.ms-auth-sub {
  font-size: 13px;
  color: #78716c;
  margin-bottom: 24px;
}

.dark .ms-auth-sub { color: #a8a29e; }

/* ---------- 提示框 ---------- */
.ms-callout {
  padding: 12px 16px;
  border-radius: 14px;
  background: rgb(245 158 11 / 0.08);
  border: 1px solid rgb(245 158 11 / 0.15);
  font-size: 13px;
  color: #92400e;
  line-height: 1.6;
  text-align: left;
  margin-bottom: 16px;
}

.dark .ms-callout {
  background: rgb(251 191 36 / 0.06);
  border-color: rgb(251 191 36 / 0.12);
  color: #fde68a;
}

.ms-callout code {
  font-family: "SF Mono","Cascadia Code","Consolas",monospace;
  font-size: 12px;
  background: rgb(0 0 0 / 0.06);
  padding: 1px 6px;
  border-radius: 5px;
}

.dark .ms-callout code {
  background: rgb(255 255 255 / 0.08);
}

.ms-callout.is-warn {
  background: rgb(239 68 68 / 0.06);
  border-color: rgb(239 68 68 / 0.12);
  color: #991b1b;
}

.dark .ms-callout.is-warn {
  background: rgb(248 113 113 / 0.06);
  border-color: rgb(248 113 113 / 0.12);
  color: #fecaca;
}

/* 错误 */
.ms-form-error {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgb(239 68 68 / 0.08);
  color: #b91c1c;
  font-size: 13px;
  margin-bottom: 16px;
}

.dark .ms-form-error {
  background: rgb(248 113 113 / 0.08);
  color: #fca5a5;
}

/* Toast */
.ms-toast {
  padding: 10px 16px;
  border-radius: 12px;
  background: rgb(6 182 212 / 0.08);
  border: 1px solid rgb(6 182 212 / 0.15);
  color: #0e7490;
  font-size: 13px;
  margin-bottom: 20px;
}

.dark .ms-toast {
  background: rgb(34 211 238 / 0.06);
  border-color: rgb(34 211 238 / 0.12);
  color: #67e8f9;
}

/* ---------- 分区 ---------- */
.ms-section {
  border: none;
  padding: 24px 0;
  border-bottom: 1px solid rgb(231 229 228 / 0.6);
  margin-bottom: 0;
}

.dark .ms-section {
  border-color: rgb(255 255 255 / 0.06);
}

.ms-section legend {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #78716c;
  margin-bottom: 16px;
  padding: 0;
}

.dark .ms-section legend {
  color: #a8a29e;
}

.ms-hint {
  font-size: 12px;
  color: #a8a29e;
  margin: -8px 0 16px;
}

.dark .ms-hint { color: #78716c; }

/* ---------- 分段控件 ---------- */
.ms-segmented {
  display: inline-flex;
  gap: 0;
  border-radius: 9999px;
  border: 1px solid rgb(231 229 228 / 0.8);
  background: rgb(255 255 255 / 0.6);
  overflow: hidden;
}

.dark .ms-segmented {
  border-color: rgb(255 255 255 / 0.08);
  background: rgb(255 255 255 / 0.04);
}

.ms-seg {
  display: flex;
  align-items: center;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: #78716c;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.dark .ms-seg { color: #a8a29e; }

.ms-seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ms-seg.is-checked {
  background: #1c1917;
  color: #f5f5f4;
}

.dark .ms-seg.is-checked {
  background: #f5f5f4;
  color: #1c1917;
}

/* ---------- 表单字段 ---------- */
.ms-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ms-field span {
  font-size: 13px;
  font-weight: 500;
  color: #57534e;
}

.dark .ms-field span { color: #d6d3d1; }

.ms-field input,
.ms-field textarea,
.ms-field select {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgb(231 229 228 / 0.8);
  background: rgb(255 255 255 / 0.7);
  font: inherit;
  font-size: 14px;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.dark .ms-field input,
.dark .ms-field textarea,
.dark .ms-field select {
  border-color: rgb(255 255 255 / 0.08);
  background: rgb(255 255 255 / 0.04);
}

.ms-field input:focus,
.ms-field textarea:focus,
.ms-field select:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgb(245 158 11 / 0.12);
}

.dark .ms-field input:focus,
.dark .ms-field textarea:focus,
.dark .ms-field select:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgb(251 191 36 / 0.1);
}

.ms-field textarea {
  resize: vertical;
  min-height: 60px;
}

.ms-field.ms-inline {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.ms-field input[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 双列网格 */
.ms-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 500px) {
  .ms-grid { grid-template-columns: 1fr 1fr; }
}

.ms-field-block {
  margin-top: 20px;
}

.ms-field-block > b {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #78716c;
  margin-bottom: 8px;
}

.dark .ms-field-block > b { color: #a8a29e; }

/* ---------- 阶段管理 ---------- */
.ms-stage-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ms-stage-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.ms-stage-enable {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #78716c;
  padding-top: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.dark .ms-stage-enable { color: #a8a29e; }

.ms-stage-enable input[type="checkbox"] {
  accent-color: #d97706;
}

.ms-stage-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ms-stage-title {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgb(231 229 228 / 0.8);
  background: rgb(255 255 255 / 0.7);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  outline: none;
}

.ms-stage-desc {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgb(231 229 228 / 0.8);
  background: rgb(255 255 255 / 0.7);
  font: inherit;
  font-size: 13px;
  color: inherit;
  outline: none;
}

.dark .ms-stage-title,
.dark .ms-stage-desc {
  border-color: rgb(255 255 255 / 0.08);
  background: rgb(255 255 255 / 0.04);
}

.ms-stage-title:focus,
.ms-stage-desc:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgb(245 158 11 / 0.12);
}

.dark .ms-stage-title:focus,
.dark .ms-stage-desc:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgb(251 191 36 / 0.1);
}

/* 操作按钮区 */
.ms-actions {
  padding-top: 24px;
}

/* ---------- 响应式微调 ---------- */
@media (max-width: 480px) {
  .ms-title { font-size: 1.7rem; }
  .ms-panel { padding: 24px 20px; border-radius: 22px; }
  .ms-percent { font-size: 2.4rem; }
  .ms-auth-card { padding: 32px 20px; border-radius: 22px; }
}