:root {
  --bg: #060911;
  --panel: rgba(13, 19, 32, 0.92);
  --surface: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.1);
  --text: #eef2ff;
  --muted: #8d97ad;
  --mint: #6ef3c5;
  --violet: #a78bfa;
  --danger: #fb7185;
  --warning: #fcd34d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(110, 243, 197, 0.13), transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(167, 139, 250, 0.16), transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(88, 199, 255, 0.1), transparent 38%),
    var(--bg);
  color: var(--text);
  font-family: "Prompt", "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif;
}

a {
  color: inherit;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.auth-card {
  width: min(440px, 100%);
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 34px 80px -40px rgba(0, 0, 0, 0.95);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.auth-card.is-wide {
  width: min(560px, 100%);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 24px;
  text-decoration: none;
}

.auth-brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--mint), #58c7ff 55%, var(--violet));
  transform: rotate(45deg);
  box-shadow: 0 10px 26px -10px rgba(110, 243, 197, 0.7);
}

.auth-brand-mark::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 3px;
  background: #071019;
}

.auth-brand-text {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.auth-brand-text em {
  font-style: normal;
  background: linear-gradient(120deg, var(--mint), #7dd3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-kicker {
  margin: 0 0 7px;
  color: var(--mint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(25px, 5vw, 31px);
  line-height: 1.25;
}

.auth-subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-label {
  color: #d9e2f2;
  font-size: 12.5px;
  font-weight: 600;
}

.field-step {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  border-radius: 50%;
  background: rgba(110, 243, 197, 0.12);
  color: var(--mint);
  font-size: 11px;
}

.field input,
.field select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field input:focus,
.field select:focus {
  border-color: rgba(110, 243, 197, 0.6);
  background: rgba(255, 255, 255, 0.06);
}

.field select option {
  background: #111827;
  color: var(--text);
}

.bank-picker {
  display: flex;
  gap: 8px;
  padding: 2px 2px 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  -webkit-overflow-scrolling: touch;
}

.bank-picker::-webkit-scrollbar {
  height: 4px;
}

.bank-picker::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.bank-option {
  display: grid;
  flex: 0 0 auto;
  justify-items: center;
  gap: 5px;
  width: 74px;
  padding: 8px 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.bank-option:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.bank-option.is-active {
  border-color: rgba(110, 243, 197, 0.48);
  background: rgba(110, 243, 197, 0.09);
  color: var(--text);
  box-shadow: 0 10px 24px -18px rgba(110, 243, 197, 0.8);
}

.bank-option-name {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-picker-selected {
  margin: 0;
  color: var(--mint);
  font-size: 11.5px;
  font-weight: 600;
}

.bank-picker-loading {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

@media (min-width: 620px) {
  .bank-picker {
    flex-wrap: wrap;
    overflow: visible;
  }
}

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

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.form-note {
  margin: 0;
  padding: 11px 13px;
  border: 1px solid rgba(252, 211, 77, 0.22);
  border-radius: 12px;
  background: rgba(252, 211, 77, 0.07);
  color: var(--warning);
  font-size: 12px;
  line-height: 1.65;
}

.auth-alert {
  padding: 11px 13px;
  border: 1px solid rgba(251, 113, 133, 0.3);
  border-radius: 12px;
  background: rgba(251, 113, 133, 0.09);
  color: #fecdd3;
  font-size: 12.5px;
  line-height: 1.6;
}

.auth-alert[hidden] {
  display: none;
}

.auth-submit {
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--mint), #58c7ff);
  color: #06110d;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.auth-submit:hover {
  filter: brightness(1.05);
}

.auth-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.auth-switch {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
}

.auth-switch a,
.auth-home {
  color: var(--mint);
  font-weight: 700;
  text-decoration: none;
}

.auth-home {
  display: block;
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
}

@media (max-width: 900px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

@media (max-width: 520px) {
  .auth-page {
    padding: 20px 12px;
  }

  .auth-card {
    padding: 23px 18px;
    border-radius: 20px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}
