/**
 * user-data.css — 通用「上传表格数据 / 我的上传」弹窗样式（自包含，ghud- 命名空间）
 *
 * 与 user-data.js 配套，任何频道（对比/排行/未来其他）只需同时引入这两份即可，
 * 不依赖 compare.css 或 studio 样式。视觉遵循前台克制规范：圆角≤4px、无弥散阴影、
 * hover 仅轻微加深、不做反色跳变。
 */

.ghud-mask {
  /* 低于 Bootstrap 弹窗(backdrop 1050 / modal 1055)：删除等操作走全局 showConfirm 时，
     确认框须浮在本遮罩之上，否则被盖在下面只看到页面变暗。策略同 .gha-mask，
     取 1040(>gha-mask 的 1030) 是因上传弹窗需盖住 AI 助手遮罩，但仍压在 Bootstrap 弹窗下。 */
  position: fixed; inset: 0; z-index: 1040;
  background: rgba(0, 0, 0, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.ghud-modal {
  width: 560px; max-width: 100%; max-height: 86vh;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid #E5E6EB; border-radius: 4px;
}

.ghud-head {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid #EBEEF5;
}
.ghud-title { font-size: 15px; font-weight: 600; color: #1D2129; }

.ghud-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; }

.ghud-foot {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 10px 16px; border-top: 1px solid #EBEEF5;
}

/* 关闭按钮 / 图标按钮 */
.ghud-icon-btn {
  border: 0; background: transparent; cursor: pointer;
  width: 26px; height: 26px; line-height: 1; font-size: 16px;
  color: #86909C; border-radius: 4px;
}
.ghud-icon-btn:hover { background: #F2F3F5; color: #4E5969; }
.ghud-icon-danger:hover { background: #FEF0F0; color: #D9363E; }

/* 文件拖放区 */
.ghud-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 22px 16px; text-align: center; cursor: pointer;
  border: 1px dashed #C9CDD4; border-radius: 4px; background: #FAFBFC;
  color: #4E5969; font-size: 13px;
}
.ghud-drop:hover { border-color: #1A4FBE; background: #F2F5FA; }
.ghud-drop input[type="file"] { display: none; }
.ghud-drop-plus { font-size: 22px; color: #86909C; line-height: 1; }
.ghud-hint { font-size: 12px; color: #86909C; line-height: 1.5; }
.ghud-error { margin-top: 8px; color: #D9363E; font-size: 12px; }

/* 区块标题 */
.ghud-section {
  display: flex; align-items: center; justify-content: space-between;
  margin: 16px 0 8px;
}
.ghud-section-title { font-size: 13px; font-weight: 600; color: #1F2329; }
.ghud-section-meta { font-size: 12px; color: #86909C; }

.ghud-empty { padding: 14px; text-align: center; color: #86909C; font-size: 13px; }

/* 我的上传列表 */
.ghud-list { display: flex; flex-direction: column; gap: 6px; }
.ghud-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid #EBEEF5; border-radius: 4px;
}
.ghud-item-info { flex: 1; min-width: 0; }
.ghud-item-name {
  display: block; font-size: 13px; color: #1F2329;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ghud-item-meta { font-size: 12px; color: #86909C; margin-top: 2px; }
.ghud-item-meta span + span::before { content: '·'; margin: 0 5px; color: #C9CDD4; }
.ghud-item-ops { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* 预览表 */
.ghud-meta-line { font-size: 12px; color: #86909C; margin-bottom: 10px; }
.ghud-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ghud-table th, .ghud-table td {
  border: 1px solid #EBEEF5; padding: 6px 8px; text-align: center; color: #4E5969;
}
.ghud-table th { background: #FAFBFC; font-weight: 600; color: #1F2329; vertical-align: top; }
.ghud-check { display: flex; align-items: center; gap: 4px; justify-content: center; font-size: 12px; }
.ghud-preview-more { color: #86909C; }

/* 输入框 */
.ghud-input {
  width: 100%; box-sizing: border-box;
  border: 1px solid #C9CDD4; border-radius: 4px;
  padding: 6px 8px; font-size: 13px; color: #1F2329; background: #fff;
}
.ghud-input:focus { outline: none; border-color: #1A4FBE; }
.ghud-unit-input { margin-top: 4px; padding: 3px 6px; font-size: 12px; }
.ghud-source-input { margin-top: 12px; }

/* 按钮 */
.ghud-btn {
  border: 1px solid #C9CDD4; background: #fff; color: #4E5969;
  border-radius: 4px; padding: 6px 14px; font-size: 13px; cursor: pointer;
  line-height: 1.4;
}
.ghud-btn:hover { background: #F2F3F5; }
.ghud-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.ghud-btn-primary { border-color: #1A4FBE; background: #1A4FBE; color: #fff; }
.ghud-btn-primary:hover { background: #163F98; }
.ghud-btn-sm { padding: 4px 10px; font-size: 12px; }
.ghud-btn-block { display: block; width: 100%; text-align: center; }

/* 上传入口按钮（嵌在宿主面板底部，宿主自定位）：与「我的上传」标签同款克制风格 */
.ghud-upload-tag {
  display: inline-block; padding: 0 5px; line-height: 16px;
  font-size: 11px; color: #1A4FBE; background: #EAF1FF; border-radius: 3px;
}
