:root {
  background: radial-gradient(circle at top left, #e8f3ff 0, #f5efe4 34%, #fff7ed 100%);
  color: #172018;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --success: #15803d;
  --success-bg: #dcfce7;
  --warning: #b45309;
  --warning-bg: #ffedd5;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.shell {
  display: grid;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding: clamp(0.25rem, 1dvh, 0.75rem);
  place-items: center;
}

.card {
  background: #fffaf1;
  border: 1px solid #dbeafe;
  border-radius: clamp(18px, 3dvh, 28px);
  box-shadow: 0 18px 70px rgba(37, 99, 235, 0.14);
  display: grid;
  max-height: calc(100dvh - clamp(1rem, 4dvh, 2rem));
  max-width: min(100%, 620px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: clamp(1.15rem, 3dvh, 2.25rem);
  width: 100%;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 0.35rem;
  text-transform: uppercase;
}

.project-logo {
  border-radius: 180px;
  display: block;
  max-height: 92px;
  max-width: 220px;
  object-fit: contain;
  width: 100%;
}

.hero-logo {
  margin: 0 auto clamp(0.7rem, 2dvh, 1.25rem);
  height: auto;
  max-height: min(48dvh, 360px);
  max-width: min(100%, 520px);
  object-fit: contain;
  width: 100%;
}

.cover {
  text-align: center;
}

.cover .intro {
  margin-left: auto;
  margin-right: auto;
  max-width: 520px;
}

.cover-actions {
  display: grid;
  gap: clamp(0.45rem, 1.4dvh, 0.75rem);
  margin-top: clamp(0.7rem, 2dvh, 1.4rem);
  margin-left: auto;
  margin-right: auto;
  max-width: min(100%, 48dvh, 520px);
  width: 100%;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(1.8rem, 7vw, 3.1rem);
  line-height: 0.95;
  margin-bottom: clamp(0.55rem, 1.5dvh, 1rem);
}

h2 {
  font-size: clamp(1.15rem, 3dvh, 1.5rem);
  line-height: 1.1;
}

.intro {
  color: #635947;
  line-height: 1.5;
}

form {
  display: grid;
  gap: clamp(0.45rem, 1.3dvh, 1rem);
}

.steps {
  background: #f1e6d5;
  border: 1px solid #e5d6bd;
  border-radius: 999px;
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0 0 clamp(0.9rem, 2.4dvh, 1.4rem);
  padding: clamp(0.18rem, 0.6dvh, 0.25rem);
}

.step-indicator {
  border-radius: 999px;
  color: #695f50;
  flex: 1;
  font-size: clamp(0.72rem, 2.8vw, 0.85rem);
  font-weight: 800;
  line-height: 1;
  padding: clamp(0.42rem, 1.3dvh, 0.55rem) 0.35rem;
  text-align: center;
  white-space: nowrap;
}

.step-indicator.active {
  background: var(--accent);
  color: #fff;
}

.form-step {
  display: none;
  gap: clamp(0.45rem, 1.4dvh, 1rem);
  min-height: 0;
}

.form-step.active {
  display: grid;
}

.form-step h2 {
  margin-bottom: 0;
}

label {
  display: grid;
  gap: clamp(0.25rem, 0.8dvh, 0.4rem);
  font-weight: 750;
}

input,
select {
  background: #fff;
  border: 1px solid #d4c3aa;
  border-radius: 14px;
  font: inherit;
  padding: clamp(0.62rem, 1.8dvh, 0.85rem) 0.9rem;
  min-width: 0;
  width: 100%;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
  outline: none;
}

button,
.button-link {
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-weight: 800;
  padding: clamp(0.68rem, 1.9dvh, 0.9rem) 1.1rem;
  text-align: center;
  text-decoration: none;
}

button:hover:not(:disabled),
.button-link:hover {
  background: var(--accent-strong);
}

button:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
  opacity: 1;
}

.button-link.disabled-link {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

button.secondary {
  background: #e3d8c6;
  color: #172018;
}

.payment-panel {
  background: #fff4dc;
  border: 1px solid #ead4ab;
  border-radius: 18px;
  display: grid;
  gap: clamp(0.45rem, 1.2dvh, 0.7rem);
  min-width: 0;
  overflow-x: hidden;
  padding: clamp(0.65rem, 1.7dvh, 0.9rem);
}

.payment-title,
.upload-instructions {
  color: #4f4638;
  font-weight: 800;
  margin: 0;
}

.voucher-note {
  background: #fffaf1;
  border: 1px solid #dfc18b;
  border-radius: 14px;
  color: #4f3b17;
  font-size: clamp(0.78rem, 1.9dvh, 0.94rem);
  font-weight: 850;
  line-height: 1.35;
  padding: clamp(0.65rem, 1.6dvh, 0.85rem);
}

.payment-tabs {
  background: #f1e6d5;
  border: 1px solid #e5d6bd;
  border-radius: 18px;
  display: grid;
  gap: 0.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  padding: 0.25rem;
}

.payment-tab {
  align-items: center;
  background: transparent;
  color: #695f50;
  display: inline-flex;
  font-size: clamp(0.68rem, 1.8dvh, 0.82rem);
  gap: 0.28rem;
  justify-content: center;
  line-height: 1;
  min-width: 0;
  overflow: hidden;
  padding: clamp(0.42rem, 1.1dvh, 0.55rem) 0.28rem;
}

.payment-tab-logo {
  display: block;
  flex: 0 0 auto;
  height: 1.8em;
  max-width: 9.2em;
  object-fit: contain;
}

.payment-tab-logo-bank {
  height: 2.55em;
  max-width: 40.5em;
}

.payment-tab-usdt {
  font-size: 0.95em;
  font-weight: 950;
  height: 2em;
  letter-spacing: 0.06em;
  padding: 0 0.65em;
  width: auto;
}

.payment-tab.active {
  background: #fffaf1;
  color: #172018;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.payment-logo {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.72em;
  height: 1.5em;
  justify-content: center;
  width: 1.5em;
}

.payment-logo-bank {
  background: #fef3c7;
  color: #78350f;
}

.payment-logo-nequi {
  background: #fce7f3;
  color: #831843;
}

.payment-logo-usdt {
  color: #14532d;
}

.payment-tab-panel {
  display: none;
  gap: clamp(0.4rem, 1dvh, 0.65rem);
}

.payment-tab-panel.active {
  display: grid;
}

.payment-detail-grid {
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid #ead4ab;
  border-radius: 14px;
  display: grid;
  gap: clamp(0.28rem, 0.8dvh, 0.45rem) 0.65rem;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  overflow-x: hidden;
  padding: clamp(0.55rem, 1.3dvh, 0.75rem);
}

.payment-method-header {
  align-items: center;
  display: flex;
  grid-column: 1 / -1;
  justify-content: center;
  padding: clamp(0.2rem, 0.8dvh, 0.45rem) 0 clamp(0.35rem, 1dvh, 0.6rem);
}

.payment-method-logo {
  display: block;
  max-height: clamp(32px, 7dvh, 58px);
  max-width: min(100%, 240px);
  object-fit: contain;
}

.payment-method-logo-usdt {
  align-items: center;
  background: #dcfce7;
  border-radius: 999px;
  color: #14532d;
  display: inline-flex;
  font-size: clamp(1.25rem, 4dvh, 2rem);
  font-weight: 950;
  justify-content: center;
  letter-spacing: 0.08em;
  padding: 0.45rem 1rem;
}

.payment-detail-grid span {
  color: #7c6d58;
  font-size: clamp(0.72rem, 1.8dvh, 0.88rem);
  font-weight: 800;
}

.payment-detail-grid strong {
  color: #172018;
  font-size: clamp(0.78rem, 1.9dvh, 0.95rem);
  overflow-wrap: anywhere;
}

.payment-qr {
  border-radius: 14px;
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.copy-payment-button {
  background: #e3d8c6;
  color: #172018;
  justify-self: start;
  padding: clamp(0.55rem, 1.4dvh, 0.72rem) 0.9rem;
}

.upload-card {
  background: #fff;
  border: 1px dashed #93c5fd;
  border-radius: 20px;
  cursor: pointer;
  display: grid;
  gap: clamp(0.45rem, 1.2dvh, 0.75rem);
  padding: clamp(0.65rem, 1.7dvh, 0.9rem);
  width: 100%;
}

.upload-card input {
  block-size: 1px;
  inline-size: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.upload-button {
  background: var(--accent);
  border-radius: 999px;
  color: #fff;
  display: inline-block;
  font-weight: 850;
  justify-self: start;
  padding: clamp(0.62rem, 1.7dvh, 0.8rem) 1rem;
  text-align: center;
}

.upload-card:hover .upload-button {
  background: var(--accent-strong);
}

.upload-card:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.upload-file-name {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  color: #334155;
  display: block;
  font-weight: 750;
  min-height: clamp(36px, 5.5dvh, 44px);
  overflow-wrap: anywhere;
  padding: clamp(0.55rem, 1.4dvh, 0.72rem) 0.8rem;
  width: 100%;
}

.message {
  color: #b91c1c;
  margin: 0;
}

.group-link-preview {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 0.9rem;
}

.group-link-preview p {
  margin-bottom: 0.35rem;
}

.text-link {
  color: var(--accent);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.checkbox-label {
  align-items: start;
  display: grid;
  font-weight: 750;
  gap: 0.6rem;
  grid-template-columns: auto 1fr;
}

.checkbox-label input {
  margin-top: 0.2rem;
}

.switch-control {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  gap: 0.65rem;
  padding: 0.45rem 0.7rem 0.45rem 0.45rem;
  width: fit-content;
}

.switch-control input {
  inline-size: 1px;
  opacity: 0;
  position: absolute;
}

.switch-track {
  background: #cbd5e1;
  border-radius: 999px;
  display: inline-flex;
  height: 28px;
  padding: 3px;
  transition: background 0.18s ease;
  width: 52px;
}

.switch-thumb {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
  display: block;
  height: 22px;
  transform: translateX(0);
  transition: transform 0.18s ease;
  width: 22px;
}

.switch-control input:checked + .switch-track {
  background: var(--success);
}

.switch-control input:checked + .switch-track .switch-thumb {
  transform: translateX(24px);
}

.switch-control input:focus + .switch-track {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.form-actions {
  align-items: stretch;
  display: grid;
  gap: clamp(0.45rem, 1.2dvh, 0.75rem);
  grid-template-columns: 1fr;
}

.form-actions button,
.form-actions .button-link,
.form-actions .switch-control {
  width: 100%;
}

.form-actions .switch-control {
  justify-content: flex-start;
}

.hint {
  color: #635947;
  font-size: 0.95rem;
  margin: 0.65rem 0 0;
}

.status-pill {
  border-radius: 999px;
  display: inline-grid;
  font-size: 0.92rem;
  gap: 0.12rem;
  font-weight: 850;
  margin: 0.8rem 0 0;
  padding: 0.62rem 0.85rem;
  width: fit-content;
}

.status-pill.pending {
  background: var(--warning-bg);
  color: var(--warning);
}

.status-pill.verified {
  background: var(--success-bg);
  color: var(--success);
}

.success {
  border-top: 1px solid #e5d6bd;
  margin-top: clamp(0.75rem, 2dvh, 1.25rem);
  padding-top: clamp(0.75rem, 2dvh, 1.25rem);
}

.hidden {
  display: none;
}

@media (min-width: 721px) {
  .card {
    max-width: min(86vw, 680px);
  }

  .cover-actions {
    max-width: min(100%, 56dvh, 520px);
  }

  .hero-logo {
    max-height: min(56dvh, 520px);
    max-width: min(100%, 760px);
  }
}

@media (min-width: 1100px) and (min-height: 720px) {
  .card {
    max-width: min(82vw, 760px);
  }

  .cover-actions {
    max-width: min(100%, 62dvh, 620px);
  }

  .hero-logo {
    max-height: min(62dvh, 620px);
    max-width: min(100%, 900px);
  }
}

@media (max-height: 640px) {
  .card {
    font-size: 0.92rem;
  }

  .cover .intro,
  .form-step p:not(.payment-title):not(.upload-instructions) {
    margin-bottom: 0;
  }

  .hero-logo {
    max-height: 34dvh;
  }
}
