:root {
  --text: #1f2937;
  --muted: #8b95a5;
  --soft: #f6f7f9;
  --line: #e5e7eb;
  --line-strong: #d8dde6;
  --danger: #d12b2f;
  --danger-soft: #fff3f3;
  --danger-line: #ffc5c5;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --ok: #15803d;
  --amber: #d97706;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  background: #fafafa;
}

button,
input,
textarea {
  font: inherit;
}

.page {
  width: min(100%, 1060px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 24px 56px;
}

.shell {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 32px;
}

.panel-head {
  text-align: center;
  padding: 6px 0 28px;
}

.lock {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 16px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: var(--danger);
  font-size: 23px;
  line-height: 1.2;
  font-weight: 800;
}

.lead {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin-top: 12px;
}

.form-panel {
  max-width: 680px;
  margin: 0 auto;
}

form {
  display: grid;
  gap: 12px;
}

label,
.field-head label {
  color: #4b5563;
  font-size: 13px;
  font-weight: 750;
}

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

.paste-button {
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: #4b5563;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 11px;
}

.paste-button:hover {
  background: var(--soft);
}

textarea,
input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #111827;
  outline: none;
}

textarea:focus,
input:focus {
  border-color: #9ca3af;
}

textarea {
  min-height: 92px;
  resize: vertical;
  padding: 13px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.45;
}

input {
  height: 48px;
  padding: 0 14px;
  font-size: 15px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.captcha-row {
  display: flex;
  justify-content: flex-start;
  min-height: 65px;
  margin-top: 4px;
}

.submit-button {
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  margin-top: 10px;
}

.submit-button:hover {
  background: var(--primary-dark);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.form-message {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--ok);
}

.status-panel {
  max-width: 680px;
  margin: 22px auto 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfcfd;
  padding: 18px;
}

.status-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--amber);
  margin-top: 7px;
}

.status-dot.success {
  background: var(--ok);
}

.status-dot.failed {
  background: var(--danger);
}

h2 {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
}

.status-title p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin-top: 5px;
}

.steps {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 12px;
}

.step span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f3f6;
  color: #7a8494;
  font-size: 13px;
  font-weight: 800;
}

.step strong {
  font-size: 14px;
}

.step em {
  color: #87909f;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.step.active {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.step.active span {
  background: #dbeafe;
  color: var(--primary-dark);
}

.step.active em {
  color: var(--primary-dark);
}

.step.success span {
  background: #dcfce7;
  color: var(--ok);
}

.step.success em {
  color: var(--ok);
}

.step.failed {
  border-color: var(--danger-line);
  background: var(--danger-soft);
}

.step.failed span {
  background: #fee2e2;
  color: var(--danger);
}

.step.failed em {
  color: var(--danger);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  border-top: 1px solid var(--line);
  color: #a0a8b4;
  font-size: 14px;
  padding: 24px 0 0;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
}

@media (max-width: 720px) {
  .page {
    padding: 18px 14px 36px;
  }

  .shell {
    padding: 24px 16px;
  }

  .panel-head {
    padding-bottom: 22px;
  }

  .field-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .paste-button {
    width: 100%;
  }

  .captcha-row {
    overflow-x: auto;
  }

  .step {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .step em {
    grid-column: 2;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer nav {
    justify-content: flex-start;
    gap: 10px 16px;
  }
}
