:root {
  --auth-primary: #5e9e49;
  --auth-surface: rgba(255, 255, 255, 0.75);
  --auth-border: #d4d4d8;
  --auth-muted: #71717a;
  --auth-placeholder: #a1a1aa;
  --auth-text: #27272a;
}

.auth-page {
  min-width: 320px;
  min-height: 100%;
  background: #e9f4e4;
}

.auth-page,
.auth-page button,
.auth-page input {
  font-family: Dana, Tahoma, sans-serif;
}

.auth-shell {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 40px;
  background: #e9f4e4;
}

.auth-art {
  position: absolute;
  z-index: -1;
  top: -1170px;
  left: -465px;
  display: flex;
  width: 2624px;
  height: 2652px;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.auth-art img {
  width: 1992px;
  height: 1751px;
  max-width: none;
  transform: rotate(-49.65deg);
  opacity: 0.86;
}

.auth-card {
  position: relative;
  width: min(100%, 534px);
  max-width: 100%;
  box-sizing: border-box;
  padding: 28px 40px 40px;
  overflow: hidden;
  border: 1px solid #fff;
  border-radius: 32px;
  background: var(--auth-surface);
  box-shadow: 0 0 24px rgba(14, 55, 0, 0.04);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.auth-card::before,
.auth-card::after {
  position: absolute;
  z-index: 0;
  display: block;
  content: "";
  background: var(--auth-primary);
  opacity: 0.4;
  pointer-events: none;
}

.auth-card::before {
  top: -16px;
  left: -85px;
  width: 224px;
  height: 103px;
  filter: blur(67px);
}

.auth-card::after {
  top: 132px;
  right: -1px;
  width: 135px;
  height: 294px;
  filter: blur(77px);
}

.auth-card-header,
.auth-step {
  position: relative;
  z-index: 1;
}

.auth-card-header {
  display: grid;
  min-height: 69px;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
}

.auth-back {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  justify-self: start;
}

.auth-back img {
  width: 24px;
  height: 24px;
  opacity: 0.72;
}

.auth-logo {
  grid-column: 2;
  width: 174px;
  height: 56px;
  margin-top: 13px;
  object-fit: contain;
  justify-self: center;
}

.auth-step {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.auth-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 57px;
  text-align: right;
}

.auth-copy h1,
.auth-copy p {
  margin: 0;
}

.auth-copy h1 {
  color: var(--auth-text);
  font-size: 24px;
  font-weight: 700;
  line-height: 36px;
}

.auth-copy h1.text-center {
  text-align: center;
}

.auth-copy p {
  color: var(--auth-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.auth-otp-copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-otp-copy-row p {
  flex: 1 1 auto;
}

.auth-edit-number {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--auth-primary);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  text-underline-offset: 3px;
  font-size: 14px;
}

.auth-edit-number:hover {
  color: var(--auth-primary);
}

.auth-form {
  width: 100%;
  margin-top: 58px;
  z-index: 2;
}

.auth-phone-form--with-name .auth-field + .auth-field {
  margin-top: 16px;
}

.auth-name-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.auth-name-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.auth-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.auth-label {
  display: flex;
  height: 28px;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  padding: 0 4px 4px;
  color: #09090b;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.auth-label b {
  color: #dc2626;
  font-size: 18px;
  line-height: 28px;
}

.auth-input {
  display: flex;
  height: 56px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--auth-border);
  border-radius: 999px;
  background: #fff;
  padding: 0 20px;
}

.auth-input:focus-within {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(94, 158, 73, 0.12);
}

.auth-name-input input,
.auth-phone-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--auth-text);
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  text-align: left;
}

.auth-name-input input {
  text-align: right;
}

.auth-name-input input::placeholder,
.auth-phone-input input::placeholder {
  color: var(--auth-placeholder);
  opacity: 1;
}

.auth-phone-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}

.auth-error {
  margin: 5px 6px 0;
  color: #dc2626;
  font-size: 12px;
  line-height: 18px;
}

.auth-phone-hint {
  margin: 16px 0 0;
  text-align: center;
}

.auth-phone-form.has-phone-error .auth-submit {
  margin-top: 12px;
}

.auth-submit {
  display: flex;
  width: 100%;
  height: 56px;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f5;
  color: var(--auth-placeholder);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.auth-phone-form--with-name .auth-submit {
  margin-top: 24px;
}

.auth-submit:not(:disabled) {
  background: var(--auth-primary);
  color: #fff;
}

.auth-submit:not(:disabled):hover {
  background: #4d873b;
}

.auth-submit:not(:disabled):active {
  transform: translateY(1px);
}

.auth-submit:disabled {
  cursor: not-allowed;
}

.auth-terms {
  width: 308px;
  margin: 20px auto 0;
  color: #3f3f46;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  text-align: center;
}

.auth-phone-form--with-name .auth-terms {
  margin-top: 14px;
}

.auth-terms a {
  color: var(--auth-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-step--otp .auth-copy {
  margin-top: 71px;
}

.auth-otp-form {
  margin-top: 58px;
}

.otp-inputs {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.otp-input {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border: 1px solid var(--auth-border);
  border-radius: 999px;
  outline: 0;
  background: #fff;
  color: #09090b;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.otp-input::placeholder {
  color: var(--auth-placeholder);
  opacity: 1;
}

.otp-input:focus,
.otp-input.is-filled {
  border-color: var(--auth-primary);
  background: rgba(94, 158, 73, 0.15);
  box-shadow: 0 0 0 1px var(--auth-primary);
}

.auth-otp-resend {
  display: flex;
  height: 28px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-top: 58px;
  direction: rtl;
}

.auth-otp-resend p {
  margin: 0;
  color: #3f3f46;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.auth-resend-countdown span {
  display: inline-block;
  color: var(--auth-primary);
  font-weight: 600;
  direction: ltr;
}

.auth-resend {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  color: #09090b;
  font-size: 14px;
  line-height: 20px;
}

.auth-resend-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--auth-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  cursor: pointer;
}

.auth-resend-button:hover {
  color: #4d873b;
}

.auth-resend-button img {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  filter: brightness(0) saturate(100%) invert(55%) sepia(30%) saturate(778%) hue-rotate(60deg) brightness(95%) contrast(82%);
}

.auth-otp-form .auth-submit {
  margin-top: 20px;
}

.auth-otp-form .auth-error {
  margin-top: 12px;
  text-align: center;
}

.auth-submit.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

[hidden] {
  display: none !important;
}

/* Beat .auth-shell display so Vue islands stay hidden until mount. */
[v-cloak] {
  display: none !important;
}

@media (max-width: 991.98px) {
  .auth-shell {
    min-height: 100svh;
    padding: 16px;
  }

  .auth-art {
    top: -940px;
    left: -1050px;
    transform: scale(0.78);
    transform-origin: center;
  }

  .auth-card {
    padding-right: 24px;
    padding-left: 24px;
  }

  .auth-copy h1 {
    font-size: 22px;
  }

  .otp-inputs {
    gap: clamp(8px, 2.5vw, 20px);
  }

  .otp-input {
    width: clamp(48px, 14vw, 56px);
    height: clamp(48px, 14vw, 56px);
    flex-basis: clamp(48px, 14vw, 56px);
  }

  .auth-otp-resend {
    margin-top: 48px;
  }
}

@media (max-width: 380px) {
  .auth-card {
    padding: 24px 16px 32px;
  }

  .auth-copy {
    margin-top: 48px;
  }

  .auth-step--otp .auth-copy {
    margin-top: 60px;
  }

  .auth-terms {
    width: 100%;
  }
}
