:root {
  color-scheme: dark;
  --brand: #b7eb13;
  --ink: #121212;
  --card: #1c1c1c;
  --line: #3a3a3a;
  --muted: #b5b5b5;

  /* intl-tel-input dark theme (official CSS variables)
     https://intl-tel-input.com/docs/theming */
  --iti-border-color: #3a3a3a;
  --iti-country-selector-bg: #1c1c1c;
  --iti-icon-color: #c8c8c8;
  --iti-hover-color: #2a2a2a;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(183, 235, 19, 0.08), transparent 55%),
    var(--ink);
  color: #fff;
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

[hidden] {
  display: none !important;
}

.phone-field {
  width: 100%;
  max-width: 100%;
}

.phone-field .iti {
  width: 100%;
  max-width: 100%;
  display: block;
}

/* Input chrome only — country dropdown keeps vendor styles */
.phone-field .iti__tel-input {
  width: 100%;
  height: 3.25rem;
  border-radius: 1rem;
  border: 1px solid #3a3a3a;
  background: #161616;
  color: #fff;
  font-size: 1rem;
  transition: border-color 150ms ease;
}

.phone-field .iti__tel-input::placeholder {
  color: #8d8d8d;
}

.phone-field .iti__tel-input:focus {
  outline: none;
  border-color: #b7eb13;
}

.phone-field .iti__selected-country,
.phone-field .iti__selected-dial-code {
  color: #fff;
}

.phone-field.is-invalid .iti__tel-input,
.phone-field.is-invalid .iti__tel-input:focus {
  border-color: #f87171;
}

#feedback[data-tone="error"] {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

#feedback[data-tone="success"] {
  background: rgba(183, 235, 19, 0.12);
  color: #e9ffb8;
}

.otp-box {
  width: 100%;
  height: 3.5rem;
  border-radius: 0.75rem;
  border: 1px solid #3a3a3a;
  background: #1a1a1a;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  caret-color: transparent;
}

.otp-box:focus {
  border-color: #b7eb13;
  outline: none;
}

#otp-row.is-invalid .otp-box {
  border-color: #f87171;
}

.step-button:disabled {
  background: #2a2a2a;
  color: #8a8a8a;
  cursor: not-allowed;
}

.step-button:not(:disabled) {
  background: #b7eb13;
  color: #15171a;
  font-weight: 700;
}

.step-button:not(:disabled):hover {
  background: #c5f432;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid #3f3f3f;
  border-top-color: #b7eb13;
  animation: spin 0.8s linear infinite;
}

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

.field-label {
  color: #8d8d8d;
}

.field.is-set .field-label,
.field.is-set .time-line {
  color: #fff;
}

.field:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.sheet-option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 0;
  border-bottom: 1px solid #2e2e2e;
  background: transparent;
  padding: 0.9rem 0.25rem;
  text-align: left;
  color: #fff;
  cursor: pointer;
}

.sheet-option:hover {
  background: rgba(255, 255, 255, 0.04);
}

.sheet-option .check {
  display: none;
  color: #b7eb13;
}

.sheet-option[aria-selected="true"] .check {
  display: block;
}

.sheet-option small {
  display: block;
  margin-top: 0.15rem;
  color: #8d8d8d;
  font-size: 0.8rem;
}

@media (max-width: 520px) {
  .when-grid.grid-cols-2 {
    grid-template-columns: 1fr;
  }
}

.when-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.when-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.4rem;
  border: 1px solid #3a3a3a;
  border-radius: 1rem;
  background: #161616;
  padding: 0.45rem 0.75rem;
}

.when-field:focus-within,
.when-field.is-open {
  border-color: #b7eb13;
}

.when-icon,
.when-chevron {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  color: #d4d4d4;
}

.when-field.is-open .when-chevron {
  transform: rotate(180deg);
}

.when-copy {
  display: block;
  min-width: 0;
  flex: 1;
}

.when-caption {
  display: block;
  color: #8d8d8d;
  font-size: 0.72rem;
  line-height: 1.2;
}

.when-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.65rem;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.when-value {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.when-value.is-placeholder {
  color: #8d8d8d;
}

.when-time input {
  display: block;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  color-scheme: dark;
  font: inherit;
  font-size: 16px;
  line-height: 1.3;
}

.when-time input::-webkit-calendar-picker-indicator {
  display: none;
}

.when-time input::-webkit-datetime-edit {
  padding: 0;
}

.when-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 16rem;
  max-height: min(18rem, 46vh);
  overflow: auto;
  border: 1px solid #3a3a3a;
  border-radius: 1rem;
  background: #242424;
  padding: 0.35rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.when-menu.is-end {
  right: 0;
  left: auto;
}

.when-option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: #fff;
  padding: 0.7rem 0.75rem;
  text-align: left;
  font-size: 0.95rem;
  cursor: pointer;
}

.when-option:hover,
.when-option:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}

.when-option[aria-selected="true"] {
  background: rgba(183, 235, 19, 0.14);
  color: #b7eb13;
}

.when-stack.is-set .when-caption {
  color: #c8c8c8;
}

.sheet-empty {
  padding: 1.5rem 0;
  color: #8d8d8d;
  font-size: 0.875rem;
}

#sheet-backdrop {
  opacity: 0;
  transition: opacity 220ms ease;
}

.sheet-panel {
  transform: translateY(100%);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

#sheet.is-open #sheet-backdrop {
  opacity: 1;
}

#sheet.is-open .sheet-panel {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .sheet-panel {
    opacity: 0;
    transform: translateY(calc(-50% + 1rem));
    transition:
      transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 220ms ease;
  }

  #sheet.is-open .sheet-panel {
    opacity: 1;
    transform: translateY(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  #sheet-backdrop,
  .sheet-panel {
    transition: none;
  }
}

.order-title {
  margin-top: 0.5rem;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.order-card-title {
  font-size: 15px;
  font-weight: 600;
}

.order-note {
  margin-top: 0.25rem;
  font-size: 13px;
  line-height: 1.4;
  color: rgb(159, 159, 159);
}

.order-label {
  font-size: 14px;
  color: rgb(159, 159, 159);
}

.order-value {
  font-size: 14px;
  color: #fff;
}

.order-total {
  font-size: 14px;
  font-weight: 700;
  color: #b7eb13;
}

.order-whatsapp {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

.pay-button {
  width: 100%;
  height: 52px;
  border-radius: 10px;
  border: none;
  background: rgb(181, 219, 28);
  color: rgb(28, 27, 32);
  font: 700 16px "DM Sans", sans-serif;
  cursor: pointer;
}

.pay-button:hover {
  background: rgb(191, 228, 42);
}

.status-loading {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  animation: status-fade-in 420ms ease;
}

.status-loader-ring {
  position: relative;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  border: 2px solid rgba(183, 235, 19, 0.18);
  display: grid;
  place-items: center;
}

.status-loader-ring::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid transparent;
  border-top-color: #b7eb13;
  animation: spin 0.9s linear infinite;
}

.status-loader-core {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #b7eb13;
  box-shadow: 0 0 24px rgba(183, 235, 19, 0.45);
  animation: status-pulse 1.4s ease-in-out infinite;
}

.status-loading-title {
  margin: 1.5rem 0 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.status-loading-copy {
  margin: 0.5rem 0 0;
  max-width: 16rem;
  color: #9f9f9f;
  font-size: 0.9rem;
  line-height: 1.45;
}

.status-view {
  display: flex;
  flex: 1;
  flex-direction: column;
  animation: status-rise 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.status-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 1.25rem;
}

.status-hero-failed {
  flex: 1;
  justify-content: center;
  padding-bottom: 1rem;
}

.status-badge {
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin-bottom: 1.35rem;
}

.status-badge svg {
  width: 2rem;
  height: 2rem;
}

.status-badge.is-success {
  background: #b7eb13;
  color: #121212;
  box-shadow: 0 0 0 10px rgba(183, 235, 19, 0.12);
}

.status-badge.is-pending {
  background: rgba(245, 190, 48, 0.16);
  color: #f5be30;
  box-shadow: 0 0 0 10px rgba(245, 190, 48, 0.08);
}

.status-badge.is-failed {
  background: rgba(248, 113, 113, 0.14);
  box-shadow: 0 0 0 10px rgba(248, 113, 113, 0.08);
}

.status-badge-inner {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f87171;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}

.status-title {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.status-copy {
  margin: 0.75rem 0 0;
  max-width: 22rem;
  color: #9f9f9f;
  font-size: 0.95rem;
  line-height: 1.5;
}

.status-steps {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 1.15rem 1rem 1.15rem 0.9rem;
  border-radius: 1.25rem;
  background: #1c1c1c;
}

.status-step {
  position: relative;
  display: grid;
  grid-template-columns: 1.35rem 1fr;
  gap: 0.85rem;
  padding-bottom: 1.2rem;
}

.status-step:last-child {
  padding-bottom: 0;
}

.status-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 0.6rem;
  top: 1.25rem;
  bottom: 0.1rem;
  width: 2px;
  border-radius: 999px;
  background: #2e2e2e;
}

.status-step.is-done:not(:last-child)::before {
  background: rgba(183, 235, 19, 0.55);
}

.status-step.is-current:not(:last-child)::before {
  background: rgba(245, 190, 48, 0.45);
}

.status-step-marker {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
  border-radius: 999px;
  border: 2px solid #4a4a4a;
  background: transparent;
  box-sizing: border-box;
}

.status-step.is-done .status-step-marker {
  border-color: #b7eb13;
  background: #b7eb13;
  box-shadow: inset 0 0 0 3px #1c1c1c;
}

.status-step.is-current .status-step-marker {
  border-color: #f5be30;
  background: transparent;
  box-shadow: 0 0 0 4px rgba(245, 190, 48, 0.12);
}

.status-step.is-failed .status-step-marker {
  border-color: #f87171;
  background: #f87171;
  box-shadow: inset 0 0 0 3px #1c1c1c;
}

.status-step-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #7d7d7d;
}

.status-step.is-done .status-step-title,
.status-step.is-current .status-step-title,
.status-step.is-failed .status-step-title {
  color: #fff;
}

.status-step-meta {
  margin: 0.2rem 0 0;
  color: #7a7a7a;
  font-size: 0.84rem;
  line-height: 1.45;
}

.status-step.is-done .status-step-meta,
.status-step.is-current .status-step-meta {
  color: #9f9f9f;
}

.status-details {
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #1c1c1c;
}

.status-detail-rows {
  padding: 0.35rem 1rem;
}

.status-app {
  margin-top: 1rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 1.25rem;
  background: #1c1c1c;
}

.status-app-icon {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(183, 235, 19, 0.14);
  color: #b7eb13;
}

.status-app-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.status-app-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.status-app-text {
  margin: 0.3rem 0 0;
  color: #9f9f9f;
  font-size: 0.84rem;
  line-height: 1.45;
}

.status-detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #2e2e2e;
}

.status-detail-row:last-child {
  border-bottom: none;
}

.status-detail-time {
  text-align: right;
  max-width: 14rem;
}

.status-actions {
  margin-top: auto;
  padding-top: 1.75rem;
  display: grid;
  gap: 0.75rem;
}

.status-secondary {
  width: 100%;
  height: 52px;
  border-radius: 10px;
  border: none;
  background: #2a2a2a;
  color: #fff;
  font: 700 16px "DM Sans", sans-serif;
  cursor: pointer;
}

.status-secondary:hover {
  background: #333;
}

.pay-button:disabled,
.status-secondary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

@keyframes status-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes status-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes status-pulse {
  0%,
  100% {
    transform: scale(0.86);
    opacity: 0.75;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-loading,
  .status-view,
  .status-loader-ring::before,
  .status-loader-core {
    animation: none;
  }
}
