/* Version: 1.0.3 */
/* Updated: 2026-11-16 */

.header-identity {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.page-back {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid var(--color-surface-border);
  border-radius: 50%;
  color: var(--color-text);
  background: var(--color-surface);
  cursor: pointer;
  transition:
    background-color var(--motion-standard),
    border-color var(--motion-standard),
    transform var(--motion-standard);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.page-back[hidden] {
  display: none;
}

.page-back:hover {
  border-color: rgb(244 119 33 / 42%);
  transform: translateX(-2px);
}

.page-back svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.auth-panel {
  width: min(100%, 520px);
  padding: clamp(26px, 6vw, 42px);
  border: 1px solid var(--color-surface-border);
  border-radius: 28px;
  background: var(--color-surface);
  box-shadow: var(--shadow-surface);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  animation: panel-enter 420ms cubic-bezier(.2, .75, .25, 1) both;
}

.auth-heading {
  margin: 0;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 700;
  letter-spacing: -.06em;
}

.auth-description {
  margin: 10px 0 28px;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.55;
}

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

.auth-field {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 7px;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 650;
}

.auth-field input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid var(--color-surface-border);
  border-radius: 14px;
  outline: 0;
  color: var(--color-text);
  background: rgb(127 127 127 / 6%);
  font: inherit;
  font-size: 16px;
  font-weight: 450;
  transition: border-color var(--motion-standard), background-color var(--motion-standard), box-shadow var(--motion-standard);
}

.auth-field input[type="date"] {
  display: block;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.auth-field input[type="date"]::-webkit-date-and-time-value {
  min-width: 100%;
  text-align: left;
}

.auth-field input:focus {
  border-color: var(--color-accent);
  background: var(--color-surface);
  box-shadow: 0 0 0 3px rgb(244 119 33 / 12%);
}

.auth-submit {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  margin-top: 5px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(110deg, var(--color-accent-strong), var(--color-accent));
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: filter var(--motion-standard), transform var(--motion-standard), opacity var(--motion-standard);
}

.auth-submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.auth-submit:disabled {
  opacity: .6;
  cursor: wait;
  transform: none;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.auth-links a {
  color: var(--color-text);
  text-decoration-color: rgb(244 119 33 / 55%);
  text-underline-offset: 4px;
}

.auth-message {
  display: none;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--color-surface-border);
  border-radius: 13px;
  color: var(--color-text);
  background: rgb(127 127 127 / 7%);
  font-size: 13px;
  line-height: 1.5;
}

.auth-message[data-visible="true"] {
  display: block;
}

.auth-message[data-kind="error"] {
  border-color: rgb(220 70 70 / 30%);
  color: #c74444;
  background: rgb(220 70 70 / 7%);
}

.auth-message[data-kind="success"] {
  border-color: rgb(50 160 100 / 30%);
  color: #258451;
  background: rgb(50 160 100 / 7%);
}

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

.auth-account-email {
  overflow-wrap: anywhere;
  color: var(--color-text-muted);
  font-size: 14px;
}

.auth-secondary-button {
  min-height: 46px;
  border: 1px solid var(--color-surface-border);
  border-radius: 14px;
  color: var(--color-text);
  background: var(--color-surface);
  font-weight: 650;
  cursor: pointer;
}

@media (max-width: 600px) {
  .header-identity {
    gap: 9px;
  }

  .page-back {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .auth-panel {
    border-radius: 23px;
  }

  .auth-links {
    flex-direction: column;
  }
}
