.m50e1-restore-dialog {
  width: min(980px, calc(100vw - 24px));
  max-height: 96vh;
  overflow: hidden;
}

.m50e1-restore-form {
  width: 100%;
  max-height: 94vh;
  padding: 0;
  overflow: auto;
  background: #fff;
}

.m50e1-restore-header {
  position: sticky;
  z-index: 4;
  top: 0;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line, #e1e7ef);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
}

.m50e1-restore-header h3 {
  margin: 3px 0 4px;
  font-size: 1.25rem;
  letter-spacing: -.02em;
}

.m50e1-restore-header p {
  max-width: 720px;
  margin: 0;
  line-height: 1.45;
}

.m50e1-restore-kicker {
  color: var(--primary, #155eef);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.m50e1-restore-boundary {
  display: grid;
  gap: 4px;
  margin: 18px 22px 0;
  padding: 13px 15px;
  border: 1px solid #fdb022;
  border-radius: 12px;
  background: #fffaeb;
  color: #7a2e0e;
  line-height: 1.45;
}

.m50e1-restore-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 22px 0;
  padding: 0;
  list-style: none;
}

.m50e1-restore-steps li {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line, #e1e7ef);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--muted, #667085);
  font-size: .76rem;
}

.m50e1-restore-steps li span {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #eaecf0;
  color: #475467;
  font-size: .72rem;
  font-weight: 850;
}

.m50e1-restore-steps li b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m50e1-restore-steps li.is-current {
  border-color: #84adff;
  background: #eff4ff;
  color: #1849a9;
}

.m50e1-restore-steps li.is-current span {
  background: var(--primary, #155eef);
  color: #fff;
}

.m50e1-restore-steps li.is-done {
  border-color: #abefc6;
  background: #ecfdf3;
  color: #067647;
}

.m50e1-restore-steps li.is-done span {
  background: #079455;
  color: #fff;
}

.m50e1-restore-steps li.is-failed {
  border-color: #fecdca;
  background: #fef3f2;
  color: #b42318;
}

.m50e1-restore-status {
  margin: 14px 22px 0;
  padding: 12px 14px;
  border: 1px solid #d0d5dd;
  border-left-width: 4px;
  border-radius: 11px;
  background: #f9fafb;
  color: #344054;
  line-height: 1.45;
}

.m50e1-restore-status.is-info {
  border-color: #84adff;
  background: #eff4ff;
  color: #1849a9;
}

.m50e1-restore-status.is-warning {
  border-color: #fdb022;
  background: #fffaeb;
  color: #7a2e0e;
}

.m50e1-restore-status.is-error {
  border-color: #f97066;
  background: #fef3f2;
  color: #b42318;
}

.m50e1-restore-status.is-success {
  border-color: #47cd89;
  background: #ecfdf3;
  color: #067647;
}

.m50e1-restore-section {
  margin: 16px 22px 0;
  padding: 15px;
  border: 1px solid var(--line, #e1e7ef);
  border-radius: 13px;
  background: #fff;
}

.m50e1-restore-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.m50e1-restore-section-heading h4 {
  margin: 0 0 3px;
}

.m50e1-restore-section-heading small {
  color: var(--muted, #667085);
}

.m50e1-restore-picker {
  flex: 0 0 auto;
  margin: 0 !important;
  cursor: pointer;
}

.m50e1-restore-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.m50e1-restore-file-input:focus + .m50e1-restore-file-list {
  outline: 3px solid rgba(21, 94, 239, .16);
  outline-offset: 3px;
}

.m50e1-restore-file-list,
.m50e1-restore-checkpoints {
  display: grid;
  gap: 8px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.m50e1-restore-file-list li,
.m50e1-restore-checkpoints li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid #eaecf0;
  border-radius: 9px;
  background: #f9fafb;
}

.m50e1-restore-file-list li > span,
.m50e1-restore-checkpoints li > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.m50e1-restore-file-list strong,
.m50e1-restore-checkpoints strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m50e1-restore-file-list small,
.m50e1-restore-checkpoints small {
  color: var(--muted, #667085);
}

.m50e1-restore-file-list b,
.m50e1-restore-checkpoints b {
  flex: 0 0 auto;
  color: #175cd3;
  font-size: .74rem;
}

.m50e1-restore-empty {
  color: var(--muted, #667085);
  font-style: italic;
}

.m50e1-restore-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

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

.m50e1-restore-summary > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #d1e0ff;
  border-radius: 9px;
  background: #f5f8ff;
}

.m50e1-restore-summary span {
  color: var(--muted, #667085);
  font-size: .72rem;
}

.m50e1-restore-summary strong {
  overflow: hidden;
  color: #1849a9;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m50e1-restore-confirmations {
  display: grid;
  gap: 9px;
  margin: 16px 22px 0;
  padding: 13px 15px 15px;
  border: 1px solid #b2ccff;
  border-radius: 13px;
  background: #f5f8ff;
}

.m50e1-restore-confirmations legend {
  padding: 0 7px;
  color: #1849a9;
  font-weight: 800;
}

.m50e1-restore-confirmations label {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 9px;
  margin: 0;
  font-size: .86rem;
  font-weight: 650;
  line-height: 1.4;
}

.m50e1-restore-confirmations input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--primary, #155eef);
}

.m50e1-restore-work {
  background: #fbfcfe;
}

.m50e1-restore-progress {
  display: block;
  width: 100%;
  height: 12px;
  margin-top: 13px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #eaecf0;
  accent-color: var(--primary, #155eef);
}

.m50e1-restore-progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #eaecf0;
}

.m50e1-restore-progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #2e90fa, #155eef);
}

.m50e1-restore-progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #2e90fa, #155eef);
}

.m50e1-restore-progress-text {
  margin: 8px 0 0;
  color: #344054;
  font-size: .82rem;
  font-weight: 700;
}

.m50e1-restore-actions {
  bottom: 0;
  z-index: 5;
  margin: 18px 0 0;
  padding: 13px 22px 18px;
  border-top: 1px solid var(--line, #e1e7ef);
  background: rgba(255, 255, 255, .98);
}

.m50e1-restore-actions .btn:disabled,
.m50e1-export-actions .btn:disabled {
  border-color: #d0d5dd;
  background: #eaecf0;
  color: #667085;
  box-shadow: none;
  cursor: not-allowed;
  opacity: .72;
}

.m50e1-restore-dialog[data-phase="complete"] .m50e1-restore-progress::-webkit-progress-value {
  background: #079455;
}

.m50e1-restore-dialog[data-phase="complete"] .m50e1-restore-progress::-moz-progress-bar {
  background: #079455;
}

.m50e1-restore-dialog[data-phase="failed"] .m50e1-restore-progress::-webkit-progress-value {
  background: #d92d20;
}

.m50e1-restore-dialog[data-phase="failed"] .m50e1-restore-progress::-moz-progress-bar {
  background: #d92d20;
}

.m50e1-export-dialog {
  width: min(760px, calc(100vw - 24px));
  max-height: 94vh;
  overflow: hidden;
}

.m50e1-export-form {
  width: 100%;
  max-height: 92vh;
  padding: 0;
  overflow: auto;
}

.m50e1-export-header {
  position: sticky;
  z-index: 4;
  top: 0;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line, #e1e7ef);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
}

.m50e1-export-header h3 {
  margin: 3px 0 4px;
}

.m50e1-export-header p {
  margin: 0;
  line-height: 1.45;
}

.m50e1-export-progress-box {
  margin: 16px 22px 0;
  padding: 14px 15px;
  border: 1px solid var(--line, #e1e7ef);
  border-radius: 12px;
  background: #fbfcfe;
}

.m50e1-export-progress-box .m50e1-restore-progress {
  margin-top: 0;
}

.m50e1-export-ack {
  display: grid !important;
  grid-template-columns: 20px 1fr !important;
  align-items: start;
  gap: 9px !important;
  margin: 16px 22px 0 !important;
  font-size: .88rem;
  line-height: 1.45;
}

.m50e1-export-ack input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--primary, #155eef);
}

.m50e1-export-actions {
  bottom: 0;
  z-index: 5;
  margin: 18px 0 0;
  padding: 13px 22px 18px;
  border-top: 1px solid var(--line, #e1e7ef);
  background: rgba(255, 255, 255, .98);
}

@media (max-width: 760px) {
  .m50e1-restore-dialog {
    width: calc(100vw - 10px);
    max-height: 98vh;
  }

  .m50e1-export-dialog {
    width: calc(100vw - 10px);
    max-height: 98vh;
  }

  .m50e1-restore-form,
  .m50e1-export-form {
    max-height: 97vh;
  }

  .m50e1-restore-header {
    padding: 15px 14px 12px;
  }

  .m50e1-export-header {
    padding: 15px 14px 12px;
  }

  .m50e1-restore-boundary,
  .m50e1-restore-steps,
  .m50e1-restore-status,
  .m50e1-restore-section,
  .m50e1-restore-confirmations {
    margin-right: 14px;
    margin-left: 14px;
  }

  .m50e1-export-dialog .m50e1-restore-boundary,
  .m50e1-export-dialog .m50e1-restore-status,
  .m50e1-export-progress-box,
  .m50e1-export-ack {
    margin-right: 14px !important;
    margin-left: 14px !important;
  }

  .m50e1-restore-steps {
    grid-template-columns: 1fr;
  }

  .m50e1-restore-steps li {
    padding: 7px 9px;
  }

  .m50e1-restore-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .m50e1-restore-picker {
    width: 100%;
    text-align: center;
  }

  .m50e1-restore-summary {
    grid-template-columns: 1fr 1fr;
  }

  .m50e1-restore-actions {
    align-items: stretch;
    flex-direction: column-reverse;
    padding: 11px 14px 14px;
  }

  .m50e1-export-actions {
    align-items: stretch;
    flex-direction: column-reverse;
    padding: 11px 14px 14px;
  }

  .m50e1-restore-actions .btn {
    width: 100%;
  }

  .m50e1-export-actions .btn {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .m50e1-restore-summary {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .m50e1-restore-dialog *,
  .m50e1-restore-dialog *::before,
  .m50e1-restore-dialog *::after,
  .m50e1-export-dialog *,
  .m50e1-export-dialog *::before,
  .m50e1-export-dialog *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
