:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --ink: #22252d;
  --muted: #6b7280;
  --line: #eceff5;
  --bg: #edf0f5;
  --danger: #dc2626;
  --success: #16a34a;
  --shadow-a: 18px 18px 46px rgba(170, 179, 195, .65);
  --shadow-b: -18px -18px 46px rgba(255, 255, 255, .95);
  --inner-a: inset 9px 9px 18px rgba(170, 179, 195, .45);
  --inner-b: inset -9px -9px 18px rgba(255, 255, 255, .95);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, .8), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(37, 99, 235, .09), transparent 30%),
    var(--bg);
}

.auth-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 26px 38px;
  display: flex;
  align-items: center;
}

.auth-logo img {
  width: 148px;
  height: auto;
  display: block;
}

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

.auth-card {
  width: min(430px, 100%);
  padding: 40px;
  border-radius: 46px;
  background: rgba(238, 241, 246, .92);
  box-shadow: var(--shadow-a), var(--shadow-b);
}

.signup-card {
  width: min(570px, 100%);
}

.auth-title {
  text-align: center;
  margin-bottom: 28px;
}

.auth-title h1 {
  margin: 0;
  color: #343842;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -.045em;
  font-weight: 900;
}

.auth-title p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
}

form {
  display: grid;
  gap: 18px;
}

.field-grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  position: relative;
}

label {
  display: block;
  margin: 0 0 9px;
  color: #3f4350;
  font-size: 15px;
  font-weight: 800;
}

input {
  width: 100%;
  height: 58px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 0 22px;
  background: #eef1f6;
  color: #2d3340;
  font-size: 15px;
  font-weight: 650;
  box-shadow: var(--inner-a), var(--inner-b);
  transition: box-shadow .16s ease, background .16s ease;
}

input::placeholder {
  color: #8b93a3;
  font-weight: 600;
}

input:focus {
  background: #f3f6fb;
  box-shadow: inset 5px 5px 12px rgba(170, 179, 195, .42), inset -5px -5px 12px rgba(255, 255, 255, .96), 0 0 0 4px rgba(37, 99, 235, .10);
}

.password-field input {
  padding-right: 76px;
}

.eye {
  position: absolute;
  right: 14px;
  bottom: 10px;
  height: 38px;
  min-width: 54px;
  border: 0;
  border-radius: 999px;
  background: #eef1f6;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 5px 5px 12px rgba(170, 179, 195, .42), -5px -5px 12px rgba(255, 255, 255, .96);
}

.auth-btn,
.outline-btn {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.auth-btn {
  margin-top: 6px;
  background: var(--blue);
  color: #fff;
  box-shadow: 12px 12px 24px rgba(102, 123, 162, .38), -12px -12px 24px rgba(255, 255, 255, .9);
}

.auth-btn:hover {
  transform: translateY(-1px);
  background: var(--blue-dark);
}

.auth-btn:disabled,
.outline-btn:disabled {
  opacity: .7;
  cursor: wait;
  transform: none;
}

.outline-btn {
  background: #eef1f6;
  color: #3f4350;
  box-shadow: 9px 9px 20px rgba(170, 179, 195, .45), -9px -9px 20px rgba(255, 255, 255, .9);
}

.auth-footer-line {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.auth-footer-line a {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.legal-copy {
  margin: 16px 0 0;
  text-align: center;
  color: #7b8495;
  font-size: 12px;
  line-height: 1.55;
}

.notice {
  display: none;
  margin: 0 0 18px;
  padding: 13px 16px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.notice.error {
  display: block;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, .56);
  backdrop-filter: blur(8px);
}

.modal-backdrop.show {
  display: flex;
}

.modal-card {
  width: min(500px, 100%);
  padding: 36px;
  border-radius: 42px;
  text-align: center;
  background: #eef1f6;
  box-shadow: 22px 22px 56px rgba(15, 23, 42, .28), -12px -12px 42px rgba(255, 255, 255, .12);
}

.modal-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dcfce7;
  color: #166534;
  font-size: 32px;
  font-weight: 950;
  box-shadow: 9px 9px 18px rgba(170, 179, 195, .45), -9px -9px 18px rgba(255, 255, 255, .9);
}

.modal-card h2 {
  margin: 0;
  color: #343842;
  font-size: 32px;
  letter-spacing: -.045em;
}

.modal-card p {
  margin: 12px 0 24px;
  color: #667085;
  line-height: 1.6;
  font-weight: 650;
}

.modal-actions {
  display: grid;
  gap: 14px;
}

.modal-card .auth-btn {
  margin-top: 0;
}

.resend-row {
  margin-top: 2px;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resend-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.resend-link:hover {
  color: var(--blue-dark);
}

.resend-link.is-disabled,
.resend-link:disabled {
  color: #8c95a8;
  cursor: not-allowed;
  text-decoration: none;
}

.status {
  min-height: 22px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 900;
  color: var(--muted);
}

.status.ok {
  color: var(--success);
}

.status.bad {
  color: var(--danger);
}

@media (max-width: 620px) {
  .auth-header {
    position: static;
    padding: 22px 20px 0;
    justify-content: center;
  }

  .auth-page {
    padding: 32px 14px 28px;
    place-items: start center;
  }

  .auth-card {
    padding: 28px 22px;
    border-radius: 34px;
  }

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

  .auth-title h1 {
    font-size: 32px;
  }

  input {
    height: 56px;
  }

  .modal-card {
    padding: 30px 22px;
    border-radius: 34px;
  }

  .modal-card h2 {
    font-size: 30px;
  }

  .modal-card p {
    font-size: 15px;
  }
}


.auth-btn.is-blocked {
  opacity: .82;
  cursor: not-allowed;
}

.auth-btn.is-blocked:hover {
  transform: none;
  background: var(--blue);
}