/* auth.css - 登录页 */

.auth-page {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #f9f9f7 0%, #ffffff 44%, #f4f4f1 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 24px calc(34px + env(safe-area-inset-bottom));
  overflow: hidden;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(rgba(30, 30, 30, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 30, 30, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 72%, transparent 100%);
  opacity: 0.55;
}

.auth-line {
  position: absolute;
  height: 1px;
  width: 82%;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.16), transparent);
  transform-origin: center;
  opacity: 0.45;
}

.auth-line-a {
  top: 17%;
  left: -18%;
  transform: rotate(-18deg);
}

.auth-line-b {
  right: -26%;
  bottom: 20%;
  transform: rotate(-24deg);
}

.auth-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: authIn 0.55s var(--ease) both;
}

@keyframes authIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 0 10px;
}

.auth-logo {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  flex-shrink: 0;
}

.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-kicker {
  margin-top: 10px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.28em;
  color: rgba(58, 58, 58, 0.46);
}

.auth-title {
  font-size: 30px;
  font-weight: 500;
  color: #2f2f2f;
  line-height: 1.1;
}

.auth-subtitle {
  font-size: 13px;
  color: rgba(58, 58, 58, 0.52);
  line-height: 1.45;
}

.auth-form {
  position: relative;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  box-shadow:
    0 28px 70px rgba(38, 38, 38, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.86) inset;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field label {
  padding-left: 2px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(58, 58, 58, 0.58);
}

.auth-input-wrap {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(0, 0, 0, 0.075);
  border-radius: 17px;
  background: rgba(250, 250, 249, 0.88);
  color: #323232;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition:
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.auth-input-wrap i {
  width: 16px;
  color: rgba(58, 58, 58, 0.36);
  font-size: 13px;
  text-align: center;
}

.auth-input-wrap:focus-within {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.035),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.auth-input {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #2f2f2f;
  padding: 0;
  font-size: 16px;
}

.auth-input::placeholder {
  color: rgba(58, 58, 58, 0.34);
}

.auth-button {
  min-height: 50px;
  border-radius: 17px;
  background: #282828;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 2px;
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.16) inset;
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    opacity var(--dur) var(--ease);
}

.auth-button:active {
  transform: translateY(1px);
  box-shadow:
    0 9px 18px rgba(0, 0, 0, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.auth-button:disabled {
  opacity: 0.58;
  cursor: default;
}

.auth-message {
  min-height: 18px;
  font-size: 12px;
  color: rgba(58, 58, 58, 0.5);
  line-height: 1.5;
  text-align: center;
}

.auth-message.error { color: var(--c-red); }
.auth-message.success { color: #66756b; }

@media (max-height: 660px) {
  .auth-page {
    justify-content: flex-start;
    padding-top: 28px;
  }

  .auth-panel {
    gap: 18px;
  }

  .auth-logo {
    width: 62px;
    height: 62px;
    border-radius: 19px;
  }

  .auth-title {
    font-size: 26px;
  }
}
