/* ============================================================
   common.css - 所有页面共享样式
   ============================================================ */

/* ---------- 基础重置 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ---------- Toast 提示 ---------- */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 12px 24px;
  border-radius: 12px;
  background: #1e293b;
  color: white;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}
.toast-container.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-container.success { background: #16a34a; }
.toast-container.error { background: #dc2626; }
.toast-container.warning { background: #f59e0b; }

/* ---------- 按钮 ---------- */
.btn {
  background: white;
  border: 1px solid #d1d9e6;
  padding: 8px 20px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 14px;
  color: #1e293b;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary { background: #1a4a8b; border-color: #1a4a8b; color: white; }
.btn-primary:hover:not(:disabled) { background: #0f3b73; }

.btn-success { background: #16a34a; border-color: #16a34a; color: white; }
.btn-success:hover:not(:disabled) { background: #15803d; }

.btn-danger { background: #dc2626; border-color: #dc2626; color: white; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }

.btn-warning { background: #f59e0b; border-color: #f59e0b; color: white; }
.btn-warning:hover:not(:disabled) { background: #d97706; }

.btn-outline { background: transparent; border: 1px solid #cbd5e1; }
.btn-outline:hover:not(:disabled) { background: #f1f5f9; }

.btn-sm { padding: 4px 14px; font-size: 13px; }
.btn-xs { padding: 2px 10px; font-size: 12px; }

/* ---------- 状态标签 ---------- */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 12px;
  padding: 3px 14px;
  border-radius: 60px;
}
.status-tag.checked { background: #dcfce7; color: #166534; }
.status-tag.unchecked { background: #fee2e2; color: #991b1b; }
.status-tag.abandoned { background: #fef3c7; color: #92400e; }

/* ---------- 弹窗 ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}
.modal-overlay.show { display: flex; }

.modal-box {
  background: white;
  border-radius: 24px;
  padding: 32px 36px;
  max-width: 560px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-box h2 {
  font-size: 22px;
  font-weight: 800;
  color: #0f2b5c;
  margin-bottom: 16px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 600px) {
  .modal-box { padding: 20px 16px; }
  .btn { font-size: 12px; padding: 6px 14px; }
}