/* 移动端优化样式 */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica,
    sans-serif;
  line-height: 1.5;
  color: #333;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 表单基本样式 */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 15px;
}

.form-group {
  margin-bottom: 18px;
}

.form-control {
  transition: all 0.2s ease-in-out;
  border-radius: 6px;
  font-size: 16px;
}

.form-control:focus {
  border-color: #007aff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

/* 按钮样式 */
.btn-submit {
  transition: all 0.2s ease;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-submit:hover {
  background-color: #0062cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-submit:active {
  background-color: #004999;
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 响应式布局 */
@media (min-width: 768px) {
  .form-container {
    padding: 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
  }
}

@media (max-width: 767px) {
  body {
    background-color: #fff;
  }

  .form-container {
    padding: 15px;
  }

  .btn-submit {
    position: sticky;
    bottom: 15px;
    z-index: 100;
  }

  .section-title {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f2f2f7;
  }
}

/* 表单分组样式 */
.section-title {
  font-weight: 600;
  padding: 10px 15px;
  background-color: #f2f2f7;
  border-left: 4px solid #007aff;
  margin: 25px -15px 20px;
  font-size: 16px;
}

/* 必填项标记 */
.required:after {
  content: " *";
  color: #ff3b30;
  font-weight: bold;
}

/* 单选按钮组样式 */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 5px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
}

.radio-item input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 50%;
  outline: none;
  transition: all 0.2s;
  position: relative;
  margin: 0;
}

.radio-item input[type="radio"]:checked {
  border-color: #007aff;
  background-color: #fff;
}

.radio-item input[type="radio"]:checked:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #007aff;
}

/* 表单验证样式 */
.invalid-feedback {
  color: #ff3b30;
  font-size: 13px;
  margin-top: 5px;
  display: none;
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: #ff3b30;
}

input.is-invalid + .invalid-feedback,
select.is-invalid + .invalid-feedback,
textarea.is-invalid + .invalid-feedback {
  display: block;
}

/* 下拉菜单自定义样式 */
select.form-control {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 30px;
}

/* 日期时间输入框样式 */
input[type="date"],
input[type="datetime-local"] {
  min-height: 44px;
}

/* 表格样式优化 */
.table {
  border-collapse: collapse;
  width: 100%;
  border: 1px solid #e1e1e1;
}

.table td {
  padding: 12px;
  border: 1px solid #e1e1e1;
}

.table-title {
  background-color: #f7f7f7;
  font-weight: 600;
  width: 30%;
  text-align: center;
}

.table-content {
  color: #333;
}

/* 返回按钮样式 */
.back-btn {
  background-color: #007aff;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.back-btn:hover {
  background-color: #0062cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.back-btn:active {
  background-color: #004999;
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
