* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f7fa;
  color: #1f2d3d;
}
.page { padding: 16px; max-width: 1600px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; }
.main-title { margin: 0; font-size: 20px; font-weight: 600; color: #303133; }
.user-bar { display: flex; align-items: center; gap: 10px; }
.user-text { font-size: 13px; color: #606266; white-space: nowrap; }

/* 页签导航 */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 2px solid #e4e7ed; }
.tab-btn {
  border: none;
  background: transparent;
  padding: 12px 24px;
  cursor: pointer;
  font-size: 14px;
  color: #606266;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.tab-btn:hover { color: #409eff; }
.tab-btn.active { color: #409eff; border-bottom-color: #409eff; font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* 工具栏 */
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
.search-input {
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  width: 240px;
}
.search-input:focus { outline: none; border-color: #409eff; }

/* 按钮 */
.btn {
  border: 1px solid #dcdfe6;
  background: #fff;
  color: #606266;
  border-radius: 4px;
  height: 32px;
  line-height: 30px;
  padding: 0 16px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}
.btn:hover { color: #409eff; border-color: #c6e2ff; background: #ecf5ff; }
.btn-primary { background: #409eff; border-color: #409eff; color: #fff; }
.btn-primary:hover { background: #66b1ff; border-color: #66b1ff; }
.btn-danger { border-color: #fbc4c4; color: #f56c6c; background: #fef0f0; }
.btn-danger:hover { background: #f78989; border-color: #f78989; color: #fff; }
.btn-large { height: 40px; padding: 0 32px; font-size: 14px; }

/* 表格 */
.table-wrap { border: 1px solid #ebeef5; overflow-x: auto; background: #fff; border-radius: 4px; }
table { width: 100%; border-collapse: collapse; }
th, td {
  border-bottom: 1px solid #ebeef5;
  padding: 10px 12px;
  font-size: 13px;
  text-align: left;
}
thead th { background: #fafafa; color: #909399; font-weight: 600; }
tbody tr:hover { background: #f5f7fa; }
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}
.status-1 { background: #e6f7ff; color: #1890ff; }
.status-2 { background: #f6ffed; color: #52c41a; }

/* 表单 */
.master-form {
  background: #fff;
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 16px;
  border: 1px solid #ebeef5;
}
.section-title { margin: 0 0 16px; font-size: 15px; font-weight: 600; color: #303133; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.form-item { display: flex; flex-direction: column; gap: 6px; }
.form-item label { font-size: 13px; color: #606266; }
.form-item .required { color: #f56c6c; }
.form-item input, .form-item select {
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
}
.form-item input:focus, .form-item select:focus { outline: none; border-color: #409eff; }

/* 小包区域 */
.sub-section { background: #fff; border-radius: 4px; border: 1px solid #ebeef5; }
.section-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #ebeef5; }
.section-header .section-title { margin: 0; }
.section-actions { display: flex; gap: 8px; }

/* 表单操作 */
.form-actions { display: flex; gap: 12px; margin-top: 20px; justify-content: center; }

/* 弹窗 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
}
.modal.show { display: flex; align-items: center; justify-content: center; }
.modal-content { background: #fff; border-radius: 8px; max-height: 90vh; overflow-y: auto; }
.modal-large { width: 90%; max-width: 1000px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #ebeef5; }
.modal-header h3 { margin: 0; font-size: 16px; }
.modal-close { font-size: 24px; cursor: pointer; color: #909399; }
.modal-close:hover { color: #409eff; }
.modal-body { padding: 20px; }
.detail-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.detail-item { font-size: 13px; }
.detail-item span { color: #909399; margin-right: 8px; }
.sub-list h4 { margin: 0 0 12px; font-size: 14px; color: #303133; }

/* 操作链接 */
.op-link { color: #409eff; cursor: pointer; margin-right: 8px; text-decoration: none; font-size: 13px; }
.op-link:hover { text-decoration: underline; }
.op-link.danger { color: #f56c6c; }

/* 输入框样式 */
input[type="text"], input[type="number"], select {
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  height: 28px;
  font-size: 12px;
  padding: 0 8px;
  width: 100%;
}
input:focus, select:focus { outline: none; border-color: #409eff; }

/* API文档页面 */
.api-section { background: #fff; padding: 20px; border-radius: 4px; border: 1px solid #ebeef5; }
.api-doc h4 { margin: 20px 0 12px; color: #303133; font-size: 14px; }
.api-doc h4:first-child { margin-top: 0; }
.api-doc p { margin: 8px 0; color: #606266; font-size: 13px; }
.code-block { background: #f5f7fa; padding: 12px 16px; border-radius: 4px; font-family: monospace; font-size: 13px; margin: 8px 0; }
.code-block strong { color: #409eff; }
.api-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.api-table th, .api-table td { border: 1px solid #ebeef5; padding: 8px 12px; text-align: left; }
.api-table th { background: #fafafa; color: #909399; }
.api-table td { color: #606266; }

/* 开关样式 */
.switch { position: relative; display: inline-block; width: 44px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #dcdfe6; border-radius: 11px; transition: .2s; }
.slider:before { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + .slider { background: #409eff; }
.switch input:checked + .slider:before { transform: translateX(22px); }

/* 响应式 */
@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; gap: 12px; }
  .section-actions { width: 100%; flex-wrap: wrap; }
}