:root {
  --page: #edf1f4;
  --surface: #ffffff;
  --text: #202528;
  --muted: #6a747b;
  --line: #d7dde1;
  --accent: #185fa5;
  --accent-hover: #0c447c;
  --error: #a32d2d;
  --error-bg: #fcebeb;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text);
  background: var(--page);
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(100%, 420px);
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.brand-name {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.15;
}

.brand-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.login-card {
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(32, 37, 40, 0.10);
}

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

.login-card h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.login-card header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

form {
  display: flex;
  flex-direction: column;
}

form > label:not(.remember-row) {
  margin-bottom: 6px;
  color: #41494e;
  font-size: 13px;
  font-weight: 500;
}

input[type="text"], input[type="password"] {
  width: 100%;
  height: 42px;
  margin-bottom: 17px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: var(--text);
  font: inherit;
}

input[type="text"]:focus, input[type="password"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.12);
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.remember-row input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.login-error {
  display: none;
  margin-bottom: 14px;
  padding: 9px 11px;
  border-radius: 7px;
  background: var(--error-bg);
  color: var(--error);
  font-size: 12px;
  line-height: 1.5;
}

.login-error.visible { display: block; }

button {
  height: 42px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

button:hover { background: var(--accent-hover); }
button:disabled { opacity: 0.62; cursor: default; }

footer {
  margin-top: 22px;
  color: #929ba1;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 480px) {
  body { padding: 18px; }
  .login-brand { justify-content: flex-start; margin-left: 2px; }
  .login-card { padding: 25px 22px; }
}
