/* 设备保养提醒 — 设置页与全局弹窗（与主站 Tailwind 并存，专用类前缀 eq-） */

.eq-device-page .eq-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.eq-device-page .eq-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.eq-device-page .eq-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

.eq-device-page table.eq-table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
}

.eq-device-page table.eq-table th {
  text-align: left;
  padding: 0.65rem 0.75rem;
  background: #f9fafb;
  color: #6b7280;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.eq-device-page table.eq-table td {
  padding: 0.65rem 0.75rem;
  border-top: 1px solid #f3f4f6;
  vertical-align: top;
}

.eq-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.eq-badge-ok {
  background: #d1fae5;
  color: #065f46;
}

.eq-badge-warn {
  background: #fef3c7;
  color: #92400e;
}

.eq-badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.eq-rules {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.6;
}

.eq-rules h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: #334155;
}

.eq-rules ul {
  margin: 0;
  padding-left: 1.2rem;
}

/* 表单弹窗 */
.eq-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.eq-modal-overlay.hidden {
  display: none;
}

.eq-modal {
  background: #fff;
  border-radius: 0.75rem;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.eq-modal.eq-modal--device-form {
  max-width: 720px;
}

.eq-modal.eq-modal--spray-form {
  max-width: 960px;
}

.eq-maint-col-hours {
  width: 6.5rem;
}

.eq-maint-col-months {
  width: 5.5rem;
}

.eq-maint-col-action {
  width: 3.25rem;
}

.eq-maint-items-table {
  border-collapse: collapse;
  width: 100%;
}

.eq-maint-items-table thead th {
  padding: 0.4rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.eq-maint-items-table tbody td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.eq-maint-items-table tbody tr:last-child td {
  border-bottom: none;
}

.eq-maint-items-table .eq-input {
  padding: 0.35rem 0.5rem;
  font-size: 0.8125rem;
}

.eq-maint-popup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.eq-maint-popup-table th,
.eq-maint-popup-table td {
  border: 1px solid #e5e7eb;
  padding: 0.35rem 0.5rem;
  text-align: left;
}

.eq-maint-popup-table th {
  background: #f9fafb;
  color: #4b5563;
  font-weight: 600;
}

.eq-modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.eq-modal-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  font-size: 0.875rem;
}

.eq-modal-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.eq-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
}

@media (max-width: 640px) {
  .eq-form-grid {
    grid-template-columns: 1fr;
  }
}

.eq-form-grid .eq-span-2 {
  grid-column: 1 / -1;
}

.eq-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.eq-input,
.eq-select,
.eq-textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.875rem;
}

.eq-textarea {
  min-height: 4rem;
  resize: vertical;
}

/* 全局保养提醒弹窗（加高层级） */
#equipmentMaintGlobalModal.eq-modal-overlay {
  z-index: 100;
}

#equipmentServiceLogModal.eq-modal-overlay {
  z-index: 95;
}

.eq-maint-alert-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #c2410c;
}

.eq-maint-meta {
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  color: #78350f;
  line-height: 1.65;
}

.eq-btn-snooze {
  border-color: #ea580c;
  color: #c2410c;
}

.eq-btn-snooze:hover {
  background: #fff7ed;
}
