* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  width: 100%;
  font-family: 'PingFang SC','Microsoft YaHei',sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  background: url("bg.svg") no-repeat center center fixed,
              linear-gradient(135deg, #e6f0ff, #ffffff);
  background-size: cover;
}

.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.login-box {
  background: #fff;
  padding: 40px;
  width: 380px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  text-align: center;
  position: relative;
  animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

h2 { color: #0b63c9; margin-bottom: 6px; font-weight: 700; }
.subtext { color: #6b7280; font-size: 13px; margin-bottom: 16px; }

input[type="text"], input[type="password"] {
  width: 100%;
  padding: 14px;
  margin: 10px 0;
  border: 1px solid #cfd4dc;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
}
input:focus {
  border-color: #0b63c9;
  box-shadow: 0 0 4px rgba(11,99,201,0.25);
  outline: none;
}

.input-wrapper { position: relative; }
.toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: #0b63c9; cursor: pointer;
}

#errorMsg {
  color: #d90429;
  font-size: 14px;
  margin: 6px 0 8px;
  line-height: 20px;
  min-height: 20px;
  display: none;
  text-align: left;
}

.options {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: #4b5563; margin: 6px 0 14px;
}
.options a { color: #0b63c9; text-decoration: none; }
.options a:hover { text-decoration: underline; }

button {
  width: 100%; padding: 14px; border: 0; border-radius: 10px;
  background: #0b63c9; color: #fff; font-size: 16px; cursor: pointer;
}
button:hover { background: #094fa3; }

.loading {
  display: none; margin-top: 10px; font-size: 13px; color: #0b63c9;
}

.shake { animation: shake .3s; }
@keyframes shake {
  0%{transform:translateX(0)}25%{transform:translateX(-5px)}
  50%{transform:translateX(5px)}75%{transform:translateX(-5px)}
  100%{transform:translateX(0)}
}

@media (max-width: 420px) {
  .login-box { width: 92%; padding: 28px; }
}
