:root {
  --bg: #101a24;
  --bg-2: #112334;
  --panel: rgba(16, 35, 55, 0.86);
  --line: rgba(114, 163, 216, 0.32);
  --text: #e8f1ff;
  --muted: #a7bfd8;
  --accent: #4ec9f5;
  --accent-2: #2f90ff;
  --danger: #ff6d86;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(78, 201, 245, 0.17), transparent 35%),
    radial-gradient(circle at 88% 92%, rgba(47, 144, 255, 0.22), transparent 40%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-2) 58%, #0d1824 100%);
}

.register-shell {
  width: min(1100px, 95vw);
  margin: 20px auto;
  padding: 16px;
}

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

h1 {
  margin: 0;
  font-size: 1.9rem;
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.header-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: end;
}

.back-link {
  color: #07213f;
  text-decoration: none;
  font-weight: 650;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 10px;
  padding: 10px 14px;
}

.panel {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  backdrop-filter: blur(6px);
}

h2 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a6c6eb;
}

.steps {
  margin: 0;
  padding-left: 20px;
  color: #d8e6fb;
  line-height: 1.5;
}

.steps li {
  margin: 4px 0;
}

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

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

.field-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 10px;
}

label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
select,
textarea,
button,
.action-link {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(114, 163, 216, 0.36);
  border-radius: 8px;
  padding: 8px 9px;
  color: var(--text);
  background: rgba(11, 24, 40, 0.9);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color-scheme: dark;
  background-image:
    linear-gradient(180deg, rgba(10, 25, 42, 0.98) 0%, rgba(9, 21, 36, 0.98) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23a7bfd8' d='M3.2 5.2L7 9l3.8-3.8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-size: auto, 14px 14px;
  background-position: 0 0, calc(100% - 10px) 50%;
  padding-right: 34px;
}

select:focus,
input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(78, 201, 245, 0.75);
  box-shadow: 0 0 0 3px rgba(78, 201, 245, 0.12);
}

select option {
  color: #e8f1ff;
  background: #10263a;
}

input[readonly],
textarea[readonly] {
  color: #bed4f2;
  background: rgba(14, 30, 49, 0.9);
}

.full-width {
  display: block;
  margin-top: 10px;
}

.actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

button {
  border: 1px solid rgba(109, 156, 221, 0.35);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  color: #ddebff;
  background: rgba(17, 40, 68, 0.85);
}

button.primary,
.action-link {
  color: #052244;
  border: 0;
  font-weight: 650;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.action-link {
  text-decoration: none;
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-block;
}

.action-link.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.status {
  margin: 10px 0 0;
  color: var(--muted);
}

.status.ok {
  color: #87f3be;
}

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

.hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.api-availability {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.api-availability.ok {
  color: #87f3be;
}

.api-availability.warn {
  color: #ffd57a;
}

.api-availability.error {
  color: var(--danger);
}

.hint-block {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(114, 163, 216, 0.22);
  border-radius: 10px;
  background: rgba(9, 20, 34, 0.62);
}

.hint-block p {
  margin: 6px 0;
  color: #c8dbf4;
}

.result {
  margin: 10px 0 0;
  padding: 10px;
  min-height: 40px;
  border: 1px solid rgba(109, 156, 221, 0.28);
  border-radius: 8px;
  background: rgba(10, 22, 37, 0.86);
  color: #cfe0f8;
  white-space: pre-wrap;
  word-break: break-word;
}

code {
  color: #d8ebff;
}

@media (max-width: 980px) {
  .register-header {
    flex-direction: column;
  }

  .header-links {
    justify-content: start;
  }

  .grid,
  .field-grid,
  .verify-grid {
    grid-template-columns: 1fr;
  }
}
