/* ==========================================================================
   Capra Translator · 登录 / 注册页
   ========================================================================== */

.auth-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
}

.auth-shell {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* ------------------------------ 左侧 ------------------------------ */
.auth-aside {
  padding: 40px;
  background:
    radial-gradient(560px 320px at 100% 0%, #f3faf6 0%, rgba(243, 250, 246, 0) 68%),
    linear-gradient(168deg, #fbf9f2, #f3f0e6);
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.auth-aside::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 12%;
  height: 76%;
  width: 1px;
  background: linear-gradient(180deg, transparent, #cfdcd5, transparent);
  opacity: 0.6;
}

.auth-brand { display: flex; align-items: center; gap: 13px; }
.auth-brand .brand__mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}
.auth-brand .brand__mark svg { width: 27px; height: 27px; }
.auth-brand .brand__name { font-size: 22px; }

/* ------------------------------ 右侧 ------------------------------ */
.auth-card {
  padding: 44px 44px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-tabs {
  position: relative;
  display: flex;
  gap: 4px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}

.auth-tabs button {
  border: 0;
  background: transparent;
  padding: 9px 4px 12px;
  margin-right: 20px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--faint);
  position: relative;
  transition: color 0.18s;
}
.auth-tabs button.is-active { color: var(--ink); font-weight: 600; }
.auth-tabs button:hover { color: var(--ink); }

.auth-tabs__ink {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: 34px;
  border-radius: 2px;
  background: var(--jade);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), width 0.26s;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: 0.02em;
}

.field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--card-2);
  font-size: 14.5px;
  color: var(--ink);
  outline: 0;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
.field input::placeholder { color: #b3ab9d; }
.field input:focus {
  border-color: var(--jade-2);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(43, 138, 114, 0.12);
}
.field input.is-bad { border-color: #d99f96; background: #fdf4f2; }

.auth-error {
  margin: 0 0 14px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: var(--danger-soft);
  border: 1px solid #f0d3ce;
  color: #8c3529;
  font-size: 12.5px;
  line-height: 1.6;
  animation: rise 0.22s ease both;
}
.auth-error[hidden] { display: none; }

.auth-submit {
  width: 100%;
  height: 46px;
  margin-top: 6px;
  border: 1px solid #17564a;
  border-radius: var(--r-md);
  background: linear-gradient(160deg, #2b8a72, #1b6152);
  color: #f6fffb;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: filter 0.16s, transform 0.12s, box-shadow 0.16s;
  box-shadow: 0 10px 22px -14px rgba(23, 86, 74, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-submit:hover { filter: brightness(1.06); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:disabled { opacity: 0.6; cursor: progress; }

.auth-hint {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--faint);
}
.auth-hint .link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--jade);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: #a9cdc1;
}

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-card { padding: 34px 26px 30px; }
  .auth-page { padding: 16px; }
}
