/* ========================================
   联网版本补充样式
   ======================================== */

/* 连接状态指示器 */
.connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-500);
  padding: 4px 12px;
  background: var(--gray-100);
  border-radius: 20px;
  margin-right: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-text {
  font-weight: 500;
}

/* Toast 样式 - 联网版覆盖 */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* 提示条是纯文字、没有可点的东西，但窄屏时它横跨整行压在工具条上方：
     连着弹几条就有 3 秒点不动「批量导入」「新建委托」这些按钮（实测踩过）。 */
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md, 8px);
  color: white;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: opacity 0.3s ease;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-success { background: var(--success, #059669); }
.toast-error { background: var(--danger, #dc2626); }
.toast-warning { background: var(--warning, #d97706); }
.toast-info { background: var(--primary, #1e40af); }

.toast { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.toast-text { flex: 1; word-break: break-all; }
.toast-close { cursor: pointer; opacity: 0.7; font-size: 14px; line-height: 1.2; flex-shrink: 0; margin-left: 8px; user-select: none; }
.toast-close:hover { opacity: 1; }

/* 表单错误提示 */
.form-error {
  color: var(--danger, #dc2626);
  font-size: 13px;
  margin-top: 8px;
  padding: 10px 14px;
  background: #fee2e2;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid #fecaca;
}

/* 表单行布局 */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

/* 搜索框内嵌图标 (index.html 使用 SVG 在 search-box 内) */
.search-box svg {
  width: 18px;
  height: 18px;
  color: var(--gray-400, #9ca3af);
  flex-shrink: 0;
}

/* 工具栏样式 */
.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0 16px;
}

.toolbar h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900, #111827);
  margin: 0;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* 分页样式 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 0;
  font-size: 14px;
  color: var(--gray-600, #4b5563);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 超大模态框 */
.modal-xl {
  max-width: 1000px;
  width: 90%;
}

/* 详情网格 */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item label {
  font-size: 12px;
  color: var(--gray-500, #6b7280);
  font-weight: 500;
}

.detail-item span {
  font-size: 14px;
  color: var(--gray-800, #1f2937);
}

/* 响应式补充 */
@media (max-width: 768px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* 窄屏时 style.css 给 .toast-container 补了 bottom:80px，而本文件在它后面写死 top:20px，
     fixed 定位同时有 top 和 bottom 就会把容器拉成整屏高：看不见，但把工具条按钮全盖住
     （实测「批量导入」「新建委托」点了没反应就是这个空盒子挡的）。这里收回 bottom/left。 */
  .toast-container {
    bottom: auto;
    left: auto;
    right: 12px;
  }
}
