*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px;
  background: url("/static/images/background.jpg") no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 40px 36px 36px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.login-title {
  margin-bottom: 36px;
  font-size: 24px;
  font-weight: 700;
  color: #333;
  text-align: center;
  letter-spacing: 1px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #999;
  pointer-events: none;
}

.input-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.login-input {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 42px;
  border: 1px solid #e0e6ed;
  border-radius: 4px;
  background: #e8f0fe;
  font-size: 14px;
  color: #333;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.login-input::placeholder {
  color: #bbb;
}

.login-input:focus {
  border-color: #4da1f7;
  background: #f5f9ff;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: #4da1f7;
}

.toggle-password svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.login-btn {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  border: none;
  border-radius: 4px;
  background: #4da1f7;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.login-btn:hover:not(:disabled) {
  background: #3d91e7;
}

.login-btn:active:not(:disabled) {
  background: #3582d4;
}

.login-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.login-error {
  margin-top: 14px;
  min-height: 20px;
  font-size: 13px;
  color: #f56c6c;
  text-align: center;
  line-height: 1.4;
}

.login-error:empty {
  display: none;
}

.login-form.hidden {
  display: none;
}

.login-sms-panel {
  display: none;
}

.login-sms-panel.active {
  display: block;
}

.login-sms-tip {
  margin: -18px 0 24px;
  font-size: 14px;
  color: #666;
  text-align: center;
  line-height: 1.6;
}

.login-sms-tip strong {
  color: #4da1f7;
  font-weight: 600;
}

.login-sms-code {
  padding-left: 16px;
  letter-spacing: 4px;
  text-align: center;
}

.login-sms-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.login-sms-actions .login-btn {
  margin-top: 0;
  flex: 1;
}

.login-btn-secondary {
  background: #fff;
  color: #4da1f7;
  border: 1px solid #4da1f7;
}

.login-btn-secondary:hover:not(:disabled) {
  background: #eef6ff;
}

.login-btn-secondary:disabled {
  color: #a0cfff;
  border-color: #a0cfff;
  background: #fff;
}

.login-back-link {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
}

.login-back-link a {
  color: #909399;
  text-decoration: none;
}

.login-back-link a:hover {
  color: #4da1f7;
}

.login-sms-debug {
  margin: -12px 0 18px;
  padding: 10px 12px;
  font-size: 13px;
  color: #606266;
  line-height: 1.6;
  text-align: center;
  background: #f4f4f5;
  border-radius: 4px;
}

.login-sms-debug strong {
  color: #409eff;
  font-size: 18px;
  letter-spacing: 2px;
}

.login-version {
  margin-top: 16px;
  font-size: 12px;
  color: #909399;
  text-align: center;
  user-select: none;
}
