/* 巡检模块样式 */

/* ===== 详情页顶部导航 ===== */
.header .back-btn {
  position: absolute;
  left: 12px;
  top: 14px;
  color: #fff;
  text-decoration: none;
  font-size: 20px;
  font-weight: 400;
}

.header .home-btn {
  position: absolute;
  right: 12px;
  top: 14px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 10px;
  border-radius: 12px;
}

/* ===== 季度标签 ===== */
.quarter-label {
  text-align: center;
  font-size: 14px;
  color: #2b6cb0;
  background: #ebf8ff;
  padding: 8px 16px;
  font-weight: 600;
}

/* ===== 巡检任务卡片 ===== */
.inspect-list {
  padding: 12px 16px 20px;
}

.inspect-card {
  display: block;
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  text-decoration: none;
  color: #333;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: background 0.2s;
}

.inspect-card:active {
  background: #f7fafc;
}

.inspect-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.inspect-card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}

.inspect-status-tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.inspect-status-tag.s-pending { background: #fed7d7; color: #c53030; }
.inspect-status-tag.s-progress { background: #feebc8; color: #c05621; }
.inspect-status-tag.s-completed { background: #c6f6d5; color: #2f855a; }

.inspect-card-row {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

.inspect-progress-bar {
  margin-top: 8px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.inspect-progress-fill {
  height: 100%;
  background: #2b6cb0;
  border-radius: 3px;
  transition: width 0.3s;
}

/* ===== 巡检详情概况 ===== */
.inspect-overview {
  margin: 12px 16px;
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.overview-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.overview-quarter {
  font-size: 14px;
  color: #2b6cb0;
  margin-bottom: 12px;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.overview-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.overview-label {
  font-size: 12px;
  color: #999;
}

.overview-value {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

/* ===== 设备清单 ===== */
.device-section-title {
  padding: 12px 16px 6px;
  font-size: 14px;
  font-weight: 600;
  color: #666;
}

.device-list {
  padding: 0 16px 20px;
}

.device-card {
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.device-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.device-name {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}

.device-status-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 8px;
  white-space: nowrap;
}

.device-status-tag.ds-pending { background: #fed7d7; color: #c53030; }
.device-status-tag.ds-done { background: #c6f6d5; color: #2f855a; }
.device-status-tag.ds-empty { background: #e2e8f0; color: #718096; }
.device-status-tag.ds-resolved { background: #bee3f8; color: #2b6cb0; }
.device-status-tag.ds-ticket { background: #feebc8; color: #c05621; }

/* 查看售后工单链接（设备卡片内） */
.device-row-link {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: #2b6cb0;
  text-decoration: none;
}
.device-row-link:active { opacity: 0.7; }

.device-row {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

.device-row .label {
  color: #999;
  margin-right: 4px;
}

/* 开始巡检按钮（设备卡片内） */
.inspect-start-btn {
  margin-top: 12px;
  margin-bottom: 0;
  padding: 10px 16px;
  font-size: 15px;
}

/* ===== 按钮式单选（设备状态 / 问题是否现场解决）=====
   仅用于 inspect.html 的两组单选，不影响字段值与提交逻辑 */
.status-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.status-option {
  flex: 1 1 calc(50% - 10px);      /* 移动端每行2个，4选项呈2x2，2选项并排 */
  min-height: 48px;                 /* 手机端触控最小尺寸 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  background: #fff;
  border: 2px solid #2b6cb0;        /* 未选中：白底蓝边 */
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #2b6cb0;                   /* 未选中：蓝字 */
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.status-option:active {
  opacity: 0.75;
}

.status-option--active {
  background: #2b6cb0;               /* 已选中：蓝底 */
  color: #fff;                       /* 已选中：白字 */
  border-color: #2b6cb0;
}

.status-option--active::before {
  content: '✓ ';                     /* 已选中显示对勾 */
  font-weight: 700;
}

/* ===== inspect.html 表单区域协调样式（仅样式，不影响字段值与提交逻辑）===== */

/* 字段容器：各区域之间统一 16px 垂直间距 */
.inspect-field {
  margin-top: 16px;
}

/* 字段标题：字号与设备状态区域协调 */
.inspect-field__label {
  display: block;            /* 强制上下布局，避免 label 与输入框横排 */
  font-size: 15px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
}

/* 必填红星 */
.inspect-field__label .req {
  color: #e53e3e;
  margin-left: 2px;
}

/* 当前操作人下拉：高度对齐 .status-option(48px)，字号清晰易读 */
.inspect-field__select {
  display: block;
  width: 100%;
  height: 48px;              /* 手机端触控最小尺寸，与设备状态按钮一致 */
  padding: 0 12px;
  font-size: 16px;           /* 避免 iOS 缩放，且已选人员清晰易读 */
  line-height: 46px;         /* 垂直居中已选人员 */
  color: #2d3748;
  background: #fff;
  border: 1px solid #a0aec0;
  border-radius: 10px;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* 多行输入框：占满内容宽度，上下布局 */
.inspect-field__textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.5;
  color: #2d3748;
  background: #fff;
  border: 1px solid #a0aec0;
  border-radius: 10px;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
}

/* 异常描述高度 90–110px */
#txt-fault {
  min-height: 90px;
  height: 100px;
}

/* 处理建议高度 80–100px */
#txt-suggestion {
  min-height: 80px;
  height: 90px;
}
