$primaryBlue: #2a7bfa;
$primaryLightBlue: #3289fb;

// ==========================================================
// 管理后台通用页面样式（orders / hospitals / accounts 等复用）
// 全部规则加 !important，避免被 el-table / 全局样式覆盖。
// ==========================================================

// 业务页面外层卡片（圆角 + 边框 + 内边距）
.admin-page-card {
  background: #ffffff !important;
  border-radius: 16px !important;
  border: 1px solid #e0e0e0 !important;
  padding: 24px !important;

  // 表格主题（与 order-list 中一致）：
  // - 隐藏 el-table 外层伪元素边框，仅保留 cell 之间的分隔线
  // - 表头浅色背景 + 中等字重
  .admin-table {
    border-radius: 12px !important;
    border: 1px solid #e0e0e0 !important;
    overflow: hidden !important;

    &::before,
    &::after {
      display: none !important;
    }

    .el-table__inner-wrapper::before,
    .el-table__inner-wrapper::after {
      display: none !important;
    }

    .admin-table-header-cell {
      background: #f9faff !important;
      font-weight: 500 !important;
      font-size: 14px !important;
      color: #666666 !important;
      line-height: 18px !important;
    }
  }

  // 过滤表单（按钮右对齐最后一项）
  .admin-filter-form {
    margin-bottom: 16px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    align-items: center !important;

    .el-form-item,
    .el-button {
      margin: 0 !important;
    }

    .el-button:last-child {
      margin-left: auto !important;
    }
  }

  // 分页器
  .admin-pagination {
    margin-top: 16px !important;
    display: flex !important;
    justify-content: flex-end !important;
  }
}

// ==========================================================
// 详情区块（label / value 行展示）
// ==========================================================
.admin-detail-block {
  .detail-row + .detail-row {
    margin-top: 15px !important;
  }

  .detail-row {
    display: grid !important;
    gap: 15px !important;

    &.row-1 {
      grid-template-columns: 1fr !important;
    }

    &.row-2 {
      grid-template-columns: repeat(2, 1fr) !important;
    }

    &.row-3 {
      grid-template-columns: repeat(3, 1fr) !important;
    }

    &.row-4 {
      grid-template-columns: repeat(4, 1fr) !important;
    }

    .detail-item {
      display: flex !important;
      align-items: center !important;
      gap: 10px !important;

      .label {
        font-weight: 400 !important;
        font-size: 14px !important;
        color: #1d2129 !important;
        width: 4em !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
      }

      .value {
        flex-shrink: 1 !important;
        flex-grow: 1 !important;
        font-weight: 400 !important;
        font-size: 14px !important;
        color: #666666 !important;
        padding: 10px !important;
        background: #f8f8f8 !important;
        border-radius: 8px !important;
        border: 1px solid #e0e0e0 !important;
        min-width: 0 !important;
      }
    }
  }
}

// 通用 plain 按钮 hover/active 重置（避免视觉变化），与订单列表保持一致
.el-button.is-plain {
  background-color: transparent !important;
  --el-button-hover-bg-color: var(--el-button-bg-color) !important;
  --el-button-hover-text-color: var(--el-button-text-color) !important;
  --el-button-hover-border-color: var(--el-button-border-color) !important;
  --el-button-active-bg-color: var(--el-button-bg-color) !important;
  --el-button-active-text-color: var(--el-button-text-color) !important;
  --el-button-active-border-color: var(--el-button-border-color) !important;
}

.el-button {
  font-weight: 500 !important;
  font-size: 14px !important;
  padding: 8px 30px !important;
  line-height: 18px !important;
  border-radius: 8px !important;
  cursor: pointer;

  &.disabled-done {
    opacity: 0.3;
    pointer-events: none;
    cursor: not-allowed;
  }

  &.smaller {
    padding: 5px 11px !important;
  }

  &.rosein-sign {
    --el-button-border-color: #cb30e0 !important;

    &.is-plain {
      --el-button-text-color: #cb30e0 !important;
    }
  }

  &.purple-sign {
    --el-button-border-color: #6155f5 !important;

    &.is-plain {
      --el-button-text-color: #6155f5 !important;
    }
  }

  &.blue-sign {
    --el-button-border-color: #3289fb !important;

    &.is-plain {
      --el-button-text-color: #3289fb !important;
    }
  }

  &.cyan-sign {
    --el-button-border-color: #00c0e8 !important;

    &.is-plain {
      --el-button-text-color: #00c0e8 !important;
    }
  }

  &.yellow-sign {
    --el-button-border-color: #ff383c !important;

    &.is-plain {
      --el-button-text-color: #ff383c !important;
    }
  }
}
