:root {
  --navy: #0c1524;
  --navy-2: #162238;
  --blue: #16548a;
  --blue-light: #2f7bc2;
  --ink: #0c1524;
  --paper: #ffffff;
  --line: #d5e0ea;
  --muted: #5d6b7c;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --radius: 14px;
  --font: "Plus Jakarta Sans", "Noto Sans Thai", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--navy);
  color: var(--ink);
  font-family: var(--font);
}

body {
  min-height: 100vh;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.94);
}

.topbar__logo {
  height: 32px;
  width: auto;
  display: block;
}

.topbar__divider {
  width: 1px;
  height: 24px;
  background: var(--line);
}

.topbar__product {
  font-weight: 600;
  font-size: 14px;
  color: var(--navy-2);
  letter-spacing: 0.01em;
}

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 56px 24px 64px;
  align-items: start;
}

.intro {
  color: #eaf2f8;
  padding-top: 8px;
}

.intro__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
  color: #7fb4e6;
  margin: 0 0 12px;
}

.intro__title {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.25;
  margin: 0 0 16px;
  font-weight: 800;
  color: #ffffff;
}

.intro__text {
  font-size: 16px;
  line-height: 1.7;
  color: #c5d5e6;
  margin: 0 0 20px;
}

.intro__points {
  margin: 0 0 24px;
  padding-left: 20px;
  color: #dce8f4;
  font-size: 15px;
  line-height: 1.9;
}

.intro__note {
  font-size: 14px;
  color: #9db0c3;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
}

.formcard {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  padding: 28px;
  position: relative;
}

.rform__title {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--navy-2);
}

.field {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-row .field {
  margin-bottom: 16px;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-2);
}

.req {
  color: var(--danger);
}

input, select, textarea {
  font-family: var(--font);
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fbfdff;
  color: var(--ink);
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(47, 123, 194, 0.18);
}

textarea {
  resize: vertical;
  min-height: 64px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 20px;
  line-height: 1.5;
}

.consent input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.btn {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: none;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.btn--primary {
  background: var(--blue);
  color: #ffffff;
}

.btn--primary:hover { background: var(--blue-light); }

.btn--primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn--secondary {
  background: rgba(22, 84, 138, 0.08);
  color: var(--blue);
  width: auto;
  padding: 10px 18px;
}

.btn__spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

.form-error {
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  margin: 0 0 16px;
}

.state {
  text-align: center;
  padding: 24px 8px;
}

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

.state__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-2);
  margin: 0 0 8px;
}

.state__text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 16px;
}

.state__hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}

.spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--blue);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.pagefooter {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: #7f8fa1;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 32px 18px 48px;
    gap: 28px;
  }
  .intro { order: 1; }
  .formcard { order: 2; }
  .field-row { grid-template-columns: 1fr; }
}
