/* ─────────────────────────────────────────────────────────────
   FULL CIRCLE FUNDING SOLUTIONS — Form Styles
   Aesthetic: Refined luxury, dark with gold accents
   ───────────────────────────────────────────────────────────── */

:root {
  --gold:        #2d6b4f;
  --gold-light:  #4a8f6e;
  --gold-dim:    #1a4532;
  --gold-subtle: rgba(45,107,79,0.07);
  --ink:         #f8f7f4;
  --surface:     #ffffff;
  --surface-2:   #f8f7f4;
  --surface-3:   #f0ede8;
  --surface-4:   #e8e4de;
  --border:      #ddd9d3;
  --border-glow: rgba(45,107,79,0.18);
  --text:        #1a1a1a;
  --text-muted:  #5a5752;
  --text-dim:    #9a9490;
  --red:         #c0392b;
  --red-subtle:  rgba(192,57,43,0.09);
  --green:       #2d6b4f;
  --radius:      9px;
  --radius-lg:   15px;
  --radius-xl:   20px;
  --font-display: 'Cormorant Garamond', serif;
  --font-body:    'Jost', sans-serif;
  --shadow:       0 8px 40px rgba(0,0,0,0.10);
  --shadow-gold:  0 0 0 1px rgba(45,107,79,0.18), 0 4px 24px rgba(45,107,79,0.08);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,0.7);
  --transition:   0.22s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Ambient background depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% -8%, rgba(45,107,79,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 35% at 50% 108%, rgba(45,107,79,0.03) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── HEADER ───────────────────────────────────────────────────── */
.site-header {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, var(--ink) 100%);
  padding: 28px 20px 24px;
  text-align: center;
  z-index: 2;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(45,107,79,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(45,107,79,0.3) 25%, var(--gold) 50%, rgba(45,107,79,0.3) 75%, transparent 100%);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.logo-mark svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 0 16px rgba(45,107,79,0.30)) drop-shadow(0 0 5px rgba(45,107,79,0.18));
  animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 16px rgba(45,107,79,0.30)) drop-shadow(0 0 5px rgba(45,107,79,0.18)); }
  50%       { filter: drop-shadow(0 0 24px rgba(45,107,79,0.45)) drop-shadow(0 0 10px rgba(45,107,79,0.25)); }
}

.header-text h1 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
}

.tagline {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 300;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.3px;
}

/* ── PROGRESS ─────────────────────────────────────────────────── */
.progress-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248,247,244,0.97);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  padding: 16px 20px 0;
  border-bottom: 1px solid rgba(221,217,211,0.9);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 14px;
  position: relative;
}

/* Connector line between steps */
.progress-steps::before {
  content: '';
  position: absolute;
  top: 9px;
  left: calc(12.5% + 6px);
  right: calc(12.5% + 6px);
  height: 1px;
  background: var(--border);
  z-index: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  cursor: default;
  position: relative;
  z-index: 1;
}

.step-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1.5px solid var(--border);
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step.active .step-dot {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(45,107,79,0.15), 0 0 12px rgba(45,107,79,0.45);
  animation: stepPulse 2.2s ease-in-out infinite;
}

.step.done .step-dot {
  background: var(--gold-dim);
  border-color: var(--gold-dim);
  box-shadow: 0 0 6px rgba(45,107,79,0.18);
}

/* Checkmark for completed steps */
.step.done .step-dot::after {
  content: '';
  display: block;
  width: 5px;
  height: 8px;
  border: 1.5px solid rgba(255,255,255,0.7);
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(45,107,79,0.15), 0 0 12px rgba(45,107,79,0.45); }
  50%       { box-shadow: 0 0 0 5px rgba(45,107,79,0.07), 0 0 20px rgba(45,107,79,0.28); }
}

.step span {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  text-transform: uppercase;
  transition: color var(--transition);
  white-space: nowrap;
}

.step.active span { color: var(--gold); }
.step.done span   { color: var(--text-muted); }

.progress-bar {
  height: 2px;
  background: var(--surface-3);
  position: relative;
  overflow: visible;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim) 0%, var(--gold) 60%, var(--gold-light) 100%);
  transition: width 0.55s cubic-bezier(0.4,0,0.2,1);
  width: 0%;
  box-shadow: 0 0 10px rgba(45,107,79,0.35);
  position: relative;
}

/* Bright leading edge on progress */
.progress-fill::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -3px;
  width: 7px;
  height: 7px;
  background: var(--gold-light);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--gold-light), 0 0 4px var(--gold);
  opacity: 0.9;
}

/* ── FORM CONTAINER ───────────────────────────────────────────── */
.form-container {
  max-width: 580px;
  margin: 0 auto;
  padding: 0 20px 100px;
  position: relative;
  z-index: 1;
}

/* ── FORM SECTIONS ────────────────────────────────────────────── */
.form-section {
  display: none;
  animation: fadeSlide 0.38s cubic-bezier(0.4,0,0.2,1) forwards;
}

.form-section.active { display: block; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── SECTION HEADER ───────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 36px 0 26px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  position: relative;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.section-number {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 300;
  color: var(--gold-dim);
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.45;
  letter-spacing: -2px;
  margin-top: -4px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: 0.2px;
}

.section-header p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.2px;
}

/* ── SUBSECTION ───────────────────────────────────────────────── */
.subsection-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin: 32px 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.85;
}

.subsection-label::before {
  content: '';
  display: block;
  width: 22px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
  opacity: 0.7;
}

.subsection-label::after {
  content: '';
  display: block;
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(45,107,79,0.14), transparent);
}

.subsection-note {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.3px;
  text-transform: none;
  opacity: 0.7;
}

/* ── FIELD GRID ───────────────────────────────────────────────── */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field.span-2 { grid-column: 1 / -1; }

/* ── LABELS ───────────────────────────────────────────────────── */
label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  user-select: none;
}

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

/* ── INPUTS ───────────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  padding: 13px 15px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  -webkit-appearance: none;
  appearance: none;
  min-height: 48px;
  box-shadow: var(--shadow-inset);
}

input:hover:not(:focus):not(.error),
select:hover:not(:focus):not(.error),
textarea:hover:not(:focus):not(.error) {
  border-color: #c8c4be;
  background: #f4f1ec;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold-dim);
  background: var(--surface-3);
  box-shadow: var(--shadow-gold), var(--shadow-inset);
}

input::placeholder { color: var(--text-dim); font-size: 13px; font-weight: 400; }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6660' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 38px;
  cursor: pointer;
}

select option { background: var(--surface-3); color: var(--text); }

textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.55;
}

/* Error state */
input.error, select.error, textarea.error {
  border-color: var(--red);
  background: #fdf4f3;
  box-shadow: 0 0 0 1px rgba(192,57,43,0.15), var(--shadow-inset);
  animation: shakeError 0.4s ease;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-4px); }
  40%       { transform: translateX(4px); }
  60%       { transform: translateX(-3px); }
  80%       { transform: translateX(3px); }
}

/* ── INPUT PREFIX ($) ─────────────────────────────────────────── */
.input-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix .prefix {
  position: absolute;
  left: 15px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
  z-index: 1;
  opacity: 0.8;
}

.input-prefix input { padding-left: 30px; }

/* ── CONDITIONAL FIELDS ───────────────────────────────────────── */
.conditional-field {
  overflow: hidden;
  transition: opacity 0.3s;
}

/* ── AGREEMENT ────────────────────────────────────────────────── */
.agreement-scroll {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-height: 400px;
  overflow-y: auto;
  padding: 26px;
  margin-bottom: 20px;
  scroll-behavior: smooth;
  box-shadow: var(--shadow-inset);
}

.agreement-scroll::-webkit-scrollbar { width: 5px; }
.agreement-scroll::-webkit-scrollbar-track { background: var(--surface-2); }
.agreement-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-dim), rgba(26,69,50,0.4));
  border-radius: 3px;
}

.agreement-text h3 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 22px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.agreement-text h4 {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 20px 0 9px;
  padding-left: 10px;
  border-left: 2px solid var(--gold-dim);
}

.agreement-text p,
.agreement-text li {
  font-size: 13px;
  color: #a8a49e;
  line-height: 1.75;
  margin-bottom: 8px;
}

.agreement-text strong {
  color: var(--text-muted);
  font-weight: 600;
}

.agreement-text ul {
  padding-left: 18px;
  margin-bottom: 12px;
}

.agreement-text li { margin-bottom: 6px; }
.agreement-text ul li::marker { color: var(--gold-dim); }

/* ── READ INDICATOR ───────────────────────────────────────────── */
.read-indicator {
  background: var(--surface-3);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease, box-shadow 0.3s ease;
}

.read-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(45,107,79,0.12), rgba(45,107,79,0.04));
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 0 14px rgba(45,107,79,0.12);
}

.read-indicator > p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
  letter-spacing: 0.2px;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--text);
  font-weight: 400;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

.checkbox-label:hover {
  background: var(--gold-subtle);
  border-color: rgba(45,107,79,0.12);
}

.checkbox-label input[type="checkbox"] { display: none; }

.checkmark {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 1.5px solid var(--gold-dim);
  border-radius: 5px;
  background: var(--surface-2);
  position: relative;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  margin-top: 1px;
  box-shadow: var(--shadow-inset);
}

.checkbox-label input:checked + .checkmark {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(45,107,79,0.30);
}

.checkbox-label input:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: 2px solid #ffffff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* ── SIGNATURE BLOCK ──────────────────────────────────────────── */
.signature-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-inset);
}

.sig-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-3);
}

.sig-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sig-clear {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 30px;
}

.sig-clear:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: var(--gold-subtle);
}

.canvas-wrapper {
  position: relative;
  background: #fefefe;
  touch-action: none;
}

/* Signature baseline (dashed line) */
.canvas-wrapper::after {
  content: '';
  position: absolute;
  bottom: 38px;
  left: 24px;
  right: 24px;
  height: 1px;
  background: repeating-linear-gradient(90deg, #ccc8c2 0, #ccc8c2 4px, transparent 4px, transparent 10px);
  pointer-events: none;
}

#signatureCanvas {
  display: block;
  width: 100%;
  height: 180px;
  cursor: crosshair;
}

.sig-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  color: #c5c0ba;
  pointer-events: none;
  transition: opacity 0.3s ease;
  letter-spacing: 0.5px;
}

.sig-placeholder.hidden { opacity: 0; }

.sig-footer {
  padding: 10px 18px;
  border-top: 1px solid #e8e4de;
  background: #f6f4f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sig-footer::before {
  content: '';
  display: block;
  width: 14px;
  height: 1px;
  background: #c0bcb6;
  flex-shrink: 0;
}

.sig-notice {
  font-size: 11px;
  color: #8a8680;
  letter-spacing: 0.3px;
}

/* ── CERTIFICATION BLOCK ──────────────────────────────────────── */
.certification-block {
  background: var(--surface-3);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
  box-shadow: var(--shadow-inset);
}

.cert-icon {
  font-size: 20px;
  flex-shrink: 0;
  color: var(--gold);
  line-height: 1.5;
  opacity: 0.75;
}

.certification-block p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ── NAV BUTTONS ──────────────────────────────────────────────── */
.nav-buttons {
  display: flex;
  gap: 12px;
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  padding: 15px 22px;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.4,0,0.2,1);
  -webkit-tap-highlight-color: transparent;
  min-height: 50px;
  position: relative;
  overflow: hidden;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-next, .btn-submit {
  flex: 1;
  background: linear-gradient(135deg, var(--gold-dim) 0%, var(--gold) 55%, var(--gold-light) 130%);
  color: #ffffff;
}

/* Shimmer on hover */
.btn-next::after, .btn-submit::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transition: left 0.5s ease;
  transform: skewX(-15deg);
}

.btn-next:hover::after, .btn-submit:hover::after { left: 150%; }

.btn-next:hover, .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(45,107,79,0.35), 0 2px 8px rgba(0,0,0,0.12);
}

.btn-next:active, .btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(45,107,79,0.18);
}

.btn-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-next:disabled::after { display: none; }

.btn-back {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  flex: 0 0 auto;
  padding: 15px 18px;
  box-shadow: var(--shadow-inset);
}

.btn-back:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: var(--surface-3);
}

.btn-submit {
  position: relative;
  overflow: hidden;
  min-height: 50px;
}

/* ── SPINNER ──────────────────────────────────────────────────── */
.submit-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

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

/* ── OVERLAYS ─────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(248,247,244,0.85);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.overlay-card {
  background: var(--surface-2);
  border: 1px solid rgba(45,107,79,0.22);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  max-width: 390px;
  width: 100%;
  text-align: center;
  animation: scaleIn 0.45s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 0 0 1px rgba(45,107,79,0.06), 0 24px 80px rgba(0,0,0,0.12);
  position: relative;
  overflow: hidden;
}

/* Gold top edge accent */
.overlay-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.7;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.82) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.overlay-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 22px;
  position: relative;
}

.overlay-icon::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45,107,79,0.10) 0%, transparent 70%);
}

.overlay-icon svg { width: 100%; height: 100%; }

.overlay-card h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: 0.3px;
}

.overlay-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 12px;
}

.ref-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 26px !important;
  margin-bottom: 8px !important;
}

.ref-number {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 5px;
  text-shadow: 0 0 20px rgba(45,107,79,0.25);
}

.overlay-note {
  font-size: 11px !important;
  color: var(--text-dim) !important;
  margin-top: 10px !important;
}

/* ── RESPONSIVE: SMALL MOBILE ─────────────────────────────────── */
@media (max-width: 420px) {
  .field-grid { grid-template-columns: 1fr; }
  .field.half { grid-column: auto; }
  .field.span-2 { grid-column: auto; }
  .section-number { font-size: 40px; }
  .section-header h2 { font-size: 26px; }
  .form-container { padding: 0 16px 80px; }
  .btn { padding: 15px 14px; font-size: 10.5px; }
}

@media (min-width: 421px) and (max-width: 560px) {
  .field.span-2 { grid-column: 1 / -1; }
}

/* ── SCROLLBAR ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--surface-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ── DATE INPUT ───────────────────────────────────────────────── */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.3) sepia(0.5) saturate(3) hue-rotate(100deg);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--transition);
}

input[type="date"]:hover::-webkit-calendar-picker-indicator,
input[type="date"]:focus::-webkit-calendar-picker-indicator {
  opacity: 1;
}

/* ── TOAST ────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── FIELD ERROR ──────────────────────────────────────────────── */
.field-error {
  color: var(--red);
  font-size: 11px;
  margin-top: 3px;
  display: block;
  letter-spacing: 0.2px;
}