:root {
  color-scheme: light;
  --ink: #26352a;
  --muted: #687667;
  --forest: #335a3d;
  --forest-deep: #213d2a;
  --surface: #fffdf7;
  --line: rgba(47, 77, 52, .18);
  --error: #a94646;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #dce8d5 url("/assets/forest-theme.png") center / cover fixed no-repeat;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(90deg, rgba(24, 53, 34, .78) 0 48%, rgba(238, 243, 229, .58) 72% 100%);
}
button, input { font: inherit; }
button { cursor: pointer; }

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr);
}
.login-intro {
  min-height: 100vh;
  padding: 42px clamp(34px, 7vw, 110px) 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
}
.login-brand { display: flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
}
.brand-mark svg { width: 32px; height: 32px; }
.leaf-main { fill: #dcebbd; }
.leaf-vein { fill: none; stroke: #547456; stroke-width: 1.8; stroke-linecap: round; }
.login-brand > span:last-child { display: grid; gap: 3px; }
.login-brand strong { font-size: 20px; letter-spacing: 0; }
.login-brand small { color: rgba(255,255,255,.68); font-size: 9px; letter-spacing: 1.5px; }
.intro-copy { max-width: 610px; padding-bottom: 8vh; }
.intro-copy p { margin: 0 0 17px; color: #d7e9c6; font-size: 11px; font-weight: 700; letter-spacing: 1.8px; }
.intro-copy h1 { max-width: 560px; margin: 0 0 18px; font-family: Georgia, "Songti SC", serif; font-size: clamp(38px, 5.6vw, 76px); font-weight: 500; line-height: 1.08; letter-spacing: 0; }
.intro-copy span { max-width: 470px; display: block; color: rgba(255,255,255,.75); font-size: 15px; line-height: 1.8; }

.login-panel {
  min-height: 100vh;
  padding: 36px clamp(28px, 5vw, 72px);
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px);
  border-left: 1px solid rgba(255,255,255,.55);
}
.login-form { width: min(100%, 390px); }
.form-heading p { margin: 0 0 7px; color: var(--forest); font-size: 12px; font-weight: 700; }
.form-heading h2 { margin: 0 0 32px; font-size: 30px; font-weight: 650; letter-spacing: 0; }
.login-error { margin: -12px 0 20px; padding: 11px 12px; border-left: 3px solid var(--error); background: #f7e8e5; color: var(--error); font-size: 12px; }
.login-form > label { margin-bottom: 19px; display: grid; gap: 8px; }
.login-form label > span:first-child { color: var(--muted); font-size: 12px; font-weight: 650; }
.login-form input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  background: rgba(255,255,255,.82);
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.login-form input:focus { border-color: #5f8661; background: white; box-shadow: 0 0 0 3px rgba(75, 117, 77, .12); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 50px; }
.password-field button { position: absolute; inset: 6px 7px 6px auto; width: 36px; border: 0; background: transparent; color: #6a7a68; font-size: 19px; }
.submit-button {
  width: 100%;
  height: 50px;
  margin-top: 7px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 6px;
  background: var(--forest-deep);
  color: white;
  font-weight: 700;
  box-shadow: 0 12px 25px rgba(33, 61, 42, .2);
  transition: background .2s, transform .2s;
}
.submit-button:hover { background: var(--forest); transform: translateY(-1px); }
.login-form > small { margin-top: 18px; display: block; color: #899486; text-align: center; font-size: 11px; }

@media (max-width: 820px) {
  body::before { background: linear-gradient(180deg, rgba(24, 53, 34, .7), rgba(235, 241, 225, .76) 42%); }
  .login-shell { grid-template-columns: 1fr; }
  .login-intro { min-height: 34vh; padding: 24px 24px 32px; }
  .intro-copy { padding: 44px 0 0; }
  .intro-copy h1 { max-width: 420px; font-size: 38px; }
  .intro-copy span { font-size: 13px; }
  .login-panel { min-height: 66vh; padding: 38px 24px 56px; border-left: 0; border-top: 1px solid rgba(255,255,255,.6); }
}

@media (max-width: 420px) {
  .login-brand small { display: none; }
  .intro-copy h1 { font-size: 32px; }
  .form-heading h2 { font-size: 25px; }
}
