/* =========================================================
   锌合金生产管理系统 · 登录页
   Palette: ink / warm paper / aged brass
   ========================================================= */

:root {
  --bg: #f3f0e9;
  --surface: #fffdf9;
  --ink: #191d21;
  --ink-2: #30363c;
  --ink-3: #50575e;
  --muted: #7e786e;
  --muted-2: #a29a8d;
  --line: #e7e0d3;
  --line-strong: #d7cebd;
  --brass: #b08a50;
  --brass-2: #c8a66f;
  --brass-deep: #8b6938;
  --brass-soft: #f3e8d5;
  --red: #b0463c;
  --red-soft: #faece9;
  --sidebar: #15191d;
  --sidebar-2: #1b2025;
  --sidebar-muted: #87857e;
  --shadow-md: 0 16px 38px rgba(24, 27, 30, 0.09);
  --shadow-lg: 0 28px 80px rgba(17, 20, 23, 0.2);
  --radius: 14px;
  --radius-lg: 20px;
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Segoe UI", sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

h1,
h2,
p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid rgba(176, 138, 80, 0.7);
  outline-offset: 2px;
}

::selection {
  color: var(--ink);
  background: #e9d8ba;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

/* ---------- Left brand panel ---------- */

.login-aside {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 54px 38px;
  color: #d9d4c8;
  background:
    radial-gradient(620px 420px at 18% 0%, rgba(190, 156, 99, 0.16), transparent 65%),
    radial-gradient(720px 520px at 100% 100%, rgba(89, 112, 110, 0.12), transparent 62%),
    linear-gradient(168deg, #1b2025 0%, #14181b 58%, #111518 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.login-aside::before {
  position: absolute;
  top: 50%;
  right: -180px;
  width: 520px;
  height: 520px;
  content: "";
  border: 1px solid rgba(200, 166, 111, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 64px rgba(200, 166, 111, 0.03),
    0 0 0 128px rgba(200, 166, 111, 0.02);
  transform: translateY(-50%);
  pointer-events: none;
}

.login-aside::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 220px;
  content: "";
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.22), transparent);
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-brand-mark {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
}

.login-brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.login-brand-copy strong {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #f3eee3;
}

.login-brand-copy span {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--sidebar-muted);
}

.login-hero {
  position: relative;
  z-index: 1;
  max-width: 520px;
  padding: 34px 0;
  animation: loginRise 0.7s var(--ease) both;
}

.login-kicker {
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--brass-2);
}

.login-hero h1 {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: #f5efe2;
}

.login-hero h1::after {
  display: block;
  width: 46px;
  height: 2px;
  margin: 22px 0 0;
  content: "";
  background: linear-gradient(90deg, var(--brass-2), rgba(200, 166, 111, 0.1));
  border-radius: 2px;
}

.login-aside-foot {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: #65665f;
}

/* ---------- Right login form ---------- */

.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 44px 30px 28px;
  background:
    radial-gradient(760px 460px at 78% -8%, rgba(197, 166, 111, 0.16), transparent 60%),
    radial-gradient(680px 420px at 0% 100%, rgba(94, 118, 116, 0.07), transparent 62%),
    var(--bg);
}

.login-card {
  width: min(410px, 100%);
  padding: 35px 34px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation: loginRise 0.62s var(--ease) 0.06s both;
}

@keyframes loginRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.login-card-head {
  margin-bottom: 24px;
}

.login-eyebrow {
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--brass-deep);
}

.login-card-head h2 {
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.login-card-head > p:last-child {
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--muted);
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 15px;
}

.login-field > span:first-child {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-3);
}

.login-field input {
  width: 100%;
  height: 45px;
  padding: 0 13px;
  font-size: 13px;
  color: var(--ink);
  background: #fffefa;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.login-field input::placeholder {
  font-size: 12px;
  color: #b1a99c;
}

.login-field input:hover {
  border-color: #c9bca9;
}

.login-field input:focus {
  background: #fff;
  border-color: #ae8d5d;
  box-shadow: 0 0 0 3px rgba(176, 138, 80, 0.13);
}

.login-password {
  position: relative;
  display: flex;
}

.login-password input {
  padding-right: 62px;
}

.login-eye {
  position: absolute;
  top: 50%;
  right: 7px;
  height: 30px;
  padding: 0 9px;
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 6px;
  transform: translateY(-50%);
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.login-eye:hover {
  color: var(--ink-2);
  background: rgba(24, 28, 31, 0.05);
}

.login-error {
  margin-bottom: 14px;
  padding: 9px 11px;
  font-size: 11px;
  line-height: 1.6;
  color: #83372f;
  background: var(--red-soft);
  border: 1px solid #eccdc8;
  border-radius: 8px;
}

.login-notice {
  margin-bottom: 16px;
  padding: 9px 11px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--amber, #8a641f);
  background: #f8efdd;
  border: 1px solid #ecdcc0;
  border-radius: 8px;
}

.login-submit {
  display: flex;
  width: 100%;
  height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fbf6ec;
  cursor: pointer;
  background: linear-gradient(160deg, #293037, #171b1f);
  border: 1px solid #161a1e;
  border-radius: 9px;
  box-shadow: 0 8px 18px rgba(24, 28, 31, 0.18);
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.1s ease;
}

.login-submit:hover {
  background: linear-gradient(160deg, #39424a, #1e2429);
  box-shadow: 0 10px 24px rgba(24, 28, 31, 0.24);
}

.login-submit:active {
  transform: translateY(1px);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.login-submit-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-foot {
  width: min(410px, 100%);
  margin-top: 20px;
  font-size: 9px;
  line-height: 1.7;
  color: var(--muted-2);
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-aside {
    min-height: 0;
    padding: 24px 26px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .login-hero,
  .login-aside-foot {
    display: none;
  }

  .login-main {
    padding: 30px 20px 24px;
  }

  .login-card {
    padding: 28px 24px 24px;
  }
}

@media (max-width: 480px) {
  .login-brand-mark {
    width: 42px;
    height: 42px;
  }

  .login-brand-copy strong {
    font-size: 14px;
  }

  .login-card-head h2 {
    font-size: 22px;
  }
}
