:root {
  --bg: #f3f5f2;
  --surface: #ffffff;
  --ink: #202622;
  --muted: #68716b;
  --line: #dce1dd;
  --line-strong: #c8cfca;
  --green: #247a55;
  --red: #b54646;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: 0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; margin: 0; }
body { min-width: 320px; display: grid; place-items: center; padding: 24px; background: var(--bg); font-size: 14px; }
button, input { font: inherit; letter-spacing: 0; }

.login-shell {
  width: min(430px, 100%);
  min-height: 520px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 18px 44px rgba(29, 39, 33, 0.1);
}

.brand-row { display: flex; align-items: center; gap: 11px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.brand-row img { width: 42px; height: 42px; object-fit: contain; padding: 3px; border: 1px solid var(--line); border-radius: 6px; }
.brand-row strong, .brand-row span { display: block; }
.brand-row strong { font-size: 18px; line-height: 1.25; }
.brand-row span { color: var(--muted); font-size: 12px; }

.login-form { margin: auto 0; display: grid; gap: 16px; }
.form-heading { margin-bottom: 7px; }
.form-heading > span { color: var(--green); font-size: 11px; font-weight: 700; }
.form-heading h1 { margin: 3px 0 0; font-size: 25px; line-height: 1.25; }
label { display: grid; gap: 6px; }
label > span { color: var(--muted); font-size: 11px; font-weight: 600; }
.password-field { height: 46px; display: grid; grid-template-columns: 38px minmax(0, 1fr) 42px; align-items: center; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); }
.password-field:focus-within { border-color: var(--green); outline: 3px solid rgba(36, 122, 85, 0.14); }
.password-field > svg { width: 17px; height: 17px; justify-self: center; color: var(--muted); }
.password-field input { width: 100%; height: 42px; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; }
.password-field button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.password-field button svg { width: 17px; height: 17px; }
.error-message { margin: -5px 0 0; padding: 9px 11px; border-left: 3px solid var(--red); color: #873838; background: #fbe9e8; font-size: 11px; }
.login-command { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid #1f6849; border-radius: 5px; color: #fff; background: var(--green); font-weight: 700; cursor: pointer; }
.login-command:hover { background: #1e6d4b; }
.login-command:disabled { cursor: wait; opacity: 0.65; }
.login-command svg { width: 18px; height: 18px; }

footer { min-height: 44px; display: flex; align-items: center; gap: 7px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
footer svg { width: 15px; height: 15px; color: var(--green); }

@media (max-width: 540px) {
  body { place-items: stretch; padding: 0; background: var(--surface); }
  .login-shell { min-height: 100vh; width: 100%; padding: max(28px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom)); border: 0; box-shadow: none; }
}
