html, body {
  min-height: 100vh;
  background: var(--zinc-100);
  color: var(--zinc-900);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 16px 48px;
}

.page-wrapper {
  width: 100%;
  max-width: 440px;
}

/* ── Card ── */
.card {
  background: #fff;
  border: 0.5px solid var(--zinc-300);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ── Header ── */
.card-header {
  background: var(--zinc-900);
  padding: 22px 24px 20px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand svg {
  width: 18px;
  height: 18px;
  stroke: rgba(255,255,255,0.75);
}

.brand-name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.03em;
}

/* Client logo in the top-right corner of the card header (verify page) —
   removed by onerror if the file is missing */
.header-logo { height: 36px; width: auto; }

.lang-toggle {
  display: flex;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 4px 11px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.15s;
}

.lang-btn.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.card-title {
  font-size: 20px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 1.45;
}

/* ── Location badge ── */
.location-bar {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--zinc-100);
  border-bottom: 0.5px solid var(--zinc-200);
}

.location-bar.visible { display: flex; }

.location-bar svg {
  width: 12px;
  height: 12px;
  stroke: var(--zinc-600);
  flex-shrink: 0;
}

.location-text {
  font-size: 11px;
  color: var(--zinc-600);
  font-family: 'DM Mono', monospace;
}

.location-time {
  font-size: 11px;
  color: var(--zinc-400);
  font-family: 'DM Mono', monospace;
  margin-left: auto;
}

/* ── Form body ── */
.card-body { padding: 20px 24px 24px; }

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

.field { margin-bottom: 10px; }
.field:last-of-type { margin-bottom: 0; }

label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--zinc-500);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap svg {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  stroke: var(--zinc-400);
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  height: 38px;
  background: var(--zinc-50);
  border: 0.5px solid var(--zinc-200);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--zinc-700);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
}

.input-wrap.has-icon input { padding-left: 32px; }

.input-wrap input:focus {
  border-color: var(--zinc-500);
  background: #fff;
}

.input-wrap input.error { border-color: #ef4444; }
.input-wrap input::placeholder { color: var(--zinc-300); }

.field-error {
  font-size: 11px;
  color: #ef4444;
  margin-top: 4px;
  display: none;
}
.field-error.visible { display: block; }

/* ── Consent box ── */
.consent-box {
  background: var(--zinc-50);
  border: 0.5px solid var(--zinc-200);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 18px;
}

.consent-box.error-state { border-color: #ef4444; }

.consent-text {
  font-size: 11px;
  color: var(--zinc-500);
  line-height: 1.6;
  margin-bottom: 12px;
  max-height: 90px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--zinc-300) transparent;
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

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

.checkbox-custom {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 0.5px solid var(--zinc-300);
  border-radius: 4px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: all 0.15s;
}

.checkbox-custom svg {
  width: 10px;
  height: 10px;
  stroke: #fff;
  opacity: 0;
  transition: opacity 0.1s;
}

.consent-check input:checked + .checkbox-custom {
  background: var(--zinc-900);
  border-color: var(--zinc-900);
}

.consent-check input:checked + .checkbox-custom svg { opacity: 1; }

.consent-label {
  font-size: 12px;
  color: var(--zinc-700);
  line-height: 1.5;
  user-select: none;
}

/* ── Submit ── */
.btn-submit {
  width: 100%;
  height: 44px;
  background: var(--zinc-900);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, transform 0.1s;
  position: relative;
  overflow: hidden;
}

.btn-submit svg { width: 16px; height: 16px; stroke: #fff; flex-shrink: 0; }
/* Client logo pinned to the left edge; icon + text stay centered */
.btn-submit .btn-logo {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  height: 22px;
  width: auto;
}

.btn-submit:hover { background: var(--zinc-800); }
.btn-submit:active { transform: scale(0.99); }
.btn-submit:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  position: absolute;
  right: 16px;
}

.btn-submit.loading .spinner { display: block; }
.btn-submit.loading .btn-text { opacity: 0.5; }

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

/* ── Meta footer ── */
.meta-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.meta-line { height: 0.5px; flex: 1; background: var(--zinc-200); }

.meta-text {
  font-size: 10px;
  color: var(--zinc-400);
  font-family: 'DM Mono', monospace;
  white-space: nowrap;
}

/* ── Error banner ── */
.error-banner {
  display: none;
  background: #fef2f2;
  border: 0.5px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: #b91c1c;
  margin-top: 10px;
  text-align: center;
}
.error-banner.visible { display: block; }
.error-banner.is-duplicate { display: flex; align-items: center; gap: 10px; text-align: left; }
.error-banner.is-duplicate #resend-btn {
  flex-shrink: 0;
  padding: 5px 12px;
  border: 1px solid #b91c1c;
  border-radius: 6px;
  background: transparent;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.error-banner.is-duplicate #resend-btn:disabled { opacity: 0.5; cursor: default; }

/* ── Success screen ── */
.success-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 24px;
}
.success-screen.visible { display: flex; }

.success-icon {
  width: 64px;
  height: 64px;
  border: 0.5px solid var(--zinc-200);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: var(--zinc-50);
  animation: pop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

.success-icon svg { width: 28px; height: 28px; stroke: var(--zinc-700); }

@keyframes pop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.success-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--zinc-900);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.success-sub {
  font-size: 13px;
  color: var(--zinc-500);
  max-width: 260px;
  line-height: 1.5;
}

/* ── Fade in ── */
.card { animation: fadeUp 0.35s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 380px) {
  .field-row { grid-template-columns: 1fr; }
  .card-body { padding: 18px 18px 20px; }
  .card-header { padding: 20px 18px 18px; }
}
