.auth-page {
  --border: rgba(31, 42, 31, 0.12);
  --surface-2: #F5FAF2;
}

.auth-page .muted {
  color: rgba(31, 42, 31, 0.72);
}

.auth-page .subtitle {
  margin: 0;
  color: rgba(31, 42, 31, 0.72);
  line-height: 1.6;
}

.auth-page .section {
  padding: 22px 0;
}

/* Page head */
.page-head {
  padding: 22px 0 8px;
}

.page-head h1 {
  margin: 0 0 8px;
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem);
}

/* Login card */
.login-card {
  width: min(520px, 100%);
  margin: 10px auto 0;
  padding: 40px 30px;
  background: var(--surface-2);
  border-radius: 16px;
  border: 1px solid rgba(14, 11, 8, 0.12);
  box-shadow:
    -3px -3px 7px rgba(255, 255, 255, 0.85),
    2px 2px 6px rgba(14, 11, 8, 0.12);
}

.login-title {
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 18px;
  color: #1F2A1F;
}

.field {
  width: 100%;
  position: relative;
  margin-top: 14px;
  display: block;
}

.input {
  display: block;
  height: 52px;
  width: 100%;
  padding-left: 54px;
  padding-right: 16px;
  outline: none;
  border: 1px solid #DDEBD7;
  font-size: 16px;
  background: #FFFFFF;
  color: #1F2A1F;
  border-radius: 999px;
  box-shadow:
    inset 2px 2px 5px rgba(14, 11, 8, 0.12),
    inset -5px -5px 10px rgba(255, 255, 255, 0.85);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.input:focus {
  border-color: rgba(14, 11, 8, 0.18);
  box-shadow:
    inset 1px 1px 2px rgba(14, 11, 8, 0.12),
    inset -1px -1px 2px rgba(255, 255, 255, 0.85),
    0 0 0 3px rgba(118, 185, 87, 0.16);
}

.icon {
  position: absolute;
  left: 16px;
  top: 26px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(31, 42, 31, 0.66);
  pointer-events: none;
}

.label {
  position: absolute;
  top: 26px;
  transform: translateY(-50%);
  left: 54px;
  pointer-events: none;
  color: rgba(31, 42, 31, 0.72);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.input:focus + .label,
.input:not(:placeholder-shown) + .label,
.input:focus + .icon + .label,
.input:not(:placeholder-shown) + .icon + .label {
  opacity: 0;
  transform: translateY(-60%);
}

.field-error {
  margin-top: 6px;
  font-size: 0.92rem;
  color: rgba(140, 74, 47, 0.95);
}

.is-invalid {
  border-color: rgba(140, 74, 47, 0.65) !important;
  box-shadow:
    inset 1px 1px 2px rgba(14, 11, 8, 0.12),
    inset -1px -1px 2px rgba(255, 255, 255, 0.85),
    0 0 0 3px rgba(140, 74, 47, 0.12) !important;
}

.options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  color: #1F2A1F;
}

.check input {
  width: 18px;
  height: 18px;
}

.link {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #1F2A1F;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link:hover {
  color: #1F2A1F;
}

.notice {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface, #FFFFFF);
  color: #1F2A1F;
}

.notice.is-hidden {
  display: none;
}

.notice.is-error {
  border-color: rgba(140, 74, 47, 0.35);
}

.notice.is-success {
  border-color: rgba(118, 185, 87, 0.45);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 15px 0 0;
  width: 100%;
  height: 50px;
  font-size: 17px;
  font-weight: 600;
  background-color: var(--color-bg);
  background-image: var(--animated-gradient);
  background-size: var(--animated-gradient-size);
  background-position: 0% 50%;
  animation: gradient-animation var(--animated-gradient-speed) ease infinite;
  border-radius: 999px;
  border: 1px solid rgba(14, 11, 8, 0.08);
  outline: none;
  cursor: pointer;
  color: #FFFFFF;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  transform: translateY(-2px);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.button:active {
  transform: translateY(-1px);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0 10px;
}

.signup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hint {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface, #FFFFFF);
  color: rgba(31, 42, 31, 0.72);
}

@media (max-width: 640px) {
  .auth-page .container {
    width: min(1120px, calc(100% - 28px));
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
