:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --panel-2: #fafbfc;
  --line: #e3e8ef;
  --line-2: #eef1f5;
  --text: #1f2b3d;
  --text-2: #5b6b80;
  --text-3: #8c9aad;
  --brand: #1f6feb;
  --brand-dark: #1757bd;
  --danger: #c62828;
  --sans: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC",
    "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC",
    "WenQuanYi Micro Hei", "DejaVu Sans", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
input, button { font-family: inherit; font-size: 14px; }
h1 { margin: 0; font-weight: 650; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
input[type=text], input[type=password] {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31,111,235,.13);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 8px 15px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

#login {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef3fb 0%, #f7f9fc 45%, #eaf1fd 100%);
  padding: 20px;
  z-index: 60;
}
#login .box {
  width: 100%;
  max-width: 390px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(16,24,40,.11);
  padding: 32px 30px;
}
#login .logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 16px;
  overflow: hidden;
}
#login .logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
#login h1 { font-size: 20px; margin-bottom: 18px; text-align: center; }
#login .field { margin-bottom: 14px; }
#login .lg-opts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin: 2px 0 6px;
  flex-wrap: wrap;
}
#login .lg-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
#login .lg-remember input { width: auto; margin: 0; cursor: pointer; }
#login .btn.primary { width: 100%; padding: 10px; margin-top: 6px; }
#login .err {
  color: var(--danger);
  font-size: 13px;
  margin-top: 10px;
  line-height: 1.55;
  word-break: break-word;
}
#login .err:empty { display: none; }
