/* ============================================================
   FTI CEO Registration Form — Premium Apple-style redesign
   Dark navy + gold theme. No blur. No particles.
   ============================================================ */

/* ---------- FONTS ---------- */
@font-face { font-family: 'Degular'; src: url('../assets/fonts/Degular-Semibold.otf') format('opentype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Degular'; src: url('../assets/fonts/Degular-Black.otf')    format('opentype'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Anuphan'; src: url('../assets/fonts/Anuphan-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Anuphan'; src: url('../assets/fonts/Anuphan-Medium.ttf')  format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Anuphan'; src: url('../assets/fonts/Anuphan-Bold.ttf')    format('truetype'); font-weight: 700; font-display: swap; }

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Surfaces */
  --bg-void:           #050816;
  --bg-deep:           #0A0E27;
  --card-bg:           rgba(255,255,255,0.03);
  --card-bg-strong:    rgba(255,255,255,0.05);
  --card-border:       rgba(212,175,55,0.15);

  /* Inputs */
  --input-bg:          rgba(255,255,255,0.05);
  --input-bg-focus:    rgba(212,175,55,0.05);
  --input-border:      rgba(255,255,255,0.12);
  --input-border-hover:rgba(255,255,255,0.22);
  --input-border-focus:rgba(212,175,55,0.6);
  --input-shadow-focus:0 0 0 3px rgba(212,175,55,0.10);

  /* Text */
  --text-90:           rgba(255,255,255,0.92);
  --text-70:           rgba(255,255,255,0.70);
  --text-60:           rgba(255,255,255,0.60);
  --text-40:           rgba(255,255,255,0.40);
  --text-20:           rgba(255,255,255,0.20);

  /* Brand */
  --gold-100:          #F5E6A8;
  --gold-300:          #E8C547;
  --gold-500:          #D4AF37;
  --gold-700:          #A8841D;

  /* States */
  --red:               #FF5C5C;
  --green:             #4ADE80;

  /* Typography */
  --font-sans:         'Degular', 'Anuphan', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-thai:         'Anuphan', system-ui, sans-serif;

  /* Radii */
  --r-sm:              8px;
  --r-md:              12px;
  --r-lg:              16px;
  --r-xl:              20px;

  /* Motion */
  --ease:              cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:            150ms ease;
  --t-base:            200ms ease;
}

/* ---------- RESET & BASE ---------- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-thai);
  background: var(--bg-deep);
  color: var(--text-90);
  line-height: 1.55;
  min-height: 100vh;
  padding-bottom: 64px;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: var(--gold-300); }
:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 2px; }
ul { list-style: none; }


/* ---------- HEADER ---------- */
.reg-header {
  background: linear-gradient(180deg, var(--bg-void), var(--bg-deep));
  padding: 32px 24px 40px;
  text-align: center;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.reg-header-inner { max-width: 720px; margin: 0 auto; }
.back-link {
  position: absolute;
  top: 28px; left: 24px;
  font-size: 13px;
  color: var(--text-60);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--t-fast);
}
.back-link:hover { color: var(--gold-300); }
.reg-logo {
  width: clamp(160px, 22vw, 220px);
  margin: 0 auto 18px;
  display: block;
  filter: drop-shadow(0 0 24px rgba(212,175,55,0.25));
}
.reg-header h1 {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.015em;
  margin-bottom: 6px;
  color: var(--text-90);
}
.reg-header h1 em {
  font-style: italic;
  font-weight: 600;
  color: var(--gold-300);
}
.reg-subtitle {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--gold-300);
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.85;
}


/* ============================================================
   PROGRESS BAR — thin, elegant, with dot indicators
   ============================================================ */
.progress-nav {
  max-width: 720px;
  margin: 36px auto 28px;
  padding: 0 24px;
}
.progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 8px;
  position: relative;
}
.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-40);
  font-size: 11px;
  text-align: center;
  transition: color var(--t-base);
}
.step-num {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-20);
  display: block;
  position: relative;
  transition: all var(--t-base) var(--ease);
  font-size: 0;        /* hide the number text — we use dot only */
}
.step.is-active {
  color: var(--gold-300);
}
.step.is-active .step-num {
  background: var(--gold-500);
  width: 10px; height: 10px;
  box-shadow: 0 0 0 4px rgba(212,175,55,0.15);
}
.step.is-done {
  color: var(--text-60);
}
.step.is-done .step-num {
  background: var(--gold-500);
  opacity: 0.6;
}
.step.is-done .step-num::before {
  content: '✓';
  position: absolute;
  inset: 0;
  font-size: 7px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-deep);
}
.step-label {
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.progress-bar {
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 9999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-100));
  border-radius: inherit;
  transition: width 0.45s var(--ease);
}


/* ============================================================
   FORM CARD CONTAINER
   ============================================================ */
.reg-form {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.form-section {
  display: none;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  padding: 40px;
  animation: section-in 0.35s var(--ease);
}
.form-section.is-active { display: block; }

@keyframes section-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ---------- SECTION HEADER ---------- */
.section-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid;
  border-image: linear-gradient(90deg, var(--gold-500), transparent) 1;
}
.section-num {
  display: block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--gold-300);
  margin-bottom: 4px;
}
.section-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--text-90);
}


/* ============================================================
   FIELD-GROUP — flexbox-based, predictable alignment
   ============================================================ */
.field-group {
  display: flex;
  flex-direction: column;        /* mobile: stack */
  gap: 16px;
}
/* Spacing between TOP-LEVEL siblings only (direct children of section).
   Restricted to `.form-section > X + Y` so it doesn't apply to .field+.field
   INSIDE a field-group, which would push the right column down by 20px. */
.form-section > .field-group + .field-group,
.form-section > .field-group + .field,
.form-section > .field + .field-group,
.form-section > .field + .field { margin-top: 20px; }

@media (min-width: 520px) {
  .field-group {
    flex-direction: row;
    align-items: flex-start;     /* anchor every field to TOP */
    gap: 16px;
  }
}

/* Width variants */
.field-group--1-2 .field:first-child { flex: 0.7 1 0; }
.field-group--1-2 .field:last-child  { flex: 2.3 1 0; }
.field-group--3   .field             { flex: 1 1 0; }


/* ============================================================
   FIELDS
   ============================================================ */
/* ============================================================
   FIELD — exact-height structure
   label 20 + (margin 8) + input 52 + (margin 4) + err 16 = 100px
   Every field is EXACTLY this height — alignment guaranteed.
   ============================================================ */
.field {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;                /* equal share inside .field-group */
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.field .label,
.repeater > .label {
  display: block;
  height: 20px;
  line-height: 20px;
  margin: 0 0 8px;            /* exactly 8px gap below label */
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-60);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.field .label em {
  font-style: normal;
  color: var(--gold-300);
  margin-left: 3px;
  font-weight: 600;
}
.field .label .hint {
  font-style: normal;
  font-weight: 400;
  color: var(--text-40);
  margin-left: 6px;
  font-size: 0.9em;
}
/* Inputs */
.field input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.field select,
.field textarea {
  font: inherit;
  font-size: 15px;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  background: var(--input-bg);
  color: var(--text-90);
  border: 1px solid var(--input-border);
  border-radius: var(--r-md);
  transition: border-color var(--t-base), background var(--t-base), box-shadow var(--t-base);
}
.field input:hover:not(:focus),
.field select:hover:not(:focus),
.field textarea:hover:not(:focus) {
  border-color: var(--input-border-hover);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--input-border-focus);
  background: var(--input-bg-focus);
  box-shadow: var(--input-shadow-focus);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-40); }

/* Textarea — flexible height */
.field textarea {
  height: auto;
  min-height: 96px;
  padding: 14px 16px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

/* Select — caret */
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23E8C547' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 42px;
}

/* Number — hide native spinner buttons (Apple-style clean look) */
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
  margin: 0;
}


/* ============================================================
   DATE PICKER — 3 select boxes (วัน / เดือน / ปี)
   ============================================================ */
.date-picker {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 10px;
}
.date-picker select {
  /* Inherit the standard input/select styling — no need to repeat .field select rules.
     The base .field select gives us the gold caret + 52px height + proper padding. */
  font: inherit;
  font-size: 15px;
  width: 100%;
  height: 52px;
  padding: 0 38px 0 16px;
  background: var(--input-bg);
  color: var(--text-90);
  border: 1px solid var(--input-border);
  border-radius: var(--r-md);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23E8C547' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color var(--t-base), background-color var(--t-base), box-shadow var(--t-base);
}
.date-picker select:hover { border-color: var(--input-border-hover); }
.date-picker select:focus {
  outline: none;
  border-color: var(--input-border-focus);
  background-color: var(--input-bg-focus);
  box-shadow: var(--input-shadow-focus);
}
.field.is-error .date-picker select { border-color: rgba(255, 80, 80, 0.6); }

/* Error state */
.field.is-error input,
.field.is-error select,
.field.is-error textarea {
  border-color: rgba(255, 80, 80, 0.6);
  background: rgba(255, 80, 80, 0.05);
}
.field .err {
  /* HIDDEN BY DEFAULT — only show when field has .is-error.
     `:empty` selector is unreliable (browsers treat whitespace differently)
     so we use a deterministic class-based toggle instead. */
  display: none;
  font-size: 12px;
  color: var(--red);
  font-weight: 500;
  line-height: 1.3;
}
.field.is-error .err { display: block; padding-top: 2px; }


/* ============================================================
   CUSTOM RADIO (เพศ) + multi-CHECKBOX (รู้จักจาก)
   Both render legend on its own row, then items inline-horizontal.
   ============================================================ */
.field-radio, .field-checks, .field-confirm {
  border: none;
  padding: 0;
}
/* Force HORIZONTAL flow for radio + multi-checkbox groups.
   Override the parent `.field { flex-direction: column }` that would
   otherwise stack each option on its own line. */
.field-radio,
.field-checks {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;            /* row gap, column gap */
}
.field-radio legend,
.field-checks legend {
  flex-basis: 100%;          /* legend takes its own row */
  font-size: 13px;
  font-weight: 500;
  color: var(--text-60);
  margin: 0;
  letter-spacing: 0.02em;
}
/* Error message inside radio group keeps its own row */
.field-radio .err,
.field-checks .err {
  flex-basis: 100%;
}

.field-radio .radio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;                 /* reset — using gap on parent */
  cursor: pointer;
  font-size: 15px;
  color: var(--text-90);
  user-select: none;
}
.field-radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border: 1.5px solid var(--input-border);
  border-radius: 50%;
  background: var(--input-bg);
  cursor: pointer;
  transition: all var(--t-base);
  position: relative;
  flex-shrink: 0;
}
.field-radio input[type="radio"]:hover { border-color: var(--input-border-hover); }
.field-radio input[type="radio"]:checked {
  border-color: var(--gold-500);
  background: var(--input-bg-focus);
}
.field-radio input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--gold-500);
}
.field-radio input[type="radio"]:focus-visible {
  box-shadow: var(--input-shadow-focus);
  outline: none;
}


/* ============================================================
   CUSTOM CHECKBOX
   ============================================================ */
.check {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;                 /* reset — parent uses gap */
  cursor: pointer;
  font-size: 14px;
  color: var(--text-90);
  user-select: none;
  line-height: 1.5;
}
.check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border: 1.5px solid var(--input-border);
  border-radius: 6px;
  background: var(--input-bg);
  cursor: pointer;
  transition: all var(--t-base);
  position: relative;
  flex-shrink: 0;
  margin-top: 1px;
}
.check input[type="checkbox"]:hover { border-color: var(--input-border-hover); }
.check input[type="checkbox"]:checked {
  background: var(--gold-500);
  border-color: var(--gold-500);
}
.check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid var(--bg-deep);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.check input[type="checkbox"]:focus-visible {
  box-shadow: var(--input-shadow-focus);
  outline: none;
}

/* Confirm checkboxes — full-width rows */
.field-confirm { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.field-confirm .check {
  display: flex;
  margin: 0;
  padding: 14px 16px;
  background: var(--card-bg-strong);
  border: 1px solid var(--input-border);
  border-radius: var(--r-md);
  transition: border-color var(--t-base);
}
.field-confirm .check:has(:checked) {
  border-color: rgba(212,175,55,0.4);
  background: rgba(212,175,55,0.05);
}
.link-pdpa {
  color: var(--gold-300);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  margin-left: 6px;
}


/* ============================================================
   FILE UPLOAD — drag & drop zone
   ============================================================ */
.field-file { gap: 8px; }
.file-dropzone {
  display: block;
  border: 2px dashed rgba(212,175,55,0.3);
  border-radius: var(--r-lg);
  padding: 28px 20px;
  background: rgba(212,175,55,0.03);
  cursor: pointer;
  transition: all var(--t-base);
  text-align: center;
}
.file-dropzone:hover,
.file-dropzone.is-dragover {
  border-color: var(--gold-500);
  background: rgba(212,175,55,0.08);
}
.file-dropzone input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.dropzone-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-70);
  font-size: 14px;
}
.dropzone-prompt svg {
  width: 32px; height: 32px;
  color: var(--gold-300);
  opacity: 0.8;
}
.dropzone-prompt .strong { color: var(--text-90); font-weight: 500; }
.dropzone-prompt .hint { color: var(--text-40); font-size: 12px; }

.dropzone-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px;
}
.dropzone-file .file-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex: 1;
  min-width: 0;
}
.dropzone-file .file-name {
  font-weight: 500;
  color: var(--text-90);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropzone-file .file-size {
  font-size: 12px;
  color: var(--text-40);
  margin-top: 2px;
}
.file-clear {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255, 92, 92, 0.1);
  color: var(--red);
  border: 1px solid rgba(255, 92, 92, 0.25);
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  transition: all var(--t-fast);
}
.file-clear:hover {
  background: var(--red);
  color: #fff;
}


/* ============================================================
   PAYMENT CARD (static info)
   ============================================================ */
.payment-card {
  margin: 28px 0 24px;
  padding: 28px;
  background: rgba(212,175,55,0.05);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: var(--r-lg);
}
.payment-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.payment-head svg {
  width: 28px; height: 28px;
  color: var(--gold-300);
  flex-shrink: 0;
}
.payment-head h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-90);
  letter-spacing: -0.005em;
}
.payment-fee {
  font-size: 1rem;
  margin-bottom: 20px;
  color: var(--text-70);
}
.payment-fee strong {
  font-size: 1.25em;
  color: var(--gold-300);
  font-weight: 600;
}

.payment-bank {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 20px;
  font-size: 14px;
  padding: 18px;
  background: rgba(0,0,0,0.25);
  border-radius: var(--r-md);
}
.payment-bank dt {
  font-weight: 500;
  color: var(--text-60);
  letter-spacing: 0.01em;
}
.payment-bank dd { color: var(--text-90); }
.payment-bank dd.acct-no {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.05em;
  color: var(--gold-300);
}

.payment-note-tax {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}
.payment-note-tax strong { color: rgba(255, 255, 255, 0.85); }

.payment-note {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 12.5px;
  color: var(--text-60);
  line-height: 1.6;
}


/* ============================================================
   REPEATER — dynamic add/remove rows
   ============================================================ */
.repeater {
  margin-bottom: 24px;
}
.repeater > .label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-60);
  letter-spacing: 0.02em;
}
.repeater-list { display: flex; flex-direction: column; gap: 10px; }
.repeater-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}
/* Single-input repeaters (e.g. referrers — name only, no relation) */
.repeater--single .repeater-row {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 12px;
  background: var(--card-bg-strong);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-md);
  transition: border-color var(--t-base);
}
.repeater-row:focus-within {
  border-color: rgba(212,175,55,0.3);
}
.repeater-row input {
  font: inherit;
  font-size: 14px;
  height: 42px;
  padding: 0 12px;
  background: var(--input-bg);
  color: var(--text-90);
  border: 1px solid var(--input-border);
  border-radius: var(--r-sm);
  transition: border-color var(--t-base), background var(--t-base);
}
.repeater-row input:focus {
  outline: none;
  border-color: var(--input-border-focus);
  background: var(--input-bg-focus);
}
.row-remove {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 92, 92, 0.08);
  color: var(--red);
  border: 1px solid rgba(255, 92, 92, 0.2);
  font-size: 18px;
  line-height: 1;
  transition: all var(--t-fast);
}
.row-remove:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.row-add {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1.5px dashed rgba(212,175,55,0.35);
  color: var(--gold-300);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all var(--t-base);
}
.row-add:hover {
  background: rgba(212,175,55,0.06);
  border-color: var(--gold-500);
  color: var(--gold-100);
}


/* ============================================================
   SUBSECTION (e.g. ผู้ประสานงาน)
   ============================================================ */
.subsection-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--gold-300);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 28px 0 14px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}


/* ============================================================
   BUTTONS
   ============================================================ */
.btn-gold, .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  border-radius: var(--r-md);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--t-base);
  white-space: nowrap;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-300), var(--gold-500));
  background-size: 200% 100%;
  color: var(--bg-deep);
  border: 1px solid var(--gold-500);
}
.btn-gold:hover:not(:disabled) {
  background-position: 100% 0;
  box-shadow: 0 6px 24px rgba(212,175,55,0.35);
  transform: translateY(-1px);
}
.btn-gold:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(212,175,55,0.25);
}
.btn-gold:disabled {
  background: var(--input-bg);
  color: var(--text-40);
  border-color: var(--input-border);
  cursor: not-allowed;
}

.btn-outline {
  background: transparent;
  color: var(--gold-300);
  border: 1px solid var(--gold-500);
}
.btn-outline:hover {
  background: rgba(212,175,55,0.08);
  color: var(--gold-100);
}
.btn-outline:active { background: rgba(212,175,55,0.12); }

/* Submit btn — slightly more prominent */
.btn-submit { padding: 0 36px; }

.form-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 36px;
  gap: 12px;
  flex-wrap: wrap;
}
/* When only one button (first section) push it to the right */
.form-nav > :only-child { margin-left: auto; }


/* ============================================================
   RESULT PAGES
   ============================================================ */
.result-page {
  max-width: 540px;
  margin: 80px auto;
  padding: 0 24px;
  text-align: center;
}
.result-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  padding: 48px 36px;
}
.result-icon {
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-icon svg { width: 36px; height: 36px; }
.result-icon.success {
  background: rgba(74, 222, 128, 0.12);
  color: var(--green);
}
.result-icon.error {
  background: rgba(255, 92, 92, 0.12);
  color: var(--red);
}
.result-card h2 {
  font-family: var(--font-sans);
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.result-card p {
  color: var(--text-70);
  margin-bottom: 28px;
  font-size: 0.95rem;
  line-height: 1.65;
}


/* ============================================================
   PDPA MODAL — NO backdrop-filter (Chrome perf)
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 22, 0.92);
}
.modal-content {
  position: relative;
  background: var(--bg-deep);
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.modal-content h2 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold-300);
  padding: 24px 64px 18px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.modal-body {
  padding: 22px 28px 28px;
  overflow-y: auto;
  font-size: 0.93rem;
  color: var(--text-90);
}
.modal-body h3 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold-300);
  margin: 20px 0 8px;
}
.modal-body p, .modal-body ul {
  margin-bottom: 12px;
  color: var(--text-70);
  line-height: 1.65;
}
.modal-body ul { padding-left: 20px; }
.modal-body li { margin-bottom: 4px; }
.modal-footer-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-40);
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-60);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: all var(--t-fast);
}
.modal-close:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-90);
}


/* ============================================================
   LOADING OVERLAY
   ============================================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(5, 8, 22, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.loading-overlay p {
  font-weight: 500;
  color: var(--gold-300);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.spinner {
  width: 56px; height: 56px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--gold-500);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 639px) {
  .reg-header { padding: 24px 20px 32px; }
  .back-link { top: 22px; left: 18px; font-size: 12px; }
  .progress-nav { padding: 0 18px; }
  .step-label {
    font-size: 10px;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .reg-form { padding: 0 16px; }
  .form-section { padding: 24px 20px; }
  .section-header { margin-bottom: 24px; padding-bottom: 16px; }
  .section-title { font-size: 19px; }
  .form-nav { flex-direction: column-reverse; gap: 10px; }
  .form-nav .btn-gold,
  .form-nav .btn-outline { width: 100%; }
  .payment-card { padding: 20px; }
  .payment-bank { padding: 14px; gap: 8px 12px; font-size: 13px; }
  .payment-bank dd.acct-no { font-size: 16px; }
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
