/* 登录页：品牌优先，单屏一构图 */

:root {
  --ink: #14201c;
  --muted: #5f726a;
  --panel: rgba(255, 252, 247, 0.92);
  --line: rgba(20, 32, 28, 0.12);
  --gold: #c9921a;
  --forest: #1a4a3c;
  --forest-deep: #0e2a22;
  --danger: #b42318;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f3efe6;
}

.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  overflow: hidden;
}

.login-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 12% 18%, rgba(201, 146, 26, 0.22), transparent 58%),
    radial-gradient(ellipse 55% 50% at 88% 78%, rgba(26, 74, 60, 0.28), transparent 60%),
    linear-gradient(155deg, #efe7d6 0%, #e4ece7 42%, #d7e4de 100%);
  z-index: 0;
}

.login-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(20, 32, 28, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 32, 28, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 72%);
  animation: drift 18s linear infinite;
}

@keyframes drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 48px 24px, 24px 48px; }
}

.login-stage {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 28px;
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.brand-block {
  text-align: center;
}

.brand-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  display: block;
  margin: 0 auto 18px;
  filter: drop-shadow(0 10px 22px rgba(20, 32, 28, 0.18));
  animation: logo-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

@keyframes logo-in {
  from { opacity: 0; transform: scale(0.88) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.brand-name {
  font-family: "Syne", "Noto Sans SC", sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 5vw, 34px);
  letter-spacing: 0.02em;
  color: var(--forest-deep);
  line-height: 1.15;
}

.brand-tag {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.login-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 22px 22px 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(14, 42, 34, 0.1);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
}

.field input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  border-color: rgba(26, 74, 60, 0.55);
  box-shadow: 0 0 0 3px rgba(26, 74, 60, 0.12);
}

.pwd-wrap {
  position: relative;
}

.pwd-wrap input {
  padding-right: 64px;
}

.pwd-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 6px 8px;
}

.pwd-toggle:hover {
  color: var(--forest);
}

.form-error {
  font-size: 13px;
  color: var(--danger);
  min-height: 18px;
}

.hidden { display: none !important; }

.submit {
  margin-top: 4px;
  height: 46px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-deep) 100%);
  color: #f7f4ee;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(14, 42, 34, 0.22);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.submit:hover:not(:disabled) {
  filter: brightness(1.05);
}

.submit:active:not(:disabled) {
  transform: translateY(1px);
}

.submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

@media (max-width: 480px) {
  .login-form { padding: 18px 16px 16px; }
  .brand-logo { width: 76px; height: 76px; }
}
