/* ============================= */
/* 全局样式 */
/* ============================= */

* {
  box-sizing: border-box;
}


body {
  margin: 0;

  font-family:
    Arial,
    "Microsoft YaHei",
    sans-serif;

  background: #f5f6f8;

  color: #222;
}



/* ============================= */
/* 页面主体 */
/* ============================= */

.container {
  max-width: 800px;

  margin: 0 auto;

  padding: 30px 20px;
}


.page-header {
  margin-bottom: 28px;
}


h1 {
  margin-top: 0;

  margin-bottom: 8px;

  font-size: 28px;
}


.subtitle {
  margin: 0;

  color: #666;

  font-size: 16px;
}



/* ============================= */
/* 主按钮 */
/* ============================= */

.main-button {
  width: 100%;

  padding: 16px;

  border: none;

  border-radius: 8px;

  background: #1769aa;

  color: white;

  font-size: 18px;

  cursor: pointer;

  transition: 0.2s;
}


.main-button:hover {
  background: #12588e;
}



/* ============================= */
/* 台账记录区域 */
/* ============================= */

.record-list {
  margin-top: 20px;
}


.empty {
  padding: 40px;

  background: white;

  border-radius: 10px;

  text-align: center;

  color: #777;

  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04);
}



/* ============================= */
/* 单条巡检记录 */
/* ============================= */

.record-card {
  margin-bottom: 15px;

  padding: 18px;

  background: white;

  border-radius: 10px;

  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.05);
}


.record-card h3 {
  margin-top: 0;

  margin-bottom: 12px;

  font-size: 20px;
}


.record-card p {
  margin: 7px 0;

  color: #555;

  line-height: 1.6;
}


.status {
  display: inline-block;

  margin-top: 10px;

  padding: 6px 12px;

  background: #fff3cd;

  border-radius: 20px;

  font-size: 14px;
}



/* ============================= */
/* 弹窗背景 */
/* ============================= */

.modal {
  display: none;

  position: fixed;

  left: 0;

  top: 0;

  width: 100%;

  height: 100%;

  padding: 20px;

  background:
    rgba(0, 0, 0, 0.45);

  overflow-y: auto;

  z-index: 999;
}



/* ============================= */
/* 弹窗内容 */
/* ============================= */

.modal-content {
  max-width: 600px;

  margin: 30px auto;

  padding: 25px;

  background: white;

  border-radius: 12px;

  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.15);
}


.modal-content h2 {
  margin-top: 0;

  margin-bottom: 20px;

  font-size: 24px;
}



/* ============================= */
/* 表单 */
/* ============================= */

label {
  display: block;

  margin-top: 16px;

  margin-bottom: 6px;

  font-weight: bold;

  font-size: 15px;
}


input,
textarea,
select {
  width: 100%;

  padding: 12px;

  border: 1px solid #d0d0d0;

  border-radius: 6px;

  background: white;

  font-size: 16px;

  font-family:
    Arial,
    "Microsoft YaHei",
    sans-serif;
}


input:focus,
textarea:focus,
select:focus {
  outline: none;

  border-color: #1769aa;
}


textarea {
  min-height: 100px;

  resize: vertical;
}



/* ============================= */
/* 照片部分 */
/* ============================= */

.photo-tip {
  margin-top: 7px;

  margin-bottom: 10px;

  font-size: 14px;

  line-height: 1.5;

  color: #777;
}


.photo-preview {
  margin-top: 10px;
}


.photo-preview img {
  display: block;

  width: 100%;

  max-height: 320px;

  object-fit: contain;

  border: 1px solid #ddd;

  border-radius: 8px;

  background: #f5f5f5;
}



/* ============================= */
/* 表单按钮 */
/* ============================= */

.form-buttons {
  display: flex;

  gap: 10px;

  margin-top: 25px;
}


.form-buttons button {
  flex: 1;

  padding: 13px;

  border: none;

  border-radius: 7px;

  font-size: 16px;

  cursor: pointer;
}


.cancel-button {
  background: #e5e5e5;

  color: #222;
}


.cancel-button:hover {
  background: #d7d7d7;
}


.save-button {
  background: #1769aa;

  color: white;
}


.save-button:hover {
  background: #12588e;
}



/* ============================= */
/* 手机适配 */
/* ============================= */

@media (max-width: 600px) {

  .container {
    padding: 20px 15px;
  }


  h1 {
    font-size: 24px;
  }


  .modal {
    padding: 10px;
  }


  .modal-content {
    margin: 10px auto;

    padding: 20px;
  }


  .form-buttons {
    flex-direction: column;
  }

}