:root {
  --ink: #172033;
  --muted: #7b8495;
  --line: #e6eaf0;
  --primary: #356df3;
  --primary-dark: #2559d9;
  --primary-soft: #eef3ff;
  --green: #1a9b69;
  --green-soft: #eaf8f2;
  --red: #d64a4a;
  --red-soft: #fff1f1;
  --surface: #ffffff;
  --page: #f6f7f9;
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
body {
  color: var(--ink);
  background: var(--page);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.turnover-page {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 54px;
}

.page-shell {
  overflow: hidden;
  border: 1px solid rgba(225, 229, 236, .95);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(25, 42, 70, .08);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand-mark {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 15px;
  background: linear-gradient(145deg, #4a7cff, #275ee6);
  box-shadow: 0 9px 20px rgba(53, 109, 243, .25);
}
.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 13px;
  width: 22px;
  height: 7px;
  border: 2px solid rgba(255, 255, 255, .96);
  border-radius: 3px;
}
.brand-mark::before { top: 12px; }
.brand-mark::after { top: 26px; }
.brand h1 { margin: 0 0 5px; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; }
.brand p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.ready-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 13px;
  font-weight: 600;
}
.ready-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ready-pill.is-ready { color: var(--green); background: var(--green-soft); }

.workflow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, .85fr);
  gap: 18px;
  padding: 22px;
  background: #fafbfc;
}

.core-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.card-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.step-number {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 13px;
  font-weight: 700;
}
.card-heading h2 { margin: 1px 0 5px; font-size: 18px; line-height: 1.25; }
.card-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.upload-card .el-upload { width: 100%; }
.upload-card .el-upload-dragger {
  width: 100%;
  min-height: 210px;
  padding: 42px 22px 30px;
  border: 1px dashed #becbe2;
  border-radius: 14px;
  background: #f8faff;
  transition: border-color .2s, background .2s, transform .2s;
}
.upload-card .el-upload-dragger:hover {
  border-color: var(--primary);
  background: #f3f6ff;
  transform: translateY(-1px);
}
.upload-glyph {
  position: relative;
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 17px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 27px;
  font-weight: 400;
  line-height: 52px;
}
.upload-title { color: #30394b; font-size: 15px; font-weight: 600; }
.upload-title em { color: var(--primary); font-style: normal; }
.upload-hint { margin-top: 8px; color: #9aa2b1; font-size: 12px; }
.upload-card .el-upload-list { margin-top: 12px; }
.upload-card .el-upload__tip { margin-top: 0; }
.upload-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.upload-actions .el-button { min-width: 148px; height: 42px; border-radius: 10px; }

.import-results {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.result-row { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 12px; }
.result-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--red); }
.result-row.success .result-dot { background: var(--green); }
.result-name { overflow: hidden; flex: 1; color: #4b5567; text-overflow: ellipsis; white-space: nowrap; }
.result-message { flex: 0 0 auto; color: var(--red); }
.result-row.success .result-message { color: var(--green); }

.output-card { display: flex; flex-direction: column; }
.field-label { display: block; margin: 0 0 8px; color: #4d5666; font-size: 12px; font-weight: 600; }
.snapshot-select { width: 100%; }
.snapshot-select .el-select__wrapper { min-height: 44px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line) inset; }

.snapshot-summary {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfd;
}
.summary-line { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.summary-line span { color: var(--muted); font-size: 12px; }
.summary-line strong { display: block; margin-top: 5px; font-size: 22px; letter-spacing: -.02em; }
.coverage { color: var(--muted); font-size: 12px; text-align: right; }
.coverage b { color: #354052; font-size: 16px; }
.coverage-track { overflow: hidden; height: 6px; margin-top: 15px; border-radius: 99px; background: #e9edf3; }
.coverage-bar { height: 100%; border-radius: inherit; background: var(--primary); transition: width .35s ease; }

.dependency-note {
  display: flex;
  gap: 9px;
  min-height: 48px;
  margin-bottom: 18px;
  padding: 12px 13px;
  border-radius: 11px;
  color: #935050;
  background: var(--red-soft);
  font-size: 12px;
  line-height: 1.6;
}
.dependency-note.is-ready { color: #27775a; background: var(--green-soft); }
.note-icon { flex: 0 0 auto; font-weight: 700; }

.export-action { margin-top: auto; }
.export-button {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 9px 18px rgba(53, 109, 243, .2);
}
.export-button.el-button--primary { background: var(--primary); }
.export-button.el-button--primary:hover { background: var(--primary-dark); }
.export-button.is-disabled { box-shadow: none; }
.export-tip { margin: 11px 0 0; color: #979ead; font-size: 11px; line-height: 1.55; text-align: center; }

.export-mask {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(18, 25, 40, .66);
  backdrop-filter: blur(6px);
}
.export-dialog {
  width: min(430px, 100%);
  padding: 38px 34px 32px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .26);
  text-align: center;
}
.export-spinner {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
  border: 5px solid #e8edfa;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: turnover-spin .8s linear infinite;
}
.export-spinner::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--primary-soft);
}
.export-dialog h2 { margin: 0 0 9px; font-size: 21px; }
.export-dialog > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.export-warning {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  padding: 13px 14px;
  border: 1px solid #f2d9af;
  border-radius: 11px;
  color: #8a5a11;
  background: #fff9ed;
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
}
.warning-mark { flex: 0 0 auto; font-weight: 800; }
.elapsed { margin-top: 15px; color: #a1a8b4; font-size: 11px; }

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

@media (max-width: 880px) {
  .turnover-page { width: min(100% - 22px, 1160px); padding: 12px 0 28px; }
  .page-shell { border-radius: 18px; }
  .page-header { align-items: flex-start; flex-direction: column; padding: 22px; }
  .workflow-grid { grid-template-columns: 1fr; padding: 14px; }
  .core-card { padding: 19px; }
  .upload-card .el-upload-dragger { min-height: 180px; padding: 32px 16px 24px; }
}

@media (max-width: 520px) {
  .brand-mark { width: 42px; height: 42px; flex-basis: 42px; border-radius: 13px; }
  .brand-mark::before, .brand-mark::after { left: 11px; width: 20px; }
  .brand-mark::before { top: 10px; }
  .brand-mark::after { top: 24px; }
  .brand h1 { font-size: 21px; }
  .brand p { font-size: 12px; }
  .ready-pill { margin-left: 58px; }
  .summary-line { align-items: flex-start; flex-direction: column; }
  .coverage { text-align: left; }
  .export-dialog { padding: 32px 22px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .export-spinner { animation-duration: 1.4s; }
  .upload-card .el-upload-dragger { transition: none; }
}
