* {
  box-sizing: border-box;
}

:root {
  color: #241a2e;
  background: #f4ecff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(160, 52, 177, 0.18), transparent 34rem),
    linear-gradient(135deg, #fff 0%, #f7efff 48%, #efe2ff 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.initial-app-loader {
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: #f4ecff;
}

.initial-app-logo {
  width: 112px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: #a034b1;
  color: #fff;
  font: 900 54px/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
  box-shadow: 0 18px 36px rgba(160, 52, 177, 0.22);
}

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

.auth-panel {
  width: min(100%, 560px);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(61, 32, 76, 0.12);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(61, 32, 76, 0.16);
  padding: clamp(24px, 5vw, 42px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.brand-mark,
.result-icon {
  width: 54px;
  aspect-ratio: 1;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #a034b1;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-brand strong {
  display: block;
  font-size: 1rem;
}

.auth-heading {
  margin-bottom: 22px;
}

.auth-heading h1,
.auth-result-card h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.auth-heading p,
.auth-result-card p {
  margin: 0;
  color: #5b5163;
  line-height: 1.55;
}

.auth-top-action {
  margin-bottom: 22px;
}

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

.auth-form label {
  display: grid;
  gap: 7px;
  color: #34253d;
  font-weight: 800;
}

.auth-form label span,
.auth-form small {
  font-size: 0.86rem;
}

.auth-form small {
  color: #6b6174;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  border: 1px solid rgba(61, 32, 76, 0.2);
  border-radius: 8px;
  min-height: 48px;
  padding: 0 14px;
  color: #241a2e;
  background: #fff;
}

.auth-form input:focus {
  outline: 3px solid rgba(160, 52, 177, 0.18);
  border-color: #a034b1;
}

.auth-form > button,
.auth-primary-button,
.result-actions button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: #a034b1;
  color: #fff;
  font-weight: 900;
}

.auth-links,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.text-button,
.back-button {
  border: 0;
  background: transparent;
  color: #7c1f8e;
  font-weight: 900;
  padding: 0;
}

.form-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-status {
  min-height: 1.4em;
  margin: 0;
  color: #7c1f8e;
  font-weight: 800;
}

.auth-result-card {
  display: grid;
  gap: 14px;
}

@media (max-width: 640px) {
  .auth-page-shell {
    padding: 18px 12px;
    align-items: stretch;
  }

  .auth-panel {
    align-self: center;
    padding: 24px 18px;
  }

  .form-two-column {
    grid-template-columns: 1fr;
  }
}
