/* InstaShake 门店巡检系统 — 自定义样式补充 Tailwind */

/* ── 图片放大查看 Modal ────────────────────────────────── */
.img-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.img-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.img-modal-overlay img {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  object-fit: contain;
}
.img-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  z-index: 10000;
  transition: transform 0.15s;
}
.img-modal-close:hover {
  transform: scale(1.2);
}

/* ── 状态徽章 ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-pending   { background: #f3f4f6; color: #6b7280; }
.badge-uploaded  { background: #fef3c7; color: #d97706; }
.badge-pass      { background: #d1fae5; color: #059669; }
.badge-fail      { background: #fee2e2; color: #dc2626; }
.badge-submitted { background: #dbeafe; color: #2563eb; }
.badge-progress  { background: #fef3c7; color: #d97706; }
.badge-not-start { background: #f3f4f6; color: #9ca3af; }

/* ── 移动端适配 (375px-428px) ─────────────────────────── */
@media (max-width: 428px) {
  html { font-size: 14px; }
  .mobile-card {
    padding: 12px !important;
  }
  .mobile-btn {
    height: 48px;
    font-size: 1rem;
  }
}

/* ── 上传进度条 ────────────────────────────────────────── */
.upload-progress {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  overflow: hidden;
}
.upload-progress-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width 0.3s ease;
}

/* ── 门店卡片悬停 ──────────────────────────────────────── */
.branch-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.branch-card:active {
  transform: scale(0.98);
}
@media (hover: hover) {
  .branch-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }
}

/* ── 图片对比布局 ──────────────────────────────────────── */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.compare-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s;
}
.compare-grid img:hover {
  transform: scale(1.02);
}

/* ── 拍照预览区 ────────────────────────────────────────── */
.photo-preview {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 12px;
  border: 2px dashed #d1d5db;
  background: #f9fafb;
}

/* ── Loading spinner ─────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e5e7eb;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

/* ── Toast 通知 ────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast-success { background: #059669; }
.toast-error   { background: #dc2626; }
.toast-info    { background: #6366f1; }

/* ── 检查项卡片动画 ────────────────────────────────────── */
.checklist-item {
  transition: background-color 0.15s, transform 0.1s;
}
.checklist-item:active {
  transform: scale(0.99);
}

/* ── 报告统计进度条 ────────────────────────────────────── */
.stat-bar {
  height: 8px;
  border-radius: 4px;
  background: #e5e7eb;
  overflow: hidden;
}
.stat-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}
