/* ============================================================
   DIAOYANPRO · Digital Epoch workspace
   Reference: E:\07F5\网页提示 (Digital Epoch primary, Taskly secondary)
   Principle: warm-white canvas / navy typography / electric-blue accent.
   Blue is an accent, never a full-screen teal surface.
   ============================================================ */

:root {
  --brand: #0a1b33;
  --brand-deep: #071426;
  --accent: #1677ff;
  --accent-strong: #075fd8;
  --accent-soft: rgba(22, 119, 255, 0.10);
  --aqua: #60b1ff;
  --ink: #0a1b33;
  --muted: #66758a;
  --faint: #94a3b8;
  --bg: #f6f8fb;
  --card: #ffffff;
  --line: rgba(15, 35, 61, 0.10);
  --line-strong: rgba(15, 35, 61, 0.16);
  --ok: #1f9d68;
  --warn: #c67a13;
  --danger: #d84b55;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow-sm: 0 10px 30px rgba(15, 35, 61, 0.06);
  --shadow-md: 0 24px 70px rgba(15, 35, 61, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
::selection { background: rgba(22, 119, 255, .18); color: var(--ink); }

/* ---------- Shared visual atoms ---------- */
.ms-card,
.ms-card--light,
.ms-card--dark {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(15, 35, 61, .09);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.ms-card::before,
.ms-card--light::before,
.ms-card--dark::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(96, 177, 255, .42), transparent);
  pointer-events: none;
}
.ms-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
  border: 1px solid rgba(7, 95, 216, .18);
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
  box-shadow: 0 10px 24px rgba(22, 119, 255, .20), inset 0 1px 0 rgba(255, 255, 255, .34);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.ms-btn:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 14px 28px rgba(22, 119, 255, .24); }
.ms-btn:active { transform: translateY(0); }
.ms-btn--ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, .82);
  border-color: var(--line-strong);
  box-shadow: 0 6px 18px rgba(15, 35, 61, .05), inset 0 1px 0 #fff;
}
.ms-btn--ghost:hover { background: #fff; border-color: rgba(22, 119, 255, .30); color: var(--accent-strong); }
.ms-btn--danger { background: var(--danger); border-color: var(--danger); }
.ms-selected { box-shadow: 0 0 0 2px var(--accent), 0 12px 26px rgba(22, 119, 255, .12) !important; }
.ms-icon-well {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--accent-strong);
  background: rgba(22, 119, 255, .08);
  border: 1px solid rgba(22, 119, 255, .10);
}
.ms-rail {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef5;
  box-shadow: inset 0 1px 2px rgba(15, 35, 61, .10);
}
.ms-rail__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #075fd8, #3c9cff);
  box-shadow: 0 0 12px rgba(22, 119, 255, .22);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow > span { width: 18px; height: 1px; background: currentColor; }

/* ---------- Authentication surfaces ---------- */
.dark-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(680px 420px at 10% 0%, rgba(96, 177, 255, .20), transparent 68%),
    radial-gradient(540px 360px at 96% 92%, rgba(22, 119, 255, .09), transparent 68%),
    linear-gradient(145deg, #fbfcfe 0%, #f4f7fb 100%);
}
.dark-shell::after {
  content: '';
  position: fixed;
  z-index: 0;
  right: -120px;
  top: -130px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(22, 119, 255, .10);
  border-radius: 44% 56% 62% 38%;
  transform: rotate(18deg);
  pointer-events: none;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 460px);
  align-items: center;
  gap: clamp(48px, 8vw, 130px);
  padding: clamp(32px, 7vw, 104px);
}
.login-wrap > * { position: relative; z-index: 1; }
.login-intro { max-width: 720px; }
.login-intro h1 {
  margin: 24px 0 22px;
  font-family: Outfit, Inter, "PingFang SC", sans-serif;
  font-size: clamp(48px, 6.2vw, 88px);
  line-height: 1.02;
  letter-spacing: -.045em;
  font-weight: 600;
}
.login-intro > p { max-width: 610px; color: var(--muted); font-size: 17px; line-height: 1.85; }
.login-proof { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.login-proof span {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .68);
  color: #526176;
  font-size: 12px;
  box-shadow: inset 0 1px 0 #fff;
}
.login-card { width: 100%; padding: 38px; box-shadow: var(--shadow-md), inset 0 1px 0 #fff; }
.login-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 36px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #0a1b33, #1677ff);
  box-shadow: 0 10px 24px rgba(22, 119, 255, .20), inset 0 1px 0 rgba(255,255,255,.28);
}
.login-card h2 { font-family: Outfit, Inter, sans-serif; font-size: 32px; letter-spacing: -.025em; }
.login-subtitle { margin: 8px 0 28px; color: var(--muted); font-size: 14px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 8px; color: #526176; font-size: 13px; font-weight: 600; }
.field label span { color: var(--faint); font-weight: 400; }
.field input,
.select,
.exp-opt input[type="text"] {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, .88);
  box-shadow: inset 0 1px 2px rgba(15, 35, 61, .04);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input::placeholder, .select::placeholder { color: #a2adba; }
.field input:focus, .select:focus {
  border-color: rgba(22, 119, 255, .66);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 119, 255, .10);
}
.login-card .ms-btn { width: 100%; margin-top: 4px; }
.login-foot { margin-top: 22px; text-align: center; color: var(--faint); font-size: 11px; }

/* ---------- Workspace frame ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); background: var(--bg); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 8;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  background: rgba(255, 255, 255, .88);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.sidebar-head { display: flex; align-items: center; gap: 11px; padding: 6px 8px 26px; }
.sidebar .logo { font-family: Outfit, Inter, sans-serif; font-size: 15px; font-weight: 600; letter-spacing: .04em; }
.sidebar-kicker { margin-top: 2px; color: var(--faint); font-size: 10px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #627086;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 550;
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}
.nav-item:hover { color: var(--ink); background: #f6f8fb; transform: translateX(2px); }
.nav-item.active { color: var(--ink); background: #fff; border-color: rgba(22, 119, 255, .16); box-shadow: 0 10px 26px rgba(15, 35, 61, .07); }
.nav-index { color: #a1acba; font-size: 10px; font-variant-numeric: tabular-nums; letter-spacing: .05em; }
.nav-item.active .nav-index { color: var(--accent); }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 14px 10px 4px; color: var(--faint); font-size: 11px; border-top: 1px solid var(--line); }
.status-dot, .user-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(31, 157, 104, .10); }
.main { min-width: 0; background: radial-gradient(600px 320px at 100% 0%, rgba(96, 177, 255, .09), transparent 70%), var(--bg); }
.main--dark { background: radial-gradient(600px 320px at 100% 0%, rgba(96, 177, 255, .09), transparent 70%), var(--bg); }
.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 28px;
  color: var(--ink);
  background: rgba(246, 248, 251, .78);
  border-bottom: 1px solid rgba(15, 35, 61, .06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.topbar-metrics { display: flex; align-items: stretch; gap: 8px; min-width: 0; }
.topbar .metric {
  min-width: 104px;
  padding: 9px 13px;
  border: 1px solid rgba(15, 35, 61, .07);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, .70);
  font-size: 10px;
  white-space: nowrap;
}
.topbar .metric b { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.72); color: var(--muted); font-size: 12px; }
.content { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; padding: 28px; }
.content--single { grid-template-columns: minmax(0, 1fr); }
.content--dark { min-height: calc(100vh - 82px); background: transparent; }
.center-area, .detail-panel { min-width: 0; }
.light-topbar { color: var(--ink); background: rgba(246, 248, 251, .78); }

/* ---------- Workflow / overview ---------- */
.dark-overview { grid-column: 1 / -1; padding: 0; }
.stage-focus { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.ms-focus-card {
  position: relative;
  min-height: 118px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, .72);
  box-shadow: inset 0 1px 0 #fff;
}
.ms-focus-card::after { content: ''; position: absolute; right: -30px; bottom: -45px; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, rgba(96,177,255,.18), transparent 70%); }
.ms-focus-card .stage-number { display: block; color: #a3adba; font-size: 10px; letter-spacing: .1em; }
.ms-focus-card .dot { display: block; width: 7px; height: 7px; margin: 15px 0 9px; border-radius: 50%; background: #cbd3dd; }
.ms-focus-card h3 { font-size: 13px; font-weight: 650; }
.ms-focus-card .hint { margin-top: 4px; color: var(--faint); font-size: 10px; }
.ms-focus-card.current { border-color: rgba(22, 119, 255, .34); background: #fff; box-shadow: 0 16px 36px rgba(15, 35, 61, .08), inset 0 2px 0 var(--accent); transform: translateY(-4px); }
.ms-focus-card.current .dot { background: var(--accent); box-shadow: 0 0 0 5px rgba(22, 119, 255, .10); }
.ms-focus-card.done .dot { background: var(--ok); }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; }
.ov-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.ov-group, .ov-progress, .ov-detail .ms-card--dark {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow-sm), inset 0 1px 0 #fff;
}
.ov-group b { display: block; color: var(--ink); font-family: Outfit, Inter, sans-serif; font-size: 28px; font-variant-numeric: tabular-nums; }
.ov-group span { color: var(--muted); font-size: 11px; }
.ov-progress .ms-rail { margin: 14px 0 8px; }
.ov-progress .p-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.ov-detail h3 { margin-bottom: 12px; color: var(--ink); font-size: 14px; }

/* ---------- New project ---------- */
.create-flow { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: clamp(36px, 6vw, 76px) 24px; }
.flow-header { max-width: 680px; margin-bottom: 36px; }
.flow-header h1 { margin: 14px 0 10px; font-family: Outfit, Inter, "PingFang SC", sans-serif; font-size: clamp(34px, 5vw, 56px); line-height: 1.08; letter-spacing: -.04em; }
.flow-header p { color: var(--muted); font-size: 14px; }
.create-card {
  position: relative;
  padding: clamp(26px, 4vw, 44px);
  color: var(--ink);
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(15, 35, 61, .09);
  border-radius: 30px;
  box-shadow: var(--shadow-md), inset 0 1px 0 #fff;
}
.create-card::before { content: ''; position: absolute; inset: 0 10% auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(96,177,255,.62), transparent); }
.create-card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; }
.create-card-head > div { display: flex; align-items: center; gap: 13px; }
.section-index { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: var(--ink); font-size: 11px; }
.create-card h2 { margin: 0; color: var(--ink); font-size: 20px; }
.template-pill { padding: 8px 12px; border: 1px solid rgba(22,119,255,.15); border-radius: 999px; color: var(--accent-strong); background: var(--accent-soft); font-size: 11px; font-weight: 600; }
.create-fields { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; }
.create-card .field input { color: var(--ink); background: #fbfcfe; border-color: var(--line-strong); box-shadow: none; }
.template-note { display: flex; align-items: center; gap: 14px; margin: 4px 0 28px; padding: 15px 16px; border-radius: 16px; background: #f6f9fd; border: 1px solid rgba(22,119,255,.08); }
.template-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 12px; color: #fff; background: linear-gradient(145deg, #0a1b33, #1677ff); }
.template-note b { font-size: 12px; }
.template-note p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.create-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 24px; border-top: 1px solid var(--line); }
.create-actions > span { color: var(--faint); font-size: 11px; }
.create-card .ms-btn { width: auto; min-width: 160px; margin: 0; }

/* ---------- Step bar ---------- */
.steps { display: flex; gap: 0; margin-bottom: 26px; }
.step { position: relative; flex: 1; min-width: 0; padding: 8px 4px; color: var(--faint); text-align: center; font-size: 10px; }
.step::before { content: ''; position: absolute; z-index: 0; top: 19px; left: -50%; right: 50%; height: 1px; background: #dbe2ea; }
.step:first-child::before { display: none; }
.step .n { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-bottom: 7px; border: 1px solid #d8e0e9; border-radius: 50%; color: #8491a2; background: #fff; font-size: 10px; font-weight: 700; box-shadow: 0 4px 10px rgba(15,35,61,.05); }
.step.done .n { color: #fff; border-color: var(--ok); background: var(--ok); }
.step.active { color: var(--ink); font-weight: 600; }
.step.active .n { color: #fff; border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px rgba(22,119,255,.10); }
.steps--create { padding: 8px 12px; border: 1px solid rgba(15,35,61,.07); border-radius: 18px; background: rgba(255,255,255,.65); backdrop-filter: blur(18px); }
.steps--create .step::before { background: #dbe2ea; }
.steps--create .step.active::after { content: '当前'; display: block; height: 12px; margin-top: 3px; color: var(--accent); font-size: 9px; line-height: 12px; }
.steps--create .step.active { padding-bottom: 14px; }
.steps--light .step { color: var(--faint); }
.steps--light .step.active { color: var(--ink); }
.steps--light .step.active .n { color: #fff; background: var(--accent); }
.steps--light .step.done .n { color: #fff; background: var(--ok); }

/* ---------- Operational pages ---------- */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}
.page-head > div:first-child { max-width: 720px; }
.page-kicker {
  margin-bottom: 9px;
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.page-head h1 {
  font-family: Outfit, Inter, "PingFang SC", sans-serif;
  font-size: clamp(30px, 3.5vw, 44px);
  line-height: 1.08;
  letter-spacing: -.035em;
  font-weight: 600;
}
.page-head p { margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.page-head__aside { flex: 0 0 auto; padding-top: 4px; }
.page-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(22,119,255,.14);
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
}
.surface {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.91);
  box-shadow: var(--shadow-sm), inset 0 1px 0 #fff;
}
.surface::before {
  content: '';
  position: absolute;
  inset: 0 8% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(96,177,255,.35), transparent);
}
.section-label { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 4px 0 14px; }
.section-label > span { color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.section-label > b { color: var(--faint); font-size: 10px; font-weight: 650; }
.surface-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.surface-actions > span { color: var(--faint); font-size: 10px; }
.support-card {
  position: sticky;
  top: 104px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow-sm), inset 0 1px 0 #fff;
}
.support-card::after { content: ''; position: absolute; right: -55px; bottom: -65px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(96,177,255,.17), transparent 68%); pointer-events: none; }
.support-card--accent { border-color: rgba(22,119,255,.14); background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(239,246,255,.84)); }
.support-card__icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 28px; border-radius: 14px; color: #fff; background: linear-gradient(145deg, var(--ink), var(--accent)); box-shadow: 0 12px 28px rgba(22,119,255,.18); }
.support-card h3 { margin: 0 0 10px; font-size: 18px; letter-spacing: -.02em; }
.support-card p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.support-list { display: grid; gap: 10px; margin-top: 20px; list-style: none; }
.support-list li { position: relative; padding-left: 17px; color: #536277; font-size: 11px; }
.support-list li::before { content: ''; position: absolute; left: 0; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(22,119,255,.08); }
.empty-state { grid-column: 1/-1; display: grid; justify-items: center; min-height: 190px; padding: 38px 24px; place-content: center; text-align: center; border: 1px dashed rgba(15,35,61,.14); border-radius: 18px; background: rgba(248,250,253,.72); }
.empty-state__mark { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 13px; border-radius: 12px; color: var(--accent); background: var(--accent-soft); }
.empty-state b { font-size: 13px; }
.empty-state p { max-width: 350px; margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.toolbar .ms-btn { min-height: 40px; padding: 8px 15px; font-size: 12px; }
.select { width: auto; min-height: 40px; padding: 8px 12px; background: #fff; }
.table-shell { overflow-x: auto; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.task-table { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.task-table th { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--faint); background: #f9fbfd; text-align: left; font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.task-table td { max-width: 280px; padding: 13px; overflow-wrap: anywhere; border-bottom: 1px solid rgba(15,35,61,.065); color: #334258; background: rgba(255,255,255,.76); font-size: 12px; }
.task-table tbody tr:last-child td { border-bottom: 0; }
.task-table tbody tr { cursor: pointer; }
.task-table tbody tr:hover td { background: #f7faff; }
.task-table tr.selected td { background: rgba(22,119,255,.07); box-shadow: inset 0 1px 0 rgba(22,119,255,.12), inset 0 -1px 0 rgba(22,119,255,.12); }
.task-table tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--accent), inset 0 1px 0 rgba(22,119,255,.12), inset 0 -1px 0 rgba(22,119,255,.12); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 650; }
.badge--ok { color: #14744b; background: rgba(31,157,104,.11); }
.badge--warn { color: #9b5c08; background: rgba(198,122,19,.12); }
.badge--danger { color: #b6333d; background: rgba(216,75,85,.11); }
.badge--neutral { color: #5e6b7b; background: rgba(15,35,61,.06); }
.switch { position: relative; width: 40px; height: 22px; border-radius: 999px; background: #d9e0e8; box-shadow: inset 0 1px 2px rgba(15,35,61,.14); transition: background .15s; }
.switch.on { background: var(--ok); }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(15,35,61,.22); transition: left .15s; }
.switch.on::after { left: 20px; }
.detail-panel .ms-card--light, .detail-panel .ms-card, .detail-panel .ms-card--dark { padding: 19px; }
.detail-panel h3 { margin-bottom: 12px; font-size: 14px; }
.detail-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid rgba(15,35,61,.07); font-size: 11px; }
.detail-row span { color: var(--muted); }
.detail-row b { color: var(--ink); font-weight: 600; }
.detail-actions { display: flex; gap: 8px; margin-top: 18px; }
.detail-actions .select { min-width: 0; flex: 1; }
.detail-actions .ms-btn { min-height: 40px; padding: 8px 12px; font-size: 11px; }
.task-surface .steps { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.task-toolbar { margin-bottom: 16px; }
.search-control { position: relative; flex: 1 1 250px; min-width: 220px; }
.search-control > span { position: absolute; left: 13px; top: 50%; z-index: 1; transform: translateY(-50%); color: var(--faint); font-size: 15px; }
.search-control .select { width: 100%; padding-left: 36px; }
.save-notice { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 11px 13px; border: 1px solid rgba(198,122,19,.16); border-radius: 13px; color: #955a0d; background: rgba(198,122,19,.07); font-size: 11px; }
.status-dot--warn { background: var(--warn); box-shadow: 0 0 0 4px rgba(198,122,19,.10); }
.member-entry { padding: 26px; }
.member-form { display: grid; grid-template-columns: 1fr 190px auto; gap: 12px; align-items: end; margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.compact-field { margin: 0; }
.compact-field .select { width: 100%; min-height: 46px; }
.member-list { display: grid; gap: 9px; }
.member-list-item { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 11px 13px; border: 1px solid rgba(15,35,61,.08); border-radius: 16px; background: #fff; transition: border-color .16s, transform .16s, box-shadow .16s; }
.member-list-item:hover { transform: translateY(-1px); border-color: rgba(22,119,255,.20); box-shadow: 0 10px 24px rgba(15,35,61,.06); }
.member-list-item__body { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.member-list-item__body b { font-size: 13px; }
.member-list-item__body span { color: var(--muted); font-size: 10px; }
.member-order { color: #a6b0bd; font-family: Outfit, Inter, sans-serif; font-size: 11px; }
.icon-action { min-height: 32px; padding: 6px 10px; border: 0; border-radius: 10px; color: #a4454c; background: rgba(216,75,85,.07); font-size: 10px; }
.icon-action:hover { background: rgba(216,75,85,.12); }
.share-surface { min-height: 420px; }
.share-toolbar { justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.share-toolbar > div:first-child { display: grid; gap: 3px; }
.share-toolbar > div:first-child b { font-size: 13px; }
.share-toolbar > div:first-child span { color: var(--muted); font-size: 10px; }
.toolbar-actions { display: flex; gap: 9px; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.share-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: inset 0 1px 0 #fff; }
.share-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.share-card h3 { font-size: 15px; }
.share-card > p { margin: 3px 0 13px; color: var(--muted); font-size: 10px; }
.link-well { min-height: 54px; padding: 10px 11px; border-radius: 11px; color: #536277; background: #f5f8fc; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; line-height: 1.55; word-break: break-all; }
.share-card .ms-btn { width: 100%; min-height: 38px; margin-top: 11px; font-size: 10px; }
.progress-hero { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 36px; align-items: center; margin-bottom: 24px; }
.progress-score { padding-right: 28px; border-right: 1px solid var(--line); }
.progress-score > span { color: var(--muted); font-size: 10px; }
.progress-score strong { display: block; margin: 4px 0 3px; font-family: Outfit, Inter, sans-serif; font-size: 56px; line-height: 1; letter-spacing: -.05em; }
.progress-score strong small { color: var(--accent); font-size: 20px; }
.progress-score p { color: var(--faint); font-size: 10px; }
.progress-track__labels { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--muted); font-size: 10px; }
.progress-track__labels b { color: var(--ink); }
.ms-rail--large { height: 10px; }
.progress-breakdown { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 13px; color: var(--muted); font-size: 10px; }
.legend-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #aab4c1; }
.legend-dot--ok { background: var(--ok); }
.legend-dot--warn { background: var(--warn); }
.pg-groups { display: grid; grid-template-columns: repeat(auto-fill,minmax(235px,1fr)); gap: 12px; margin-bottom: 24px; }
.pg-group { padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.9); box-shadow: inset 0 1px 0 #fff; }
.pg-group__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 11px; }
.pg-group__head b { font-size: 12px; }
.pg-group__head span { color: var(--muted); font-size: 10px; }
.pg-group__meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; color: var(--muted); font-size: 9px; }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.task-list-surface { padding: 20px; }
.export-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,.72fr); gap: 16px; }
.export-config, .export-result { min-height: 390px; }
.exp-options { display: grid; gap: 11px; }
.exp-opt { position: relative; display: grid; grid-template-columns: auto 38px minmax(0,1fr); gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: #fbfcfe; cursor: pointer; }
.exp-opt:has(input:checked) { border-color: rgba(22,119,255,.28); background: rgba(22,119,255,.045); box-shadow: inset 3px 0 0 var(--accent); }
.exp-opt input { width: 15px; height: 15px; }
.exp-opt__mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: var(--accent); background: var(--accent-soft); }
.exp-opt > span:last-child { display: grid; gap: 3px; }
.exp-opt b { font-size: 12px; }
.exp-opt small { color: var(--muted); font-size: 9px; }
.snapshot-field { display: grid; gap: 7px; padding: 6px 2px 0; }
.snapshot-field label { color: var(--muted); font-size: 10px; }
.snapshot-field .select { width: 100%; }
.export-trigger { width: 100%; margin-top: 18px; }
.export-result { display: flex; flex-direction: column; justify-content: center; }
.export-result .empty-state { border: 0; background: transparent; }
.result-ready { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.result-ready__mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: #fff; background: var(--ok); box-shadow: 0 10px 22px rgba(31,157,104,.17); }
.result-ready b { font-size: 13px; }
.result-ready p { margin-top: 3px; color: var(--muted); font-size: 9px; }
.result-download { width: 100%; margin-top: 18px; }
.fine-print { margin-top: 10px; color: var(--faint); font-size: 9px; line-height: 1.6; text-align: center; }
.pg-overview, .pg-group { background: rgba(255,255,255,.9); }
.pg-overview__meta b, .pg-group__meta b { font-variant-numeric: tabular-nums; }
.exp-opt input[type="radio"] { accent-color: var(--accent); }
.activation-notes { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; max-width: 610px; margin-top: 30px; }
.activation-notes div { padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.70); }
.activation-notes b { display: block; color: var(--accent); font-family: Outfit, Inter, sans-serif; font-size: 11px; }
.activation-notes span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }

/* ---------- Feedback / accessibility ---------- */
.toast { position: fixed; z-index: 99; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 11px 17px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; color: #fff; background: rgba(7,20,38,.94); box-shadow: 0 16px 40px rgba(7,20,38,.22); font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, -4px); }
.toast--err { background: rgba(184,47,59,.96); }
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.ms-btn:focus-visible, .icon-action:focus-visible, .field input:focus-visible, .select:focus-visible, .nav-item:focus-visible { outline: 3px solid rgba(22,119,255,.30); outline-offset: 2px; }
/* visual-r2：所有可交互控件统一可见焦点（含 switch / 单选 / 链接式按钮 / 结果下载） */
.switch:focus-visible,
button:focus-visible,
input[type="radio"]:focus-visible,
input[type="checkbox"]:focus-visible,
input[type="email"]:focus-visible,
input[type="password"]:focus-visible,
input[type="text"]:focus-visible,
textarea:focus-visible,
a:focus-visible,
.result-download:focus-visible,
.create-card button:focus-visible {
  outline: 3px solid rgba(22,119,255,.30);
  outline-offset: 2px;
}
.switch:focus-visible { outline-offset: 3px; border-radius: 999px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .stage-focus { grid-template-columns: repeat(3, 1fr); }
  .content { grid-template-columns: minmax(0, 1fr) 280px; padding: 22px; }
  .topbar .metric { min-width: 90px; }
  .export-grid { grid-template-columns: 1fr; }
  .export-config, .export-result { min-height: 0; }
}
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; gap: 34px; }
  .login-intro { max-width: 620px; }
  .login-intro h1 { font-size: clamp(44px, 11vw, 70px); }
  .login-card { max-width: 520px; }
  .shell { display: block; }
  .sidebar { position: sticky; height: auto; padding: 12px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-head { padding: 2px 4px 10px; }
  .sidebar-nav { flex-direction: row; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .nav-item { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .nav-item:hover { transform: none; }
  .sidebar-footer { display: none; }
  .content { grid-template-columns: 1fr; }
  .ov-grid { grid-template-columns: 1fr; }
  .detail-panel { grid-column: 1; }
  .support-card { position: static; }
  .progress-hero { grid-template-columns: 150px minmax(0,1fr); gap: 24px; }
}
@media (max-width: 680px) {
  .login-wrap { padding: 30px 18px; }
  .login-intro h1 { font-size: 44px; }
  .login-intro > p { font-size: 14px; }
  .login-proof { display: none; }
  .login-card { padding: 28px 22px; border-radius: 24px; }
  .topbar { align-items: flex-start; padding: 12px 16px; }
  .topbar-metrics { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .topbar-metrics { scrollbar-width: none; }
  .topbar-metrics::-webkit-scrollbar { display: none; }
  .topbar .metric { flex: 0 0 auto; }
  .user-chip { display: none; }
  .content { padding: 18px 14px 28px; }
  .page-head { align-items: flex-start; margin-bottom: 20px; }
  .page-head h1 { font-size: 31px; }
  .page-head__aside .page-chip { display: none; }
  .surface { padding: 18px; border-radius: 20px; }
  .surface-actions { align-items: stretch; flex-direction: column; }
  .surface-actions > span { order: 2; text-align: center; }
  .surface-actions .ms-btn { width: 100%; }
  .stage-focus { grid-template-columns: repeat(2, 1fr); }
  .ov-groups { grid-template-columns: repeat(2, 1fr); }
  .create-flow { padding: 34px 14px; }
  .flow-header h1 { font-size: 38px; }
  .steps--create { overflow-x: auto; justify-content: flex-start; }
  .steps--create { scrollbar-width: none; }
  .steps--create::-webkit-scrollbar { display: none; }
  .steps--create .step { flex: 0 0 86px; }
  .create-card { padding: 24px 18px; border-radius: 24px; }
  .create-card-head { align-items: flex-start; }
  .create-card-head > div { align-items: flex-start; }
  .template-pill { display: none; }
  .create-fields { grid-template-columns: 1fr; gap: 0; }
  .create-actions { align-items: stretch; flex-direction: column; }
  .create-card .ms-btn { width: 100%; }
  .toolbar { flex-wrap: wrap; }
  .toolbar .select, .toolbar input.select { flex: 1 1 100% !important; min-width: 0 !important; }
  .member-form { grid-template-columns: 1fr; }
  .member-form .ms-btn { width: 100%; }
  .member-order { display: none; }
  .share-toolbar { align-items: stretch; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions .ms-btn { flex: 1; }
  .progress-hero { grid-template-columns: 1fr; gap: 20px; }
  .progress-score { padding: 0 0 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .progress-score strong { font-size: 46px; }
  .progress-breakdown { gap: 10px; }
  .task-surface { padding: 14px; }
  .task-surface .steps { overflow-x: auto; }
  .task-surface .steps { scrollbar-width: none; }
  .task-surface .steps::-webkit-scrollbar { display: none; }
  .task-surface .step { flex: 0 0 82px; }
  .search-control { flex-basis: 100%; min-width: 0; }
  .task-toolbar .spacer { display: none; }
  .task-toolbar .ms-btn { flex: 1; }
  .export-config, .export-result { padding: 18px; }
  .activation-notes { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .sidebar .brand-mark { width: 30px; height: 30px; flex-basis: 30px; border-radius: 10px; }
  .nav-index { display: none; }
  .nav-item { padding: 9px 11px; font-size: 12px; }
  .stage-focus { gap: 8px; }
  .ms-focus-card { min-height: 108px; padding: 13px; }
  .ov-groups { grid-template-columns: 1fr; }
  .template-note { align-items: flex-start; }
  .page-head__aside { display: none; }
  .member-list-item { gap: 10px; }
  .member-list-item .ms-icon-well { width: 34px; height: 34px; flex: 0 0 34px; }
  .toolbar-actions { flex-direction: column-reverse; }
  .share-grid { grid-template-columns: 1fr; }
  .pg-groups { grid-template-columns: 1fr; }
  .progress-breakdown { display: grid; grid-template-columns: 1fr 1fr; }
  .exp-opt { grid-template-columns: auto 34px minmax(0,1fr); padding: 12px; }
}
/* ---- 390px 窄屏防页面级横向溢出（visual-r2 加性，不掩盖、真适应） ----
   原则：溢出只允许发生在容器内部滚动（.table-shell / .sidebar-nav / .topbar-metrics），
   不得撑开 .shell/.main/.login-wrap 导致 documentElement 横向滚动。 */
@media (max-width: 420px) {
  .main, .topbar { min-width: 0; }
  .topbar { flex-wrap: wrap; }
  .topbar-metrics { flex: 1 1 100%; max-width: 100%; min-width: 0; }
  .topbar .metric { min-width: 0; flex: 0 0 auto; }
  .topbar .metric b { max-width: 40vw; }
  .spacer { display: none; }
  .sidebar { max-width: 100%; overflow: hidden; }
  .sidebar-head { min-width: 0; }
  .shell, .content, .center-area, .detail-panel, .main { min-width: 0; max-width: 100%; }
  .content { padding-left: 12px; padding-right: 12px; }
  .surface { padding: 16px; }
  .dark-shell { overflow-x: hidden; }
  .login-wrap { padding-left: 14px; padding-right: 14px; }
  .login-card { padding: 24px 16px; }
  .create-flow { padding-left: 12px; padding-right: 12px; }
  .create-card { padding: 20px 14px; }
  .toolbar { min-width: 0; }
  .toolbar .select, .toolbar input.select { min-width: 0 !important; }
  .search-control { min-width: 0 !important; flex-basis: 100%; }
  .table-shell { max-width: 100%; }
  .page-head { min-width: 0; }
  .page-head h1 { font-size: 26px; overflow-wrap: anywhere; }
  .detail-panel, .support-card { min-width: 0; max-width: 100%; }
  .progress-hero, .progress-track, .progress-score { min-width: 0; max-width: 100%; }
  .export-grid { min-width: 0; }
  .export-config, .export-result { min-width: 0; }
  .ov-grid, .ov-left, .ov-detail, .ov-groups, .ov-progress { min-width: 0; max-width: 100%; }
  .stage-focus { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ms-focus-card { min-width: 0; }
  .member-entry, .member-form, .member-list, .member-list-item { min-width: 0; max-width: 100%; }
  .share-surface, .share-toolbar, .share-grid, .share-card, .link-well { min-width: 0; max-width: 100%; }
  .task-surface, .task-toolbar { min-width: 0; max-width: 100%; }
  .link-well { word-break: break-all; }
  /* 装饰性角标圆在窄屏收敛到卡片内，避免超出视口被计入 documentElement.scrollWidth */
  .support-card::after { display: none; }
  .ms-focus-card::after { display: none; }
  .dark-shell::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
/* ---- visual-r2：认证页与工作台统一 Digital Epoch 明亮体系（加性，不改变类名契约）----
   login/bootstrap 与工作台共享暖白画布、白卡、靛蓝点缀；无深青绿整屏底。 */
.dark-shell { background: linear-gradient(145deg, #ffffff 0%, #f6f8fb 100%); }
.login-card, .ms-card { background: #ffffff; }
