:root {
  color-scheme: dark;
  --night: #16110f;
  --night-soft: #241b18;
  --panel: #fff8ec;
  --panel-ink: #211a17;
  --muted: #8d7c69;
  --line: #d8b88e;
  --amber: #d99252;
  --amber-dark: #8f5128;
  --green: #75b596;
  --danger: #b94d4d;
  --focus: #8bd0d8;
  font-family:
    "Segoe UI",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgb(217 146 82 / 7%) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(0deg, rgb(117 181 150 / 5%) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(112deg, rgb(217 146 82 / 16%), transparent 46%),
    linear-gradient(145deg, #16110f 0%, #241815 54%, #10261f 100%);
  color: #fff5e8;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 420px);
  align-items: end;
  gap: 36px;
  width: min(100% - 48px, 1060px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 72px 0;
}

.login-hero {
  align-self: center;
}

.brand-line {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  color: #d8a164;
  font-size: 0.74rem;
  font-weight: 760;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgb(255 245 232 / 38%);
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.brand-mark::before {
  width: 13px;
  height: 29px;
  border: 2px solid var(--amber);
}

.brand-mark::after {
  width: 31px;
  height: 1px;
  background: rgb(255 245 232 / 44%);
}

.brand-mark span {
  width: 4px;
  height: 4px;
  background: #fff5e8;
}

h1 {
  max-width: 680px;
  margin: 0;
  font-family: Georgia, "Noto Serif CJK SC", serif;
  font-size: 4.2rem;
  font-weight: 600;
  line-height: 0.98;
}

.login-hero p {
  margin: 18px 0 0;
  color: #d0beaa;
  font-size: 1.08rem;
}

.login-panel {
  overflow: hidden;
  border: 1px solid rgb(255 245 232 / 22%);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgb(0 0 0 / 32%);
  color: var(--panel-ink);
}

form {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 28px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

select,
input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #c7a77e;
  border-radius: 8px;
  background: #fffdf8;
  color: var(--panel-ink);
  padding: 10px 12px;
}

select {
  cursor: pointer;
}

.login-error {
  min-height: 42px;
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--danger);
  background: #fae8e4;
  color: #7f2d2d;
  font-size: 0.82rem;
  line-height: 1.45;
}

.login-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

button {
  min-height: 48px;
  border: 1px solid var(--amber-dark);
  border-radius: 8px;
  background: var(--amber-dark);
  color: #fff8ef;
  cursor: pointer;
  font-weight: 760;
}

button:hover {
  background: #713d22;
}

@media (max-width: 760px) {
  .login-shell {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 28px;
    width: calc(100% - 28px);
    padding: 40px 0;
  }

  h1 {
    font-size: 2.7rem;
  }

  .login-panel {
    align-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
