:root {
  --primary: #07c160;
  --primary-dark: #06ad56;
  --bg: #f6f6f6;
  --card-bg: #ffffff;
  --text: #333333;
  --text-light: #999999;
  --text-mid: #666666;
  --border: #e8e8e8;
  --success: #07c160;
  --warning: #fa9d3b;
  --danger: #fa5151;
  --info: #10aeff;
  --header-h: 52px;
  --tab-h: 52px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 0 16px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(7, 193, 96, 0.2);
}

.header-title { font-size: 17px; font-weight: 600; letter-spacing: 0.5px; }
.header-sub { font-size: 11px; opacity: 0.8; margin-top: 1px; }

/* ===== Bottom Tab Bar ===== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--tab-h);
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -1px 8px rgba(0,0,0,0.04);
}

.tab-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 10px;
  transition: color 0.2s;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
}

.tab-bar-item .tab-icon { font-size: 20px; line-height: 1; }
.tab-bar-item.active { color: var(--primary); }

/* ===== Content ===== */
.page {
  padding: 12px 16px;
  padding-bottom: calc(var(--tab-h) + 60px + var(--safe-bottom));
  display: none;
  animation: fadeIn 0.2s ease;
}
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Back Button ===== */
.page-back {
  display: inline-block;
  padding: 8px 0;
  font-size: 14px;
  color: var(--primary);
  cursor: pointer;
  -webkit-user-select: none;
}

/* ===== Cards (WeChat style) ===== */
.wx-card {
  background: var(--card-bg);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.wx-card-body { padding: 12px 16px 14px; }

.wx-card-footer {
  padding: 10px 16px;
  border-top: 1px solid #f5f5f5;
  font-size: 12px;
  color: var(--text-light);
}

/* ===== Avatar Row ===== */
.avatar-row { display: flex; align-items: center; gap: 12px; }

.avatar {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 700; flex-shrink: 0;
}

.avatar.green { background: linear-gradient(135deg, #07c160, #06ad56); }
.avatar.blue { background: linear-gradient(135deg, #10aeff, #0d8fd6); }
.avatar.orange { background: linear-gradient(135deg, #fa9d3b, #e08620); }
.avatar.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.member-avatar {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.member-avatar.avatar-green { background: linear-gradient(135deg, #e8f8ef, #c3f0d4); }
.member-avatar.avatar-orange { background: linear-gradient(135deg, #fff3e0, #ffe0b2); }

.avatar-info .name { font-size: 17px; font-weight: 600; }
.avatar-info .role { font-size: 13px; color: var(--text-light); margin-top: 2px; }

/* ===== Badge ===== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.badge-green { background: #e8f8ef; color: #07c160; }
.badge-orange { background: #fff3e0; color: #e65100; }
.badge-blue { background: #e3f2fd; color: #1565c0; }
.badge-gray { background: #f5f5f5; color: #999; }
.badge-red { background: #fde8e8; color: #d32f2f; }

/* ===== Stat Grid ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.stat-item {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.stat-item .num { font-size: 22px; font-weight: 700; color: var(--primary); }
.stat-item .label { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* ===== Group Grid ===== */
.group-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.group-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 2px solid transparent;
}

.group-card:active { transform: scale(0.97); }
.group-card.main-group { border-color: var(--primary); }

.group-icon { font-size: 28px; margin-bottom: 4px; }
.group-name { font-size: 14px; font-weight: 600; }
.group-lead { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* ===== Notice ===== */
.notice {
  background: #fffbe8;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #a16207;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* ===== Section Title ===== */
.section-title {
  font-size: 16px;
  font-weight: 600;
  padding: 14px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== Responsibility Items ===== */
.resp-item {
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
  color: var(--text-mid);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.resp-item:last-child { border-bottom: none; }

.resp-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 8px;
}

.resp-dot.green { background: var(--primary); }
.resp-dot.blue { background: var(--info); }
.resp-dot.orange { background: var(--warning); }
.resp-dot.purple { background: #8b5cf6; }

/* ===== Milestone ===== */
.ms-item {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  display: flex;
  gap: 12px;
}

.ms-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  flex-shrink: 0; margin-top: 2px;
}

.ms-dot.active { background: var(--primary); color: #fff; }
.ms-dot.done { background: var(--success); color: #fff; }
.ms-dot.pending { background: #e8e8e8; color: #bbb; }

.ms-body { flex: 1; }
.ms-body .ms-name { font-size: 15px; font-weight: 600; }
.ms-body .ms-period { font-size: 12px; color: var(--text-light); margin-bottom: 6px; }
.ms-body .ms-task { font-size: 13px; color: var(--text-mid); padding: 2px 0 2px 14px; position: relative; }
.ms-body .ms-task::before { content: '·'; position: absolute; left: 4px; color: var(--text-light); }
.ms-other {
  margin-top: 6px;
  padding: 6px 10px;
  background: #f0f9ff;
  border-radius: 6px;
  font-size: 12px;
  color: var(--info);
}

/* ===== Meeting ===== */
.meeting-card {
  background: var(--card-bg);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.meeting-top {
  padding: 14px 16px 10px;
  border-left: 4px solid var(--primary);
}

.meeting-title { font-size: 15px; font-weight: 600; }
.meeting-meta { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.meeting-summary { font-size: 14px; color: var(--text-mid); margin-top: 8px; line-height: 1.6; }

.meeting-detail { padding: 10px 16px 14px; }
.meeting-section { margin-bottom: 10px; }
.meeting-section:last-child { margin-bottom: 0; }
.meeting-section-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }

.todo-item {
  font-size: 13px;
  color: var(--text-mid);
  padding: 3px 0 3px 16px;
  position: relative;
  line-height: 1.5;
}

.todo-item::before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--warning);
}

.todo-deadline { color: var(--warning); font-size: 12px; }

/* ===== Req Module ===== */
.req-item {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.req-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.req-item .req-name { font-size: 15px; font-weight: 600; }
.req-item .req-desc { font-size: 13px; color: var(--text-light); line-height: 1.5; }

/* ===== Extended Requirements ===== */
.ext-name { font-size: 14px; font-weight: 600; color: var(--text); }
.ext-desc { font-size: 13px; color: var(--text-mid); margin-top: 4px; line-height: 1.5; }

/* ===== Tech Tags ===== */
.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tech-tag {
  padding: 4px 10px;
  background: #f5f5f5;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-mid);
}

/* ===== Security List ===== */
.sec-item {
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.5;
}
.sec-item:last-child { border-bottom: none; }
.sec-item strong { color: var(--text); }

/* ===== Goal Timeline ===== */
.goal-item { display: flex; gap: 12px; margin-bottom: 12px; }

.goal-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 7px;
}

.goal-content { flex: 1; }
.goal-label { font-size: 13px; font-weight: 600; color: var(--primary); }
.goal-text { font-size: 13px; color: var(--text-mid); margin-top: 2px; }

/* ===== Form ===== */
.form-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

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

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.required { color: var(--danger); }

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: #fafafa;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus { border-color: var(--primary); background: #fff; }

.form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: #fafafa;
  color: var(--text);
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.2s;
  font-family: inherit;
}

.form-textarea:focus { border-color: var(--primary); background: #fff; }

.radio-group { display: flex; gap: 16px; }

.radio-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 14px; color: var(--text-mid);
  cursor: pointer;
}

.radio-item input[type="radio"] { accent-color: var(--primary); }

.form-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.form-btn:active { opacity: 0.85; }

.form-msg {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}

.form-ok { background: #e8f8ef; color: #07c160; }
.form-err { background: #fde8e8; color: #d32f2f; }

/* ===== Submitted Requirements ===== */
.req-submitted-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.req-submitted-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.req-submitted-title { font-size: 15px; font-weight: 600; flex: 1; }

.req-submitted-meta {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
}

.req-submitted-desc {
  font-size: 13px;
  color: var(--text-mid);
  margin-top: 6px;
  line-height: 1.5;
}

/* ===== Empty ===== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-light);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 8px; }

/* ===== Form Row (two columns) ===== */
.form-row {
  display: flex;
  gap: 10px;
}

/* ===== Admin Link ===== */
.admin-link {
  font-size: 12px;
  color: var(--text-light);
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.admin-link:active { opacity: 0.6; }

/* ===== Submitted Requirement (enhanced) ===== */
.req-submitted-time {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ===== Admin Panel ===== */
.admin-req-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  border-left: 3px solid var(--primary);
}

.admin-req-top {
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 4px;
}

.admin-req-meta {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 6px;
}

.admin-req-desc {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 6px;
}

.admin-req-extra {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 4px;
  padding: 4px 8px;
  background: #fafafa;
  border-radius: 4px;
}

.admin-req-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f5f5f5;
}

.admin-select {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: #fafafa;
  color: var(--text);
  outline: none;
}

.btn-sm {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-red { background: #fde8e8; color: #d32f2f; }
.btn-gray { background: #f5f5f5; color: var(--text-light); }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 0; height: 0; }

/* ===== AI Smart Form Chat ===== */
.ai-msg-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: flex-start;
}

.ai-msg-right {
  justify-content: flex-end;
}

.ai-msg-left {
  justify-content: flex-start;
}

.ai-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.ai-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.ai-bubble-left {
  background: #fff;
  color: var(--text);
  border-top-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.ai-bubble-right {
  background: linear-gradient(135deg, #95ec69, #07c160);
  color: #fff;
  border-top-right-radius: 4px;
}

.ai-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: aiDotBounce 1.2s infinite;
}

.ai-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiDotBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* ===== Voice Button ===== */
.voice-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: #fff;
  color: var(--primary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}
.voice-btn:active, .voice-btn.recording {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 0 6px rgba(7,193,96,0.2);
}

.voice-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f44336;
  animation: voicePulse 1s infinite;
  margin-right: 6px;
  vertical-align: middle;
}
@keyframes voicePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* ===== Inspection Form Fields ===== */
.inspect-field {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.3s;
}
.inspect-field:last-child {
  border-bottom: none;
}
.inspect-field.ai-filled {
  background: #E8F5E9;
}
.inspect-label {
  width: 75px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-mid);
  font-weight: 500;
}
.inspect-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  padding: 2px 0;
}
.inspect-input::placeholder {
  color: #ccc;
  font-size: 12px;
}
.ai-filled .inspect-label {
  color: var(--primary);
}
.ai-filled .inspect-input {
  font-weight: 500;
  color: #1B5E20;
}

/* Inspection record card */
.inspection-record-card {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.inspection-record-card .ir-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.inspection-record-card .ir-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.inspection-record-card .ir-meta {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
}

/* ===== Device Inspection Form ===== */
.voice-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
  z-index: 2;
  -webkit-user-select: none;
  user-select: none;
}

.voice-btn:active,
.voice-btn-active {
  transform: scale(1.15);
  box-shadow: 0 0 0 6px rgba(7, 193, 96, 0.25);
}

.voice-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  animation: voicePulse 1s infinite;
  vertical-align: middle;
  margin-right: 4px;
}

@keyframes voicePulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
  100% { opacity: 1; transform: scale(1); }
}

.inspect-field {
  margin-bottom: 10px;
  border-radius: 8px;
  padding: 8px 10px;
  transition: background 0.3s, border 0.3s;
  border: 1.5px solid transparent;
}

.inspect-field.field-recognized {
  background: #E8F5E9;
  border-color: #A5D6A7;
}

.inspect-field.field-empty {
  background: #F5F5F5;
  border-color: #E0E0E0;
}

.inspect-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 4px;
}

.inspect-field.field-recognized .inspect-label {
  color: #2E7D32;
}

.inspect-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.inspect-input:focus {
  border-color: var(--primary);
}

/* Fix date input on mobile */
.inspect-input[type="date"] {
  min-height: 36px;
}


/* ===== Disclaimer ===== */
.disclaimer-bar {
  background: #FFF3E0;
  padding: 10px 16px;
  font-size: 12px;
  color: #E65100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-top: 1px solid #FFE0B2;
}
.disclaimer-content {
  background: #FFFBF0;
  padding: 16px;
  border-top: 1px solid #FFE0B2;
  margin-bottom: 0;
}

/* ===== Donut Chart ===== */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}
.donut-chart {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.donut-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.donut-center .donut-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.donut-center .donut-label {
  font-size: 10px;
  color: var(--text-light);
}
.donut-legend {
  flex: 1;
}
.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-mid);
  padding: 3px 0;
}
.donut-legend-dot {
  width: 8px; height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ===== Progress Bar Animation ===== */
.bar-animated {
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Accordion ===== */
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background 0.15s;
}
.accordion-header:active {
  background: #f5f5f5;
}
.accordion-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.accordion-arrow {
  font-size: 12px;
  color: var(--text-light);
  transition: transform 0.25s;
}
.accordion-header.open .accordion-arrow {
  transform: rotate(180deg);
}
.accordion-body {
  display: none;
  padding: 0 16px 14px;
}
.accordion-body.open {
  display: block;
}

/* ===== Inspection Filter ===== */
.inspect-filter {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.inspect-filter-btn {
  padding: 5px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-user-select: none;
  user-select: none;
}
.inspect-filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== Inspection card color bar ===== */
.inspect-card {
  background: #fff;
  border-radius: 10px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  overflow: hidden;
  border-left: 4px solid #ccc;
}
.inspect-card.status-在用 { border-left-color: #4CAF50; }
.inspect-card.status-闲置 { border-left-color: #FF9800; }
.inspect-card.status-维修中 { border-left-color: #f44336; }
.inspect-card.status-待报废 { border-left-color: #9E9E9E; }
.inspect-card-body {
  padding: 10px 14px;
}
