:root {
  --green-900: #0b4d36;
  --green-700: #0f6b4a;
  --green-500: #1f9d63;
  --gold: #d9a21b;
  --maroon: #7b2d26;
  --ink: #1d2b26;
  --muted: #66756e;
  --line: #d6e0da;
  --bg: #eef3f0;
  --danger: #b3261e;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(217, 162, 27, 0.22), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(31, 157, 99, 0.28), transparent 60%),
    linear-gradient(160deg, #0b4d36 0%, #0f6b4a 45%, #145a45 100%);
  background-attachment: fixed;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 56px;
}

.shell { width: 100%; max-width: 560px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  margin: 0 4px 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 13px;
  text-transform: uppercase;
  opacity: 0.95;
}
.brand .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(217, 162, 27, 0.25);
}

.panel {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.panel-head {
  position: relative;
  padding: 30px 32px 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  overflow: hidden;
}
.panel-head::after {
  content: "";
  position: absolute;
  right: -60px; top: -70px;
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 26px solid rgba(217, 162, 27, 0.35);
}
.panel-head::before {
  content: "";
  position: absolute;
  right: 40px; bottom: -90px;
  width: 170px; height: 170px;
  border-radius: 50%;
  border: 18px solid rgba(255, 255, 255, 0.1);
}
.panel-head .tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.panel-head h1 {
  position: relative; z-index: 1;
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.2;
}
.panel-head p { position: relative; z-index: 1; margin: 0; opacity: 0.88; font-size: 14.5px; }
.gold-bar { height: 5px; background: linear-gradient(90deg, var(--gold), #f2cf6b, var(--gold)); }

.panel-body { padding: 28px 32px 32px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { margin-bottom: 16px; }
.field.full { grid-column: 1 / -1; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 600;
}
.field label .req { color: var(--danger); margin-left: 2px; }
.field label .opt { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 4px; }

.control { position: relative; }
.control svg {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: stroke 0.15s;
}
.control.ta svg { top: 15px; transform: none; }
.control textarea {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fbfdfc;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  resize: vertical;
  min-height: 70px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.control textarea::placeholder { color: #a3b0aa; }
.control textarea:hover { border-color: #b7c6be; }
.control textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(31, 157, 99, 0.16);
}
.field.invalid textarea { border-color: var(--danger); background: #fffafa; }
.control input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fbfdfc;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.control input::placeholder { color: #a3b0aa; }
.control input:hover { border-color: #b7c6be; }
.control input:focus {
  outline: none;
  background: #fff;
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(31, 157, 99, 0.16);
}
.control:focus-within svg { stroke: var(--green-700); }

.field.invalid input { border-color: var(--danger); background: #fffafa; }
.field.invalid input:focus { box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.14); }
.field.invalid .control svg { stroke: var(--danger); }
.err { display: none; margin-top: 5px; color: var(--danger); font-size: 12.5px; }
.field.invalid .err { display: block; }
.hint { margin-top: 5px; color: var(--muted); font-size: 12.5px; }
.field.invalid .hint { display: none; }

.submit {
  width: 100%;
  margin-top: 6px;
  padding: 14px 18px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  box-shadow: 0 10px 22px rgba(15, 107, 74, 0.32);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}
.submit:hover { filter: brightness(1.05); transform: translateY(-1px); }
.submit:active { transform: translateY(0); }
.submit:disabled { cursor: progress; opacity: 0.8; transform: none; }
.spinner {
  display: none;
  width: 18px; height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.submit.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.alert {
  display: none;
  margin-bottom: 16px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  background: #fdecea;
  color: var(--danger);
  border: 1px solid #f5c6c2;
}
.alert.show { display: block; }

.privacy { margin: 14px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }

/* success state */
.success { display: none; text-align: center; padding: 18px 8px 6px; }
.success.show { display: block; animation: rise 0.35s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.check {
  width: 76px; height: 76px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #e4f5ec;
  display: grid; place-items: center;
}
.check svg { width: 40px; height: 40px; stroke: var(--green-700); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.success h2 { margin: 0 0 8px; font-size: 22px; color: var(--green-900); }
.success p { margin: 0 auto 18px; max-width: 400px; color: var(--muted); line-height: 1.5; }
.success .next {
  text-align: left;
  background: #f4f8f6;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px 14px 36px;
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.7;
}
.success .again {
  background: none; border: 0; padding: 0;
  color: var(--green-700); font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: underline;
}

.foot { text-align: center; color: rgba(255, 255, 255, 0.75); font-size: 12.5px; margin-top: 18px; }
.foot a { color: #fff; }

@media (max-width: 560px) {
  body { padding: 20px 12px 40px; }
  .panel-head { padding: 24px 22px 22px; }
  .panel-head h1 { font-size: 22px; }
  .panel-body { padding: 22px 20px 26px; }
  .grid { grid-template-columns: 1fr; }
}
