@import '../../../../styles/admin-config-pages.css';

/* ============================================================
   AdminFulfillmentBindings — 绿色主题覆盖 & 页面特有样式
   ============================================================ */

.admin-panel {
  display: grid;
  gap: 12px;
}

.section-note-chip,
.mini-stat-chip,
.summary-label,
.overview-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  background: rgba(37, 89, 167, 0.08);
  border: 1px solid rgba(37, 89, 167, 0.12);
  color: var(--color-primary-dark);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ---------- 主题：概览标签 ---------- */
.overview-note {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.04);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
}

/* ---------- 主题覆写：header-actions 间距 ---------- */
.header-actions {
  gap: 10px;
}

/* ---------- 主题覆写：卡片圆角 ---------- */
.overview-card,
.table-card,
.empty-block,
.error-copy {
  border-radius: var(--radius-xl);
}

.overview-file code {
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-primary);
}

/* ---------- 主题覆写：概览统计 ---------- */
.overview-stat {
  border-radius: var(--radius-lg);
}

.overview-stat span {
  color: var(--text-secondary);
}

.overview-stat strong {
  color: var(--text-primary);
  font-size: 22px;
}

/* ---------- 查询工具栏 (本页特有) ---------- */
.lookup-toolbar,
.lookup-summary {
  display: grid;
  gap: 12px;
}

.lookup-toolbar {
  grid-template-columns: 96px 110px minmax(140px, 1fr) minmax(180px, 1.2fr) 136px;
  align-items: end;
}

.lookup-summary {
  margin-top: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lookup-summary-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.lookup-summary-item strong {
  color: var(--text-primary);
}

/* ---------- 主题覆写：字段块 ---------- */
.field-block span {
  color: var(--text-secondary);
}

.field-help {
  color: var(--text-secondary);
}

.field-wide {
  grid-column: 1 / -1;
}

/* ---------- 主题覆写：文本输入 ---------- */
.text-input {
  min-height: 40px;
}

/* ---------- Element Plus 输入框绿色主题覆盖 ---------- */
.admin-panel :deep(.el-input__wrapper),
.admin-panel :deep(.el-textarea__inner),
.admin-panel :deep(.el-select__wrapper) {
  min-height: 40px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 1px rgba(86, 108, 138, 0.18) inset;
}

.admin-panel :deep(.el-input__wrapper:hover),
.admin-panel :deep(.el-select__wrapper:hover) {
  box-shadow: 0 0 0 1px rgba(86, 108, 138, 0.32) inset;
}

.admin-panel :deep(.el-input__wrapper.is-focus),
.admin-panel :deep(.el-select__wrapper.is-focused) {
  box-shadow:
    0 0 0 1px rgba(37, 89, 167, 0.38) inset,
    0 0 0 3px rgba(37, 89, 167, 0.1);
}

.admin-panel :deep(.text-input--invalid .el-input__wrapper),
.admin-panel :deep(.text-input--invalid .el-select__wrapper) {
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.45) inset;
  background: #fff8f8;
}

.admin-panel :deep(.text-input--invalid .el-input__wrapper.is-focus),
.admin-panel :deep(.text-input--invalid .el-select__wrapper.is-focused) {
  box-shadow:
    0 0 0 1px rgba(220, 38, 38, 0.6) inset,
    0 0 0 3px rgba(254, 226, 226, 0.95);
}

.admin-panel :deep(.is-disabled .el-input__wrapper),
.admin-panel :deep(.el-input__wrapper.is-disabled),
.admin-panel :deep(.el-select__wrapper.is-disabled) {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-secondary);
}

.admin-panel :deep(.el-input-number .el-input__wrapper) {
  padding-left: 8px;
}

.admin-panel :deep(.el-input-number__decrease),
.admin-panel :deep(.el-input-number__increase) {
  border-color: rgba(86, 108, 138, 0.18);
  background: #f8fafc;
}

/* ---------- 主题覆写：校验/错误/空状态 ---------- */
.validation-banner {
  background: #fff4f2;
  border: 1px solid rgba(244, 63, 94, 0.18);
  color: var(--color-danger);
}

.binding-inline-error {
  color: var(--color-danger);
}

.empty-block,
.empty-inline {
  color: var(--text-secondary);
}

/* ---------- 主题覆写：表格 ---------- */
.data-table th,
.data-table td {
  padding: 12px 10px;
  color: var(--text-primary);
}

.data-table th {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.cell-subtle {
  color: var(--text-secondary);
}

/* ---------- 主题覆写：绑定卡片 ---------- */
.binding-card {
  border-radius: var(--radius-lg);
}

.binding-title-row {
  color: var(--text-primary);
}

.binding-subtle {
  color: var(--text-secondary);
}

.binding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

/* ---------- 主题覆写：折叠/操作/复选框 ---------- */
.binding-collapsed-preview {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.collapse-button {
  color: var(--text-primary);
}

.checkbox-line {
  color: var(--text-secondary);
}

.toolbar-hint {
  color: var(--text-secondary);
}

/* ==============================================
   响应式
   ============================================== */
@media (max-width: 900px) {
  .section-title-row,
  .section-header-tools,
  .binding-actions,
  .binding-header {
    flex-direction: column;
    align-items: stretch;
  }

  .overview-stats,
  .lookup-toolbar,
  .lookup-summary,
  .binding-grid {
    grid-template-columns: 1fr;
  }
}
