:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --bg-soft: #eef3f8;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-solid: #ffffff;
  --ink: #151b23;
  --muted: #647084;
  --muted-2: #8a94a6;
  --line: #d8dee8;
  --line-soft: #e9edf3;
  --brand: #2563eb;
  --brand-2: #0f766e;
  --brand-soft: #e8f0ff;
  --ok: #067647;
  --ok-soft: #e7f7ef;
  --warn: #a15c00;
  --warn-soft: #fff4dc;
  --bad: #b42318;
  --bad-soft: #fee7e5;
  --violet: #6d28d9;
  --violet-soft: #f0eafd;
  --shadow: 0 14px 36px rgba(21, 27, 35, 0.08);
  --shadow-soft: 0 8px 22px rgba(21, 27, 35, 0.06);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 42%, #f2f5f7 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

::selection {
  background: rgba(37, 99, 235, 0.16);
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 0.95fr) minmax(360px, 520px);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 6vw, 78px);
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 216, 116, 0.42), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(255, 77, 109, 0.24), transparent 26%),
    linear-gradient(135deg, #fff7ed 0%, #fff1f2 44%, #fefce8 100%);
}

.login-page::before,
.login-page::after {
  content: "囍";
  position: fixed;
  z-index: 0;
  color: rgba(190, 18, 60, 0.055);
  font-family: Georgia, "Songti SC", serif;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.login-page::before {
  left: -42px;
  top: 38px;
  font-size: clamp(120px, 18vw, 260px);
  transform: rotate(-10deg);
}

.login-page::after {
  right: -26px;
  bottom: -28px;
  font-size: clamp(140px, 20vw, 300px);
  transform: rotate(9deg);
}

.login-brand-panel {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.login-emblem {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 24px;
  background:
    linear-gradient(145deg, #dc2626 0%, #f43f5e 55%, #f59e0b 100%);
  color: #fff8e7;
  font-size: 42px;
  font-family: Georgia, "Songti SC", serif;
  box-shadow: 0 18px 38px rgba(220, 38, 38, 0.28);
}

.login-eyebrow {
  width: fit-content;
  margin: 0 0 14px;
  padding: 6px 12px;
  border: 1px solid rgba(220, 38, 38, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #be123c;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.login-brand-panel h1 {
  margin: 0;
  max-width: 560px;
  color: #7f1d1d;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.05;
  font-weight: 900;
}

.login-brand-panel > p:not(.login-eyebrow) {
  max-width: 540px;
  margin: 20px 0 0;
  color: #7c2d12;
  font-size: 18px;
  line-height: 1.75;
}

.login-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.login-metrics span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 13px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(251, 113, 133, 0.18);
  color: #9f1239;
  font-weight: 750;
  box-shadow: var(--shadow-soft);
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  justify-self: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 228, 230, 0.96);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 24px 70px rgba(127, 29, 29, 0.14);
  backdrop-filter: blur(18px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, #dc2626, #f59e0b, #f43f5e);
}

.login-card-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.brand-seal {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #b91c1c;
  color: #fff7ed;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(185, 28, 28, 0.24);
}

.login-card h1 {
  margin: 0;
  color: #7f1d1d;
  font-size: 28px;
  line-height: 1.12;
}

.login-card p {
  margin: 5px 0 0;
  color: #9f1239;
  line-height: 1.45;
  font-weight: 700;
}

.login-card .btn.primary {
  border-color: #dc2626;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 58%, #b91c1c 100%);
}

.login-card .btn.primary:hover {
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.28);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background:
    linear-gradient(180deg, #101927 0%, #152033 60%, #111827 100%);
  color: #edf4ff;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.06) inset;
}

.brand {
  display: grid;
  gap: 7px;
  padding: 4px 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand strong {
  font-size: 18px;
  line-height: 1.25;
}

.brand span,
.user-box {
  color: #aebbd0;
  font-size: 13px;
  line-height: 1.5;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav button {
  position: relative;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #d9e4f5;
  text-align: left;
  padding: 0 12px 0 14px;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav button.active {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(147, 197, 253, 0.26);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: #60a5fa;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-box {
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 4px 2px;
}

.topbar h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.global-search {
  position: relative;
  flex: 1 1 430px;
  max-width: 560px;
}

.global-search-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.global-search-form input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 9px 12px;
  outline: none;
  box-shadow: var(--shadow-soft);
}

.global-search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(21, 27, 35, 0.16);
}

.global-search-item {
  width: 100%;
  display: grid;
  gap: 4px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  padding: 11px 12px;
  color: var(--ink);
  text-align: left;
}

.global-search-item:last-child {
  border-bottom: 0;
}

.global-search-item:hover {
  background: #f8fbff;
}

.global-search-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.grid.two {
  grid-template-columns: minmax(380px, 1fr) minmax(380px, 0.86fr);
}

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

.panel,
.card,
.stat {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 18px;
  backdrop-filter: blur(12px);
}

.panel h2,
.panel h3 {
  margin: 0 0 13px;
  font-size: 17px;
  line-height: 1.35;
}

.panel-head-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 13px;
}

.panel-head-row h2 {
  margin: 0;
}

.ai-fill-box {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(220, 38, 38, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 247, 237, 0.86), rgba(255, 255, 255, 0.9));
  box-shadow: var(--shadow-soft);
}

.ai-fill-box h3 {
  margin: 0;
  color: #9f1239;
}

.ai-insight-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.72), rgba(255, 255, 255, 0.96));
  box-shadow: var(--shadow-soft);
}

.ai-insight-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.ai-insight-head h3 {
  margin: 0;
  color: #0f766e;
}

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

.ai-insight-grid section {
  min-width: 0;
  display: grid;
  gap: 7px;
  align-content: start;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.ai-insight-grid h4,
.ai-insight-grid p,
.ai-insight-grid ul {
  margin: 0;
}

.ai-insight-grid h4 {
  font-size: 13px;
  color: var(--ink);
}

.ai-insight-grid p,
.ai-insight-grid li {
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.ai-insight-grid ul {
  display: grid;
  gap: 5px;
  padding-left: 17px;
}

.preference-advice-box {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(232, 240, 255, 0.72), rgba(255, 255, 255, 0.96));
  box-shadow: var(--shadow-soft);
}

.preference-advice-box.high {
  border-color: rgba(180, 35, 24, 0.2);
  background: linear-gradient(180deg, rgba(254, 231, 229, 0.62), rgba(255, 255, 255, 0.96));
}

.preference-advice-box.medium {
  border-color: rgba(161, 92, 0, 0.22);
  background: linear-gradient(180deg, rgba(255, 244, 220, 0.7), rgba(255, 255, 255, 0.96));
}

.preference-advice-box.muted {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.72);
}

.preference-advice-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.preference-advice-head h3 {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}

.advice-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.advice-metrics span {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 12px;
}

.advice-metrics strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.advice-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.ai-advice-script {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: var(--radius);
  background: rgba(236, 253, 245, 0.68);
}

.ai-advice-script h4,
.ai-advice-script p {
  margin: 0;
}

.ai-advice-script h4 {
  font-size: 13px;
}

.ai-advice-script p {
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

.dimension-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0;
}

.dimension-card {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.dimension-card.ok {
  border-color: rgba(6, 118, 71, 0.16);
  background: rgba(231, 247, 239, 0.52);
}

.dimension-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.dimension-card-head strong {
  font-size: 13px;
}

.dimension-card p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.5;
}

.completion-card {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(232, 240, 255, 0.68), rgba(255, 255, 255, 0.96));
  box-shadow: var(--shadow-soft);
}

.completion-card.compact {
  margin: 14px 0;
}

.completion-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.completion-head h3 {
  margin: 0 0 4px;
}

.completion-score {
  min-width: 76px;
  display: grid;
  place-items: center;
  padding: 9px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: #ffffff;
}

.completion-score strong {
  font-size: 22px;
  line-height: 1;
}

.completion-score span {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
}

.completion-score.ok {
  color: var(--ok);
  background: var(--ok-soft);
}

.completion-score.warn {
  color: var(--warn);
  background: var(--warn-soft);
}

.completion-score.bad {
  color: var(--bad);
  background: var(--bad-soft);
}

.completion-bar,
.completion-mini-bar {
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf5;
}

.completion-bar {
  height: 9px;
}

.completion-mini-bar {
  width: 92px;
  height: 6px;
}

.completion-bar span,
.completion-mini-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.completion-sections {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.completion-section {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.completion-section div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.completion-section small {
  color: var(--muted);
  line-height: 1.45;
}

.completion-inline {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 5px;
}

.completion-inline small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.member-name-cell {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.todo-list,
.handoff-list {
  display: grid;
  gap: 10px;
}

.todo-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.compact-card {
  padding: 12px;
}

.handoff-list-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 9px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  padding: 12px;
  color: var(--ink);
  text-align: left;
}

.handoff-list-item:hover,
.handoff-list-item.active {
  border-color: rgba(37, 99, 235, 0.32);
  background: var(--brand-soft);
}

.handoff-list-item strong {
  min-width: 0;
}

.handoff-list-item small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.4;
}

.handoff-card {
  display: grid;
  gap: 12px;
}

.handoff-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.handoff-title h2 {
  margin: 0;
}

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

.startup-checklist {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #ffffff;
}

.startup-checklist h3 {
  margin-bottom: 3px;
}

.startup-check {
  display: grid;
  grid-template-columns: 68px minmax(0, 0.75fr) minmax(0, 1.2fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: var(--radius);
  background: #f8fafc;
}

.startup-check span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.startup-check.ok span {
  background: var(--ok-soft);
  color: var(--ok);
}

.startup-check.warn span {
  background: var(--warn-soft);
  color: var(--warn);
}

.startup-check small {
  color: var(--muted);
  line-height: 1.4;
}

.funnel-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.funnel-step {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #ffffff;
}

.funnel-step span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.funnel-step strong {
  display: block;
  margin-top: 7px;
  font-size: 25px;
  line-height: 1;
}

.funnel-step.paid,
.funnel-step.converted {
  background: var(--ok-soft);
  border-color: rgba(6, 118, 71, 0.14);
}

.funnel-step.lost {
  background: var(--bad-soft);
  border-color: rgba(180, 35, 24, 0.14);
}

.dashboard-kpi-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.dashboard-kpi-line span,
.source-item,
.renewal-item,
.change-log-item {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #f8fafc;
}

.dashboard-kpi-line span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-kpi-line strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
}

.source-list,
.renewal-list,
.change-log-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.source-item,
.renewal-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.source-item small,
.change-log-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.workload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.workload-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #ffffff;
}

.workload-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.workload-metrics span {
  padding: 9px;
  border-radius: var(--radius);
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.workload-metrics strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 20px;
}

.change-log-box {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #ffffff;
}

.change-log-item {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(0, 1.4fr);
  gap: 10px;
  align-items: start;
}

.change-log-item p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin: 0;
  color: #344054;
  line-height: 1.45;
}

.change-log-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.change-log-item b {
  color: var(--muted-2);
}

.review-dimension-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.review-dimension-list div {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #f8fafc;
}

.review-dimension-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.review-dimension-list p {
  margin: 4px 0 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
}

.stat {
  position: relative;
  overflow: hidden;
  padding: 16px;
  min-height: 92px;
}

.stat::after {
  content: "";
  position: absolute;
  inset: auto 14px 12px auto;
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  opacity: 0.55;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.toolbar,
.form-row,
.inline-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar {
  margin-bottom: 12px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea,
.toolbar input,
.toolbar select,
.review-row input,
.review-row select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  padding: 9px 11px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.toolbar input {
  width: min(260px, 100%);
}

.field textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.55;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.toolbar input:focus,
.toolbar select:focus,
.review-row input:focus,
.review-row select:focus {
  border-color: rgba(37, 99, 235, 0.62);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
  background: #ffffff;
}

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

.form-grid .wide {
  grid-column: span 3;
}

.form-section-title {
  width: fit-content;
  margin: 2px 0 -2px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.settings-card {
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), #ffffff);
  padding: 13px;
}

.settings-card strong {
  font-size: 14px;
}

.settings-check-grid,
.settings-list {
  display: grid;
  gap: 10px;
}

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

.settings-check {
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.settings-check input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--brand);
}

.settings-status {
  min-height: 40px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  font-weight: 800;
  line-height: 1.35;
}

.settings-status.ok {
  border-color: rgba(6, 118, 71, 0.2);
  background: var(--ok-soft);
  color: var(--ok);
}

.settings-status.warn {
  border-color: rgba(161, 92, 0, 0.22);
  background: var(--warn-soft);
  color: var(--warn);
}

.btn {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 9px 13px;
  font-weight: 600;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: #c7d0df;
  box-shadow: 0 8px 18px rgba(21, 27, 35, 0.08);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn.primary {
  border-color: var(--brand);
  background: linear-gradient(180deg, #2f70f4 0%, var(--brand) 100%);
  color: #ffffff;
}

.btn.primary:hover {
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
}

.btn.danger {
  border-color: #f2b8b5;
  background: var(--bad-soft);
  color: var(--bad);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #eef5ff;
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.text-link {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  font-weight: 850;
}

.text-link:hover {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.member-title-button {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
}

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.page-indicator {
  min-width: 66px;
  text-align: center;
  color: var(--ink);
  font-weight: 750;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  font-size: 14px;
}

.member-table {
  min-width: 900px;
  table-layout: fixed;
}

.resource-table {
  min-width: 1450px;
  table-layout: fixed;
}

.resource-table th:nth-child(1),
.resource-table td:nth-child(1) {
  width: 13%;
}

.resource-table th:nth-child(2),
.resource-table td:nth-child(2),
.resource-table th:nth-child(3),
.resource-table td:nth-child(3),
.resource-table th:nth-child(4),
.resource-table td:nth-child(4) {
  width: 5%;
}

.resource-table th:nth-child(5),
.resource-table td:nth-child(5),
.resource-table th:nth-child(7),
.resource-table td:nth-child(7),
.resource-table th:nth-child(10),
.resource-table td:nth-child(10),
.resource-table th:nth-child(11),
.resource-table td:nth-child(11) {
  width: 12%;
}

.resource-table th:nth-child(6),
.resource-table td:nth-child(6),
.resource-table th:nth-child(8),
.resource-table td:nth-child(8),
.resource-table th:nth-child(9),
.resource-table td:nth-child(9),
.resource-table th:nth-child(12),
.resource-table td:nth-child(12),
.resource-table th:nth-child(13),
.resource-table td:nth-child(13) {
  width: 7%;
}

.resource-table th:nth-child(14),
.resource-table td:nth-child(14) {
  width: 10%;
}

.resource-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-table td[data-label="择偶要求"],
.resource-table td[data-label="红线"],
.resource-table td[data-label="操作"] {
  white-space: normal;
  overflow-wrap: anywhere;
}

.member-table th:nth-child(1),
.member-table td:nth-child(1) {
  width: 21%;
}

.member-table th:nth-child(2),
.member-table td:nth-child(2),
.member-table th:nth-child(3),
.member-table td:nth-child(3) {
  width: 6%;
}

.member-table th:nth-child(4),
.member-table td:nth-child(4),
.member-table th:nth-child(5),
.member-table td:nth-child(5) {
  width: 9%;
}

.member-table th:nth-child(6),
.member-table td:nth-child(6) {
  width: 7%;
}

.member-table th:nth-child(7),
.member-table td:nth-child(7) {
  width: 13%;
}

.member-table th:nth-child(8),
.member-table td:nth-child(8) {
  width: 9%;
}

.member-table th:nth-child(9),
.member-table td:nth-child(9) {
  width: 21%;
}

th,
td {
  padding: 12px 11px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  white-space: nowrap;
}

.member-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-table td[data-label="操作"] {
  white-space: normal;
}

.member-table td[data-label="操作"] .btn {
  min-height: 36px;
  margin: 3px 4px 3px 0;
  padding: 7px 10px;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  font-weight: 700;
  background: #f8fafc;
  box-shadow: 0 1px 0 var(--line-soft);
}

tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: #f8fbff;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 650;
  background: #eef2f7;
  color: #344054;
}

.pill.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.pill.bad {
  background: var(--bad-soft);
  color: var(--bad);
}

.pill.brand {
  background: var(--brand-soft);
  color: var(--brand);
}

.match-header {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 14px;
}

.member-picker {
  display: grid;
  gap: 10px;
}

.picker-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.picker-item {
  min-height: 56px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 9px 11px;
  text-align: left;
  display: grid;
  gap: 3px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.picker-item:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
}

.picker-item.active {
  border-color: rgba(37, 99, 235, 0.52);
  background: var(--brand-soft);
}

.picker-item strong {
  font-size: 14px;
}

.picker-item span,
.picker-empty {
  color: var(--muted);
  font-size: 12px;
}

.picker-empty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
}

.pool-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 11px;
  margin: 14px 0;
}

.pool-tab {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 14px;
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.pool-tab:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
}

.pool-tab.active {
  border-color: rgba(37, 99, 235, 0.42);
  background: linear-gradient(180deg, #ffffff 0%, var(--brand-soft) 100%);
}

.pool-tab.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.pool-tab span {
  color: var(--muted);
  font-size: 12px;
}

.pool-tab strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
}

.match-profile-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.match-profile-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.match-profile-head h3,
.match-profile-head p,
.info-section h4,
.compare-section h4 {
  margin: 0;
}

.match-profile-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.match-profile-grid,
.match-brief-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

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

.info-section {
  min-width: 0;
  display: grid;
  gap: 9px;
  align-content: start;
}

.info-section h4,
.compare-section h4 {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.info-section dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.info-section dl > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.info-section dt {
  color: var(--muted-2);
  font-size: 12px;
}

.info-section dd {
  min-width: 0;
  margin: 0;
  color: #253044;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.candidate-list {
  display: grid;
  gap: 12px;
}

.candidate-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 15px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow-soft);
}

.candidate-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.candidate-title {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.candidate-title strong {
  font-size: 17px;
}

.report-controls {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.report-controls h2,
.report-controls p,
.report-poster h3,
.report-poster h4,
.report-poster p,
.report-poster ul,
.service-report-table h3 {
  margin: 0;
}

.compact-field {
  min-width: 170px;
}

.monthly-report-print {
  display: grid;
  gap: 14px;
}

.report-poster {
  overflow: hidden;
  display: grid;
  gap: 16px;
  border: 1px solid rgba(220, 38, 38, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, #fff7ed 0%, #fff1f2 48%, #f8fafc 100%);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.report-poster-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.report-poster-head h3 {
  margin-top: 10px;
  color: #7f1d1d;
  font-size: 24px;
  line-height: 1.2;
}

.report-poster-head p {
  margin-top: 6px;
  color: #7c2d12;
  font-weight: 700;
}

.report-seal {
  min-width: 92px;
  border-radius: var(--radius);
  background: #b91c1c;
  color: #fff7ed;
  padding: 10px 12px;
  text-align: center;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(185, 28, 28, 0.18);
}

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

.report-metric {
  min-width: 0;
  border: 1px solid rgba(251, 113, 133, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.report-metric span {
  display: block;
  color: #9f1239;
  font-size: 12px;
  font-weight: 800;
}

.report-metric strong {
  display: block;
  margin-top: 6px;
  color: #111827;
  font-size: 26px;
  line-height: 1;
}

.report-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-copy-grid section {
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  padding: 13px;
}

.report-copy-grid h4 {
  color: #111827;
  font-size: 14px;
}

.report-copy-grid ul {
  display: grid;
  gap: 7px;
  padding-left: 18px;
  margin-top: 9px;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.service-tabs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.service-tabs button {
  flex: 1 1 0;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.service-tabs button:hover {
  background: #f8fbff;
  color: var(--ink);
}

.service-tabs button.active {
  border-color: rgba(37, 99, 235, 0.24);
  background: var(--brand-soft);
  color: var(--brand);
}

.service-timeline {
  position: relative;
  display: grid;
  gap: 12px;
  padding-left: 15px;
}

.service-timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 999px;
  background: #dbe4ef;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  margin-top: 6px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.timeline-item > div:last-child {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

.timeline-head time {
  color: var(--muted);
  font-size: 12px;
}

.timeline-item strong,
.timeline-item p {
  margin: 0;
}

.timeline-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-option {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  padding: 6px 10px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.tag-option input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

.tag-option:has(input:checked) {
  border-color: rgba(37, 99, 235, 0.28);
  background: var(--brand-soft);
  color: var(--brand);
}

.service-report-table {
  display: grid;
  gap: 10px;
}

.service-report-table h3 {
  font-size: 16px;
}

.match-insight {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.appearance-brief,
.appearance-summary {
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(232, 240, 255, 0.5), rgba(255, 255, 255, 0.88));
  padding: 11px;
}

.appearance-brief img,
.appearance-summary img {
  width: 72px;
  height: 90px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--line-soft);
  background: #eef2f7;
}

.appearance-brief strong,
.appearance-summary strong {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
}

.appearance-summary {
  margin: 12px 0;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.photo-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #eef2f7;
}

.photo-card > div {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.photo-card strong,
.photo-card p {
  margin: 0;
}

.photo-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.insight-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.insight-title strong {
  font-size: 14px;
}

.insight-title span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.match-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compare-section {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.compare-table {
  display: grid;
  gap: 6px;
}

.compare-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) minmax(0, 1fr) 58px;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 6px;
  font-size: 12px;
}

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

.compare-label {
  color: var(--muted);
  font-weight: 700;
}

.compare-need,
.compare-actual {
  min-width: 0;
  color: #344054;
  overflow-wrap: anywhere;
}

.compare-actual {
  color: #111827;
}

.compare-state {
  justify-self: end;
  min-width: 48px;
  border-radius: 999px;
  padding: 3px 7px;
  text-align: center;
  font-weight: 800;
}

.compare-state.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.compare-state.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.compare-state.bad {
  background: var(--bad-soft);
  color: var(--bad);
}

.compare-state.neutral {
  background: #eef2f7;
  color: #475467;
}

.compare-empty {
  color: var(--muted);
  font-size: 12px;
}

.score {
  min-width: 66px;
  text-align: center;
  padding: 9px;
  border-radius: var(--radius);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.reason-list,
.risk-list,
.bottleneck-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.risk-list .pill {
  background: var(--warn-soft);
  color: var(--warn);
}

.review-row {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 9px;
  align-items: center;
}

.workflow-status {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.workflow-status strong {
  flex: 0 0 auto;
  color: var(--ink);
}

.workflow-status.locked {
  border-color: rgba(34, 197, 94, 0.28);
  background: var(--ok-soft);
  color: #176442;
}

.workflow-status.locked strong {
  color: var(--ok);
}

.workflow-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.workflow-row .btn {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(2px);
}

.member-drawer {
  position: fixed;
  z-index: 81;
  top: 0;
  right: 0;
  width: min(520px, calc(100vw - 24px));
  height: 100vh;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  border-left: 1px solid var(--line-soft);
  background: #ffffff;
  padding: 20px;
  box-shadow: -22px 0 60px rgba(15, 23, 42, 0.18);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.drawer-head h2,
.drawer-head p,
.drawer-section h3,
.drawer-section p {
  margin: 0;
}

.drawer-head h2 {
  margin-top: 8px;
  font-size: 25px;
  line-height: 1.2;
}

.drawer-head p {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.5;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-section {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.drawer-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.drawer-facts div {
  min-width: 0;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 10px;
}

.drawer-facts span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.drawer-facts strong {
  min-width: 0;
  color: #111827;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.empty {
  padding: 34px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.notice {
  min-height: 26px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.notice.error {
  color: var(--bad);
}

.notice.ok {
  color: var(--ok);
}

.section-divider {
  margin: 15px 0;
  border: 0;
  border-top: 1px solid var(--line-soft);
}

@media (max-width: 1100px) {
  .login-page {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .login-brand-panel {
    max-width: 720px;
    text-align: left;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    height: auto;
  }

  .brand {
    padding-bottom: 10px;
  }

  .nav {
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  }

  .sidebar-footer {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .grid.two,
  .grid.four,
  .ai-insight-grid,
  .advice-metrics,
  .dimension-grid,
  .completion-sections,
  .review-dimension-list,
  .match-profile-grid,
  .handoff-detail-grid,
  .funnel-grid,
  .dashboard-kpi-line,
  .change-log-item,
  .match-brief-grid,
  .match-compare-grid,
  .pool-tabs,
  .match-header,
  .report-metrics,
  .report-copy-grid,
  .settings-check-grid,
  .review-row {
    grid-template-columns: 1fr;
  }

  .report-controls,
  .report-poster-head {
    display: grid;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .global-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
}

@media (max-width: 720px) {
  body {
    background: #f6f8fb;
  }

  .login-page {
    min-height: 100dvh;
    align-content: start;
    gap: 18px;
    padding: 16px;
    overflow: auto;
  }

  .login-page::before,
  .login-page::after {
    display: none;
  }

  .login-emblem {
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
    border-radius: 18px;
    font-size: 30px;
  }

  .login-brand-panel h1 {
    font-size: 32px;
  }

  .login-brand-panel > p:not(.login-eyebrow) {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.55;
  }

  .login-metrics {
    margin-top: 16px;
    gap: 7px;
  }

  .login-metrics span {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 12px;
  }

  .login-card {
    padding: 18px;
  }

  .login-card-heading {
    margin-bottom: 18px;
  }

  .app-shell {
    display: block;
    min-height: 100dvh;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    gap: 8px;
    padding: 10px 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .brand {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px 4px;
    border-bottom: 0;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand span {
    display: none;
  }

  .nav {
    display: flex;
    gap: 8px;
    margin: 0 -2px;
    padding: 2px 2px 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav button {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 12px;
    text-align: center;
    white-space: nowrap;
    scroll-snap-align: start;
    font-size: 13px;
  }

  .nav button.active::before {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 0;
    width: auto;
    height: 3px;
  }

  .sidebar-footer {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-top: 6px;
  }

  .user-box {
    flex: 1 1 auto;
    min-width: 0;
    padding: 7px 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
  }

  .sidebar-footer .btn {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .main {
    padding: 12px 12px 24px;
  }

  .topbar {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
  }

  .global-search {
    width: 100%;
  }

  .global-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .global-search-results {
    position: static;
    margin-top: 8px;
  }

  .member-drawer {
    width: 100vw;
    padding: 14px;
  }

  .drawer-head,
  .drawer-actions {
    display: grid;
  }

  .drawer-facts {
    grid-template-columns: 1fr;
  }

  .service-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .service-tabs::-webkit-scrollbar {
    display: none;
  }

  .service-tabs button {
    flex: 0 0 112px;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .topbar p {
    margin-top: 4px;
    font-size: 13px;
  }

  .grid {
    gap: 10px;
  }

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

  .panel {
    padding: 12px;
  }

  .panel h2,
  .panel h3 {
    font-size: 16px;
  }

  .stat {
    min-height: 74px;
    padding: 12px;
  }

  .stat strong {
    font-size: 23px;
  }

  .stat::after {
    width: 30px;
    right: 12px;
    bottom: 10px;
  }

  .btn,
  .field input,
  .field select,
  .toolbar input,
  .toolbar select,
  .review-row input,
  .review-row select {
    min-height: 44px;
  }

  .btn {
    padding: 10px 12px;
  }

  .field textarea {
    min-height: 112px;
  }

  .toolbar {
    gap: 8px;
    align-items: stretch;
  }

  .toolbar > .btn,
  .toolbar > a.btn,
  .toolbar > .field,
  .toolbar > input,
  .toolbar > select {
    flex: 1 1 100%;
  }

  .topbar .inline-row {
    align-items: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .wide {
    grid-column: auto;
  }

  .candidate-top,
  .todo-item,
  .ai-insight-head,
  .completion-head,
  .handoff-title,
  .preference-advice-head,
  .match-profile-head,
  .insight-title,
  .appearance-brief,
  .appearance-summary {
    display: grid;
  }

  .appearance-brief img,
  .appearance-summary img {
    width: 100%;
    height: auto;
    max-height: 260px;
  }

  .match-header {
    gap: 10px;
  }

  .picker-results {
    grid-template-columns: 1fr;
    max-height: 226px;
    overflow: auto;
    padding-right: 2px;
  }

  .pool-tabs {
    display: flex;
    gap: 8px;
    margin: 10px 0 12px;
    padding-bottom: 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .pool-tabs::-webkit-scrollbar {
    display: none;
  }

  .pool-tab {
    flex: 0 0 138px;
    min-height: 88px;
    padding: 12px;
    scroll-snap-align: start;
  }

  .pool-tab strong {
    font-size: 22px;
  }

  .candidate-card {
    padding: 12px;
    gap: 10px;
  }

  .panel-head-row {
    align-items: stretch;
  }

  .completion-card {
    padding: 12px;
  }

  .completion-sections {
    grid-template-columns: 1fr;
  }

  .completion-inline {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .completion-mini-bar {
    width: 78px;
  }

  .todo-item {
    align-items: stretch;
  }

  .handoff-list-item {
    grid-template-columns: 1fr;
  }

  .startup-check {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .candidate-title {
    gap: 6px;
  }

  .candidate-title strong {
    flex-basis: 100%;
  }

  .score {
    justify-self: start;
    min-width: 54px;
  }

  .report-controls {
    gap: 10px;
  }

  .report-controls .toolbar {
    width: 100%;
  }

  .compact-field {
    min-width: 0;
  }

  .report-poster {
    gap: 12px;
    padding: 14px;
  }

  .report-poster-head h3 {
    font-size: 20px;
  }

  .report-seal {
    min-width: 0;
    width: fit-content;
    padding: 8px 10px;
  }

  .report-copy-grid {
    gap: 10px;
  }

  .member-table-wrap,
  .resource-table-wrap,
  .service-report-table .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .member-table,
  .resource-table,
  .service-summary-table,
  .member-table tbody,
  .resource-table tbody,
  .service-summary-table tbody,
  .member-table tr,
  .resource-table tr,
  .service-summary-table tr,
  .member-table td,
  .resource-table td,
  .service-summary-table td {
    display: block;
    min-width: 0;
  }

  .member-table,
  .resource-table,
  .service-summary-table {
    background: transparent;
    font-size: 13px;
  }

  .member-table thead,
  .resource-table thead,
  .service-summary-table thead {
    display: none;
  }

  .member-table tr,
  .resource-table tr,
  .service-summary-table tr {
    margin-bottom: 10px;
    padding: 11px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
  }

  .member-table td,
  .resource-table td,
  .service-summary-table td {
    border-bottom: 0;
    padding: 6px 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .member-table td,
  .resource-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }

  .member-table td::before,
  .resource-table td::before,
  .service-summary-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
  }

  .member-table td::before,
  .resource-table td::before {
    flex: 0 0 56px;
  }

  .member-table td[data-label="姓名"],
  .resource-table td[data-label="编号/姓名"] {
    display: grid;
    justify-content: stretch;
    gap: 6px;
    font-size: 16px;
    font-weight: 850;
  }

  .member-table td[data-label="姓名"]::before,
  .resource-table td[data-label="编号/姓名"]::before {
    flex: none;
  }

  .member-table td[data-label="操作"],
  .resource-table td[data-label="操作"] {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
  }

  .member-table td[data-label="操作"]::before,
  .resource-table td[data-label="操作"]::before {
    flex: 0 0 100%;
  }

  .member-table td[data-label="操作"] .btn,
  .resource-table td[data-label="操作"] .btn {
    flex: 1 1 86px;
  }

  .source-item,
  .renewal-item {
    align-items: stretch;
    display: grid;
  }

  .workload-metrics {
    grid-template-columns: 1fr;
  }

  .change-log-item p {
    grid-template-columns: 1fr;
  }

  .change-log-item b {
    display: none;
  }

  .service-summary-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
  }

  .service-summary-table td[data-label="客户可见价值"] {
    grid-template-columns: 1fr;
    gap: 3px;
  }

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

  .compare-state {
    justify-self: start;
  }
}

@media (max-width: 430px) {
  .login-brand-panel h1 {
    font-size: 28px;
  }

  .topbar h1 {
    font-size: 22px;
  }

  .grid.four,
  .report-metrics {
    gap: 8px;
  }

  .stat strong,
  .report-metric strong {
    font-size: 21px;
  }

  .pool-tab {
    flex-basis: 128px;
  }
}

@media print {
  @page {
    margin: 14mm;
  }

  body {
    background: #ffffff;
  }

  body * {
    visibility: hidden;
  }

  .monthly-report-print,
  .monthly-report-print * {
    visibility: visible;
  }

  .monthly-report-print {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    gap: 12px;
  }

  .no-print,
  .sidebar,
  .topbar {
    display: none !important;
  }

  .report-poster,
  .service-report-table,
  .table-wrap {
    box-shadow: none;
    break-inside: avoid;
  }

  .table-wrap {
    overflow: visible;
  }

  body.print-handoff #handoff-print-area,
  body.print-handoff #handoff-print-area * {
    visibility: visible;
  }

  body.print-handoff #handoff-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    display: grid;
    gap: 10px;
    color: #111827;
  }

  body.print-handoff #handoff-print-area .toolbar {
    display: none !important;
  }

  body.print-handoff #handoff-print-area textarea {
    display: block !important;
    min-height: 76px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    overflow: visible;
  }

  body.print-handoff .handoff-title,
  body.print-handoff .handoff-detail-grid,
  body.print-handoff .startup-checklist,
  body.print-handoff .completion-card {
    box-shadow: none;
    break-inside: avoid;
  }

  body.print-handoff .field.wide {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
  }

  body.print-handoff .field.wide label {
    display: block;
    margin-bottom: 4px;
    font-weight: 800;
  }

}

/* Audit: keep actions readable and shorten mobile scanning. */
button { white-space: nowrap; }
.audit-pagination { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin:16px 0; }
@media(max-width:600px){ .sidebar nav {scrollbar-width:thin;} .match-profile-panel {max-height:230px;overflow:auto;} .candidate-list .candidate-card {padding:12px;} }

.demo-notice{position:fixed;inset:0 0 auto;height:34px;z-index:3000;background:#312e81;color:#fff;text-align:center;font-size:12px;display:flex;align-items:center;justify-content:center;padding:0 8px}body{padding-top:34px}.sidebar{top:34px;height:calc(100vh - 34px)}@media(max-width:600px){.demo-notice{font-size:10px}.sidebar{height:auto}}
/* Unified, deterministic identity system. Illustrations are explicitly labelled. */
.person-identity{display:flex;align-items:center;gap:12px;min-width:0;text-align:left;color:var(--text,#172033)}
.person-avatar{position:relative;display:inline-flex;flex:0 0 auto;align-self:center;border-radius:18px;background:#eef2ff;box-shadow:0 2px 8px #182c5520}
.person-avatar img{display:block;width:64px;height:64px;object-fit:cover;border-radius:inherit}
.person-avatar.avatar-sm{border-radius:13px}.person-avatar.avatar-sm img{width:46px;height:46px}.person-avatar.avatar-lg{border-radius:22px}.person-avatar.avatar-lg img{width:94px;height:94px}
.avatar-type-dot{position:absolute;right:-3px;bottom:-3px;display:grid;place-items:center;min-width:19px;height:19px;padding:0 3px;border:2px solid white;border-radius:7px;background:#e0e7ff;color:#4338ca;font-size:10px;font-weight:700}
[data-avatar-kind=photo] .avatar-type-dot{background:#d1fae5;color:#065f46}
.identity-copy{display:flex;flex-direction:column;gap:4px;min-width:0}.identity-name{font-size:15px;line-height:1.35;font-weight:750;overflow-wrap:anywhere;text-align:left;white-space:normal!important}.identity-summary{font-size:12px;line-height:1.5;color:#64718a;white-space:normal!important}.identity-meta{display:flex;flex-wrap:wrap;gap:5px 9px;font-size:10px;line-height:1.4;color:#7b859d}.member-code{font-variant-numeric:tabular-nums;letter-spacing:.2px}.avatar-label{color:#6a62aa}.identity-badges{display:flex;gap:5px;flex-wrap:wrap;margin-top:3px}.identity-badges .pill{font-size:10px;padding:2px 7px}
.members-table .person-identity,.resource-table .person-identity{min-width:215px}.member-name-cell .person-identity{min-width:210px}.picker-item>.person-identity{width:100%}.picker-item{white-space:normal}.picker-item .identity-name{font-size:13px}.picker-item .identity-summary{font-size:11px}.picker-item .identity-meta{font-size:9px}
.todo-item>.person-avatar{align-self:flex-start;margin-top:2px}.todo-item>div{flex:1;min-width:0}.todo-item .btn{flex-shrink:0}
.match-summary-list{gap:14px}.candidate-summary{padding:20px}.candidate-summary .candidate-top{align-items:center;gap:16px}.candidate-summary .candidate-top>.person-identity{flex:1;min-width:0}.match-score{min-width:64px;text-align:center;color:#4f46e5;border-radius:14px;padding:8px 12px;background:#eef2ff}.match-score>span{display:block;font-size:10px;color:#6a68a8}.match-score strong{font-size:25px}.candidate-facts{font-size:12px;color:#65718a;margin:12px 0 9px}.candidate-summary .reason-list{margin-bottom:10px}.candidate-summary-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:10px}.compare-check{display:flex;align-items:center;gap:7px;cursor:pointer;font-size:13px;font-weight:600;color:#48466b}.compare-check input{width:16px;height:16px;accent-color:#6366f1}
.candidate-details{margin-top:14px;border-top:1px solid #e7eaf2;padding-top:12px}.candidate-details>summary{cursor:pointer;font-size:12px;font-weight:650;color:#5b58b2;list-style-position:inside}.candidate-details[open]>summary{margin-bottom:16px}.candidate-details .workflow-row{flex-wrap:wrap}.candidate-details .review-row{margin-top:12px}
.comparison-section{margin:12px 0}.comparison-tray{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:16px 18px;background:linear-gradient(110deg,#eef2ff,#faf8ff);border:1px solid #dfe2fe;border-radius:16px}.comparison-tray strong{font-size:14px}.comparison-tray strong span{font-size:12px;color:#6366f1;margin-left:6px}.comparison-tray p{font-size:11px;color:#738097;margin:5px 0 0}.comparison-chips{display:flex;flex-wrap:wrap;gap:6px;flex:1}.compare-chip{border:1px solid #d7dafb;border-radius:18px;background:white;padding:5px 9px;font-size:11px;color:#504e8a;cursor:pointer}.comparison-buttons{display:flex;gap:7px}.compare-feedback{font-size:12px;color:#aa4d12;min-height:0;margin:6px 2px}.compare-feedback:empty{display:none}.comparison-panel{overflow-x:auto;max-width:100%;margin-top:14px;border:1px solid #e0e5f1;border-radius:16px;background:white}.comparison-table{border-collapse:collapse;min-width:670px;width:100%;table-layout:fixed}.comparison-table caption{text-align:left;padding:12px;color:#6e7891;font-size:12px}.comparison-table th,.comparison-table td{padding:13px;text-align:left;border-bottom:1px solid #e8ecf4;vertical-align:top;font-size:12px;line-height:1.7;white-space:normal;overflow-wrap:anywhere}.comparison-table th:first-child{width:102px;background:#f8faff;color:#637089}.comparison-table thead th{background:#fafbff}.comparison-table tbody tr:last-child td,.comparison-table tbody tr:last-child th{border-bottom:0}.comparison-table .identity-meta{font-size:9px}
@media(max-width:650px){.person-identity{gap:9px}.person-avatar img{width:56px;height:56px}.identity-name{font-size:14px}.identity-meta{font-size:9px}.candidate-summary{padding:15px}.candidate-summary .candidate-top{gap:8px}.match-score{min-width:48px;padding:7px}.match-score strong{font-size:22px}.comparison-tray{padding:13px;gap:10px}.comparison-chips{flex-basis:100%;order:3}.comparison-buttons{margin-left:auto}.comparison-table{min-width:690px}.member-drawer .person-avatar.avatar-lg img{width:76px;height:76px}.todo-item{gap:9px;align-items:flex-start}.todo-item .btn{padding:7px 9px;font-size:11px}.todo-item>.person-avatar img{width:37px;height:37px}.todo-item .candidate-title{gap:5px}.picker-item .person-avatar img{width:40px;height:40px}}
.members-workspace{display:grid;gap:16px;grid-template-columns:minmax(0,1fr)}.members-workspace .member-edit-panel{order:-1}.member-table td:first-child{min-width:290px;width:34%}.member-table .identity-name{white-space:nowrap!important}.member-table .person-avatar img{width:54px;height:54px}.member-table .identity-badges{margin-top:0}.member-table td{padding-top:14px;padding-bottom:14px}.member-table .identity-summary{white-space:nowrap!important}.member-table .person-identity{gap:12px}.member-table-wrap{max-width:100%}@media(max-width:650px){.member-table td:first-child{min-width:0;width:auto}.member-table .identity-name,.member-table .identity-summary{white-space:normal!important}.member-table .person-avatar img{width:50px;height:50px}}
.member-table th:first-child{width:290px}.member-table .identity-meta{gap:4px 8px}.member-table .avatar-label{white-space:nowrap}.member-table .identity-copy{gap:3px}.member-table td{padding-top:12px;padding-bottom:12px}
.service-person-header{padding:18px;margin:14px 0;background:#f8faff;border:1px solid #e4e9f6;border-radius:16px}.comparison-buttons .btn:disabled{cursor:not-allowed;opacity:.45}.audit-pagination>button{border:1px solid #dfe5ef;background:white;border-radius:9px;padding:7px 12px;color:#53627d;cursor:pointer}.audit-pagination>button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:650px){.member-table td,.resource-table td{width:100%!important;max-width:none!important;min-width:0}.member-table td[data-label="姓名"]::before,.resource-table td[data-label="编号/姓名"]::before{display:none}.member-table td[data-label="性别"],.member-table td[data-label="年龄"],.member-table td[data-label="城市"],.resource-table td[data-label="性别"],.resource-table td[data-label="年龄"]{display:none}.member-table td{padding:7px 0}.member-table td[data-label="姓名"]{padding-bottom:12px}.member-table td[data-label="操作"] .btn{padding:8px 10px}}
