:root {
  --navy: #002b5c;
  --navy-soft: #0b3c70;
  --orange: #ff6048;
  --cyan: #25b9f2;
  --ink: #102844;
  --muted: #64748b;
  --line: #dfe8f2;
  --background: #f5f9fd;
  --surface: #fff;
  --green: #16865f;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 4%, #25b9f21a, transparent 28%),
    var(--background);
  font-family: Arial, Helvetica, sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.registration-header {
  min-height: 78px;
  padding: 10px clamp(18px, 5vw, 70px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #ffffffea;
}
.registration-header img { width: 190px; display: block; }
.back-link { color: var(--navy); text-decoration: none; font-weight: 800; }

.auth-gate {
  min-height: calc(100vh - 78px);
  padding: 25px;
  display: grid;
  place-items: center;
}
.gate-card {
  width: min(480px, 100%);
  padding: 42px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 22px 60px #002b5c15;
}
.gate-icon {
  width: 62px;
  height: 62px;
  margin: auto;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: var(--navy);
  font-size: 28px;
}
.gate-card h1 { margin: 20px 0 10px; font-size: 30px; }
.gate-card p { margin: 0 0 24px; color: var(--muted); line-height: 1.55; }

.primary {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: var(--orange);
  box-shadow: 0 9px 20px #ff60482a;
  font-weight: 850;
}
.primary:disabled { cursor: wait; opacity: .65; }

.registration-main {
  width: min(1160px, calc(100% - 36px));
  margin: 42px auto 75px;
}
.intro {
  max-width: 780px;
  margin-bottom: 28px;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
}
.intro h1 { margin: 0; font-size: clamp(36px, 5vw, 58px); letter-spacing: -2px; line-height: 1; }
.intro > p:last-child { margin: 17px 0 0; color: var(--muted); font-size: 17px; line-height: 1.55; }

.registration-form { display: grid; gap: 20px; }
.form-section {
  padding: clamp(23px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--surface);
  box-shadow: 0 10px 34px #002b5c08;
}
.section-heading { margin-bottom: 24px; }
.section-heading span {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--navy);
  font-weight: 850;
}
.section-heading h2 { margin: 12px 0 5px; font-size: 23px; }
.section-heading p { margin: 0; color: var(--muted); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { min-width: 0; display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field > span { font-size: 13px; font-weight: 800; }
.field small { color: var(--muted); line-height: 1.4; }
.field small.warning { color: #9a4d00; font-weight: 700; }
.field small.success { color: var(--green); font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: #fbfdff;
}
.field textarea { min-height: 125px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px #25b9f21b;
}
.searchable-field { position: relative; }
.searchable-options {
  position: absolute;
  z-index: 40;
  top: 79px;
  left: 0;
  right: 0;
  max-height: 270px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid #b9cce0;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 16px 35px #002b5c24;
}
.searchable-options[hidden] { display: none; }
.searchable-option {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  display: block;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}
.searchable-option:hover,
.searchable-option.active {
  color: #fff;
  background: var(--navy);
}
.searchable-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}

.trades-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.trade-option {
  min-width: 0;
  padding: 13px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfdff;
}
.trade-option:has(.trade-check:checked) { border-color: var(--cyan); background: #effaff; }
.trade-option label { overflow: hidden; text-overflow: ellipsis; font-weight: 750; }
.primary-choice { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.primary-choice input:disabled { opacity: .35; }

.age-declaration {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #d8e5f2;
  border-radius: 16px;
  background: #f8fbff;
}
.age-question{margin:0;color:#17324f;font-size:15px;font-weight:850}
.age-buttons{margin-top:12px;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.age-buttons button{min-height:48px;border:1px solid #b9cce0;border-radius:11px;color:var(--navy);background:#fff;font-weight:900}
.age-buttons button:hover{border-color:var(--cyan);background:#effaff}
.age-buttons button.selected{color:#fff;border-color:var(--cyan);background:var(--cyan);box-shadow:0 7px 17px #25b9f225}
.age-buttons button[data-age-choice="minor"].selected{border-color:#d64034;background:#d64034}
.minor-notice {
  margin: 14px 0 0;
  padding: 13px 15px;
  border-left: 4px solid #d64034;
  border-radius: 8px;
  color: #8b1f17;
  background: #fff0ee;
  font-weight: 700;
  line-height: 1.45;
}
.sworn-declaration {
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: #17324f;
  font-weight: 700;
  line-height: 1.45;
}
.sworn-declaration input {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  flex: none;
}

.security-note {
  padding: 17px 19px;
  border-radius: 12px;
  color: #40566d;
  background: #eef5fb;
  line-height: 1.5;
  font-size: 13px;
}
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 15px; }
.form-message { margin: 0 auto 0 0; color: var(--muted); font-weight: 750; }
.form-message.error { color: #b42318; }
.form-message.success { color: var(--green); }

@media (max-width: 700px) {
  .registration-header { min-height: 68px; }
  .registration-header img { width: 145px; }
  .registration-main { margin-top: 30px; }
  .fields, .trades-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .form-actions { display: grid; }
  .form-actions .primary { width: 100%; }
  .form-message { margin: 0; text-align: center; }
}
