/* 前台 getForm() 通用表单 - 使用 qw-tpl-form 前缀避免被覆盖 */
.qw-tpl-form-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  padding: 24px;
  max-width: 480px;
}

.qw-tpl-form {
  max-width: 100%;
}

.qw-tpl-form-title {
  margin: 0 0 20px 0;
  padding-bottom: 16px;
  font-size: 1.4rem;
  font-weight: 600;
  color: #212529;
  border-bottom: 1px solid #e9ecef;
  text-align: center;
}

.qw-tpl-form-item {
  margin-bottom: 20px;
}

.qw-tpl-form-item:last-of-type {
  margin-bottom: 0;
}

.qw-tpl-form-actions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
  text-align: center;
}

.qw-tpl-form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #495057;
}

.qw-tpl-form-required {
  color: #dc3545;
  margin-left: 2px;
}

.qw-tpl-form-desc {
  margin: 4px 0 8px 0;
  font-size: 0.9rem;
  color: #868e96;
  line-height: 1.4;
}

.qw-tpl-form-input,
.qw-tpl-form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #212529;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.qw-tpl-form-input,
.qw-tpl-form-textarea {
  display: block;
}

.qw-tpl-form-input:focus,
.qw-tpl-form-textarea:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.qw-tpl-form-input::placeholder,
.qw-tpl-form-textarea::placeholder {
  color: #adb5bd;
}

.qw-tpl-form-textarea {
  min-height: 100px;
  resize: vertical;
}

.qw-tpl-form-submit {
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background: #0d6efd;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.qw-tpl-form-submit:hover {
  background: #0b5ed7;
}

.qw-tpl-form-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* 移动端响应式 */
@media (max-width: 768px) {
  .qw-tpl-form-card {
    padding: 16px;
    max-width: 100%;
    border-radius: 8px;
  }

  .qw-tpl-form-title {
    font-size: 1.2rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .qw-tpl-form-item {
    margin-bottom: 16px;
  }

  .qw-tpl-form-label {
    font-size: 0.875rem;
    margin-bottom: 6px;
  }

  .qw-tpl-form-desc {
    font-size: 0.8rem;
  }

  .qw-tpl-form-input,
  .qw-tpl-form-textarea {
    padding: 12px 14px;
    font-size: 16px;
    min-height: 44px;
    -webkit-appearance: none;
  }

  .qw-tpl-form-textarea {
    min-height: 100px;
  }

  .qw-tpl-form-actions {
    margin-top: 20px;
    padding-top: 16px;
  }

  .qw-tpl-form-submit {
    padding: 12px 28px;
    min-height: 44px;
    font-size: 1rem;
    width: 100%;
    max-width: 280px;
  }
}
