@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap");

:root {
  --auth-accent: var(--accent);
  --auth-accent-strong: var(--accent-strong);
  --auth-secondary: var(--secondary);
  --auth-surface: rgba(255, 250, 244, 0.88);
  --auth-border: rgba(17, 22, 29, 0.08);
  --auth-text: var(--text);
  --auth-muted: var(--muted);
  --auth-shadow: 0 28px 70px rgba(17, 22, 29, 0.12);
  --auth-focus-ring: rgba(15, 157, 143, 0.14);
}

.auth-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--auth-text);
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(15, 157, 143, 0.24), transparent 30%),
    radial-gradient(circle at top right, rgba(242, 93, 61, 0.2), transparent 26%),
    radial-gradient(circle at bottom left, rgba(15, 157, 143, 0.14), transparent 24%),
    linear-gradient(180deg, #fff9f1 0%, #f4efe7 48%, #efe7dc 100%);
}

.auth-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
}

.auth-shell::before,
.auth-shell::after {
  content: "";
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(54px);
  opacity: 0.32;
  pointer-events: none;
}

.auth-shell::before {
  top: -8rem;
  left: -8rem;
  background: rgba(15, 157, 143, 0.4);
}

.auth-shell::after {
  right: -6rem;
  bottom: -10rem;
  background: rgba(242, 93, 61, 0.28);
}

.auth-main {
  width: min(28rem, calc(100vw - 1.5rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0 2rem;
}

.auth-card {
  position: relative;
  width: 100%;
  padding: 1.75rem;
  border: 1px solid var(--auth-border);
  border-radius: 1.75rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 248, 239, 0.92)),
    var(--auth-surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--auth-shadow);
}

.auth-card--minimal {
  display: grid;
  gap: 1rem;
}

.auth-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-weight: 700;
  letter-spacing: 0;
}

.auth-card-head {
  text-align: center;
}

.auth-card-head h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 8vw, 2.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.auth-social-button,
.auth-submit {
  width: 100%;
  min-height: 3.7rem;
  border-radius: 1rem;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.auth-social-button {
  border: 1px solid rgba(17, 22, 29, 0.1);
  background: rgba(255, 255, 255, 0.78);
  color: var(--auth-text);
  box-shadow: 0 10px 24px rgba(17, 22, 29, 0.06);
}

.auth-submit {
  background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-strong) 100%);
  color: #fff;
  box-shadow: 0 22px 40px rgba(15, 114, 103, 0.24);
}

.auth-social-button:hover,
.auth-submit:hover {
  transform: translateY(-1px);
}

.auth-divider {
  position: relative;
  margin: 1.25rem 0;
  text-align: center;
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid rgba(17, 22, 29, 0.12);
}

.auth-divider span {
  position: relative;
  padding: 0 0.9rem;
  background: rgba(255, 248, 239, 0.94);
  color: var(--auth-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-field {
  display: grid;
  gap: 0.45rem;
}

.auth-field label {
  color: #243241;
  font-size: 0.92rem;
  font-weight: 700;
}

.auth-field-wrap {
  position: relative;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  min-width: 2.5rem;
  padding: 0;
  height: 2.15rem;
  border-radius: 999px;
  border: 0;
  background: rgba(17, 22, 29, 0.06);
  color: var(--auth-muted);
  cursor: pointer;
  line-height: 1;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.auth-password-toggle:hover {
  background: rgba(17, 22, 29, 0.1);
  color: var(--auth-text);
}

.auth-password-toggle:focus-visible {
  outline: none;
  color: var(--auth-accent-strong);
  box-shadow: 0 0 0 4px var(--auth-focus-ring);
}

.auth-password-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-password-icon--hide {
  display: none;
}

.auth-password-toggle[data-password-visible="true"] .auth-password-icon--show {
  display: none;
}

.auth-password-toggle[data-password-visible="true"] .auth-password-icon--hide {
  display: block;
}

.auth-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-field input,
.auth-field select {
  width: 100%;
  min-height: 3.7rem;
  padding: 0 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(17, 22, 29, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--auth-text);
}

.auth-field input.auth-password-input {
  padding-right: 4rem;
}

.auth-field input:focus,
.auth-field select:focus {
  outline: none;
  background: #fff;
  border-color: rgba(15, 157, 143, 0.42);
  box-shadow: 0 0 0 4px var(--auth-focus-ring);
}

.auth-switch {
  margin-top: 0.35rem;
  color: var(--auth-muted);
  font-size: 0.93rem;
  text-align: center;
}

.auth-switch a {
  color: var(--auth-accent-strong);
  font-weight: 700;
}

.auth-notice {
  margin-top: 0.25rem;
}

.auth-google-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.auth-submit[disabled],
.auth-social-button[disabled],
.auth-password-toggle[disabled] {
  opacity: 0.72;
  cursor: progress;
}

@media (min-width: 640px) {
  .auth-main {
    width: min(29rem, calc(100vw - 2rem));
  }

  .auth-card {
    padding: 2rem;
    border-radius: 2rem;
  }
}

@media (max-width: 640px) {
  .auth-main {
    width: min(28rem, calc(100vw - 1rem));
    padding: 1rem 0 1.75rem;
  }
}
