/* QuickForm Admin 全局样式 */

:root {
  --primary: #667eea;
  --primary-dark: #764ba2;
  --sidebar-width: 200px;
}

body {
  background: #f5f6fa;
  font-size: 14px;
}

/* 顶部导航栏 */
.admin-navbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 侧边栏 */
.sidebar {
  min-height: calc(100vh - 56px);
  background: #fff;
  border-right: 1px solid #e9ecef;
  padding-top: 1rem;
}

.sidebar .nav-link {
  color: #555;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  margin: 0.25rem 0.5rem;
  transition: all 0.2s;
}

.sidebar .nav-link:hover {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary);
}

.sidebar .nav-link.active {
  background: var(--primary);
  color: #fff;
}

/* 主内容区 */
.main-content {
  padding: 1.5rem;
}

/* 页面标题 */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e9ecef;
}

.page-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

/* ========== 自动刷新提示条 ========== */
.auto-refresh-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(90deg, #eff6ff, #ecfeff, #f0fdf4);
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 10px 20px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  font-weight: 500;
}
.auto-refresh-bar i {
  color: #3b82f6;
  font-size: 1rem;
}
.auto-refresh-bar strong {
  color: #1d4ed8;
  font-weight: 700;
}
.refresh-countdown {
  background: #3b82f6;
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  min-width: 36px;
  text-align: center;
}
.spin {
  animation: spin 1s linear infinite;
  display: inline-block;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 角色标签 */
.badge[data-role="super_admin"] {
  background: #e74c3c;
  color: #fff;
}

.badge[data-role="admin"] {
  background: #3498db;
  color: #fff;
}

.badge[data-role="user"] {
  background: #95a5a6;
  color: #fff;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: #bbb;
}

.empty-state i {
  font-size: 3rem;
}

/* 登录页 */
.login-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 0 1rem;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header i {
  font-size: 3rem;
  color: var(--primary);
}

.login-header h2 {
  margin: 0.5rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
}

.login-header p {
  margin: 0.25rem 0 0;
  color: #999;
  font-size: 0.85rem;
}

.login-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  padding: 0.6rem;
  font-size: 1rem;
}

/* 表单设计器字段卡片 */
.field-card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.field-card-header {
  background: #f8f9fa;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.field-card-body {
  padding: 1rem;
  display: none;
}

.field-card.expanded .field-card-body {
  display: block;
}

/* 封面图预览 */
.cover-preview {
  max-width: 200px;
  max-height: 120px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

/* 错误页 */
.error-page {
  background: #f5f6fa;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 按钮组间距 */
.btn + .btn,
.btn + form,
form + form,
form + .btn {
  margin-left: 0.25rem;
}

/* 分页 */
.pagination .page-link {
  color: var(--primary);
}

.pagination .active .page-link {
  background: var(--primary);
  border-color: var(--primary);
}

/* ========== 首页 Dashboard 全新样式 ========== */

/* 欢迎横幅 */
.welcome-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.welcome-banner::after {
  content: '';
  position: absolute;
  bottom: -60%;
  left: 20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.welcome-left {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.welcome-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  backdrop-filter: blur(10px);
}
.welcome-greeting {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.welcome-sub {
  margin: 4px 0 0;
  font-size: 0.85rem;
  opacity: 0.85;
}
.welcome-sub strong {
  font-weight: 700;
  color: #ffe066;
}
.welcome-right {
  position: relative;
  z-index: 1;
}
.welcome-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #764ba2;
  padding: 10px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.25s;
}
.welcome-create-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  color: #667eea;
  text-decoration: none;
}
.welcome-create-btn i {
  font-size: 1.1rem;
}

/* 统计卡片 */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.dash-stat-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
  border: 1px solid #f0f0f5;
}
.dash-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}
.dash-stat-bg-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 4rem;
  opacity: 0.06;
  line-height: 1;
}
.dash-stat-content {
  position: relative;
  z-index: 1;
}
.dash-stat-num {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 6px;
}
.dash-stat-label {
  font-size: 0.88rem;
  color: #888;
  margin-bottom: 12px;
  font-weight: 500;
}
.dash-stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  background: #f5f5fa;
  color: #999;
}
.dash-stat-trend.trend-up {
  background: #e8f5e9;
  color: #2e7d32;
}
.dash-stat-1 .dash-stat-num { color: #667eea; }
.dash-stat-2 .dash-stat-num { color: #11998e; }
.dash-stat-3 .dash-stat-num { color: #f59e0b; }
.dash-stat-4 .dash-stat-num { color: #ec4899; }

/* 表单列表区 */
.forms-section {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f5;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #333;
}
.section-title i {
  color: #667eea;
  font-size: 1.2rem;
}
.section-count {
  background: #f0f0fa;
  color: #667eea;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
}
.dash-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5f6fa;
  border: 1px solid #e8e8ef;
  border-radius: 10px;
  padding: 6px 12px;
  width: 300px;
  transition: all 0.2s;
}
.dash-search:focus-within {
  border-color: #667eea;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.dash-search i {
  color: #aaa;
  font-size: 0.95rem;
}
.dash-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.85rem;
}
.search-clear {
  color: #ccc;
  font-size: 0.95rem;
  line-height: 1;
}
.search-clear:hover {
  color: #888;
}

/* 空状态 */
.dash-empty {
  text-align: center;
  padding: 60px 20px;
}
.dash-empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #f5f6fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #ccc;
}
.dash-empty h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #555;
  font-weight: 600;
}
.dash-empty p {
  margin: 0 0 20px;
  font-size: 0.85rem;
  color: #aaa;
}
.dash-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.dash-empty-btn:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 表单卡片网格 */
.forms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.form-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: all 0.3s;
  cursor: pointer;
}
.form-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  border-color: #ddd;
}
.form-card-cover {
  position: relative;
  height: 100px;
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  overflow: hidden;
}
.form-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.form-card-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.8);
}
.form-card-status {
  position: absolute;
  top: 10px;
  right: 10px;
}
.fc-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.9);
}
.fc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.fc-status-published { color: #11998e; }
.fc-status-published .fc-dot { background: #11998e; }
.fc-status-draft { color: #f59e0b; }
.fc-status-draft .fc-dot { background: #f59e0b; }
.fc-status-closed { color: #999; }
.fc-status-closed .fc-dot { background: #ccc; }

.form-card-body {
  padding: 16px;
}
.form-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.fc-cat {
  font-size: 0.72rem;
  color: #667eea;
  background: #f0f0fa;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 500;
}
.fc-fields {
  font-size: 0.72rem;
  color: #999;
  display: flex;
  align-items: center;
  gap: 3px;
}
.fc-fields i {
  font-size: 0.8rem;
}
.form-card-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.form-card-desc {
  margin: 0 0 14px;
  font-size: 0.8rem;
  color: #999;
  line-height: 1.5;
  height: 36px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.form-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #f0f0f5;
}
.fc-owner {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fc-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fc-owner-name {
  font-size: 0.78rem;
  color: #888;
}
.fc-actions {
  display: flex;
  gap: 4px;
}
.fc-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
}
.fc-btn:hover {
  text-decoration: none;
  transform: scale(1.1);
}
.fc-btn-data { background: #e8f5e9; color: #2e7d32; }
.fc-btn-data:hover { background: #2e7d32; color: #fff; }
.fc-btn-export { background: #fff3e0; color: #e65100; }
.fc-btn-export:hover { background: #e65100; color: #fff; }
.fc-btn-perm { background: #e8eaf6; color: #283593; }
.fc-btn-perm:hover { background: #283593; color: #fff; }
.fc-btn-edit { background: #e3f2fd; color: #1565c0; }
.fc-btn-edit:hover { background: #1565c0; color: #fff; }



/* ========== Ant Design Pro 风格 - 页面头部 ========== */
.pro-page-header {
  margin-bottom: 20px;
}
.pro-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #8c8c8c;
  margin-bottom: 10px;
}
.pro-breadcrumb a {
  color: #8c8c8c;
  text-decoration: none;
  transition: color 0.2s;
}
.pro-breadcrumb a:hover {
  color: #1677ff;
}
.pro-breadcrumb i {
  font-size: 0.7rem;
  color: #bfbfbf;
}
.pro-breadcrumb .current {
  color: #262626;
  font-weight: 500;
}
.pro-page-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.pro-page-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: #262626;
  letter-spacing: -0.5px;
}
.pro-page-sub {
  font-size: 0.85rem;
  color: #8c8c8c;
}

/* ========== Ant Design Pro 风格 - 通用卡片 ========== */
.pro-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.pro-card-header {
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
}
.pro-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #262626;
}
.pro-card-title-dot {
  width: 3px;
  height: 14px;
  background: #1677ff;
  border-radius: 2px;
  display: inline-block;
}
.pro-card-extra {
  font-size: 0.78rem;
  color: #8c8c8c;
  font-weight: 400;
  margin-left: 8px;
}
.pro-card-body {
  padding: 24px;
}
.pro-card-body-no-padding {
  padding: 0;
}

/* ========== Ant Design Pro 风格 - 表单元素 ========== */
.pro-form-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -12px;
}
.pro-form-item {
  padding: 0 12px;
  margin-bottom: 20px;
  box-sizing: border-box;
}
.pro-form-item-1 { flex: 0 0 25%; max-width: 25%; }
.pro-form-item-2 { flex: 0 0 50%; max-width: 50%; }
.pro-form-item-3 { flex: 0 0 75%; max-width: 75%; }
.pro-form-item-4 { flex: 0 0 100%; max-width: 100%; }

.pro-form-label {
  display: block;
  font-size: 0.85rem;
  color: #262626;
  margin-bottom: 8px;
  font-weight: 400;
}
.pro-required {
  color: #ff4d4f;
  margin-right: 2px;
}
.pro-form-control {
  width: 100%;
}
.pro-input,
.pro-select,
.pro-textarea {
  width: 100%;
  padding: 6px 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #262626;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  transition: all 0.2s;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}
.pro-input:hover,
.pro-select:hover,
.pro-textarea:hover {
  border-color: #4096ff;
}
.pro-input:focus,
.pro-select:focus,
.pro-textarea:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
}
.pro-input::placeholder,
.pro-textarea::placeholder {
  color: #bfbfbf;
}
.pro-input-sm {
  padding: 4px 11px;
  font-size: 0.82rem;
}
.pro-textarea {
  resize: vertical;
  min-height: 80px;
}
.pro-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23bfbfbf' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 32px;
}
.pro-checkbox {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
  accent-color: #1677ff;
  cursor: pointer;
}

/* ========== Ant Design Pro 风格 - 按钮 ========== */
.pro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: inherit;
}
.pro-btn-default {
  background: #fff;
  border-color: #d9d9d9;
  color: #262626;
}
.pro-btn-default:hover {
  border-color: #4096ff;
  color: #4096ff;
  text-decoration: none;
}
.pro-btn-primary {
  background: #1677ff;
  border-color: #1677ff;
  color: #fff;
  box-shadow: 0 2px 0 rgba(5, 145, 255, 0.1);
}
.pro-btn-primary:hover {
  background: #4096ff;
  border-color: #4096ff;
  color: #fff;
  text-decoration: none;
}
.pro-btn-danger {
  background: #fff;
  border-color: #ff4d4f;
  color: #ff4d4f;
}
.pro-btn-danger:hover {
  background: #ff4d4f;
  border-color: #ff4d4f;
  color: #fff;
}
.pro-btn-block {
  width: 100%;
}

/* ========== Ant Design Pro 风格 - 提示条 ========== */
.pro-alert {
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}
.pro-alert-error {
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: #595959;
}
.pro-alert-error i {
  color: #ff4d4f;
  font-size: 1.1rem;
}

/* ========== Ant Design Pro 风格 - 表单设计器 ========== */
.pro-card-builder {
  overflow: hidden;
}
.pro-builder {
  display: flex;
  min-height: 560px;
}

/* 左侧组件库 */
.pro-builder-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid #f0f0f0;
  background: #fafafa;
  display: flex;
  flex-direction: column;
}
.pro-builder-sidebar-title {
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #262626;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.pro-builder-components {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}
.pro-comp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  cursor: grab;
  transition: all 0.2s;
}
.pro-comp-item:hover {
  border-color: #1677ff;
  background: #e6f4ff;
}
.pro-comp-item:active {
  cursor: grabbing;
}
.pro-comp-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.pro-comp-icon-blue { background: #e6f4ff; color: #1677ff; }
.pro-comp-icon-green { background: #f6ffed; color: #52c41a; }
.pro-comp-icon-purple { background: #f9f0ff; color: #722ed1; }
.pro-comp-icon-orange { background: #fff7e6; color: #fa8c16; }
.pro-comp-icon-cyan { background: #e6fffb; color: #13c2c2; }
.pro-comp-icon-red { background: #fff1f0; color: #f5222d; }
.pro-comp-icon-indigo { background: #eef0ff; color: #2f54eb; }
.pro-comp-icon-teal { background: #e6fffb; color: #08979c; }

.pro-comp-info {
  flex: 1;
  min-width: 0;
}
.pro-comp-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: #262626;
  margin-bottom: 2px;
}
.pro-comp-desc {
  font-size: 0.7rem;
  color: #8c8c8c;
}

/* 中间画布 */
.pro-builder-canvas {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
}
.pro-builder-canvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.pro-builder-canvas-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #262626;
}
.pro-builder-canvas-count {
  font-size: 0.75rem;
  color: #8c8c8c;
  background: #f5f5f5;
  padding: 2px 10px;
  border-radius: 10px;
}
.pro-builder-canvas-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  transition: background 0.2s;
}
.pro-canvas-dragover {
  background: #e6f4ff;
}

/* 空状态 */
.pro-empty {
  text-align: center;
  padding: 60px 20px;
}
.pro-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #bfbfbf;
}
.pro-empty-text {
  font-size: 0.9rem;
  color: #8c8c8c;
  margin-bottom: 6px;
}
.pro-empty-desc {
  font-size: 0.78rem;
  color: #bfbfbf;
}

/* 字段条目 */
.pro-field-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.pro-field-item:hover {
  border-color: #4096ff;
  box-shadow: 0 2px 8px rgba(5, 145, 255, 0.08);
}
.pro-field-item.selected {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
}
.pro-field-item.dragging {
  opacity: 0.5;
}
.pro-field-drag-handle {
  color: #bfbfbf;
  font-size: 0.9rem;
  cursor: grab;
  flex-shrink: 0;
  padding: 2px;
}
.pro-field-drag-handle:hover {
  color: #8c8c8c;
}
.pro-field-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.pro-type-blue { background: #e6f4ff; color: #1677ff; }
.pro-type-green { background: #f6ffed; color: #52c41a; }
.pro-type-purple { background: #f9f0ff; color: #722ed1; }
.pro-type-orange { background: #fff7e6; color: #fa8c16; }
.pro-type-cyan { background: #e6fffb; color: #13c2c2; }
.pro-type-red { background: #fff1f0; color: #f5222d; }
.pro-type-indigo { background: #eef0ff; color: #2f54eb; }
.pro-type-teal { background: #e6fffb; color: #08979c; }

.pro-field-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.pro-field-type-tag {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  background: #e6f4ff;
  color: #1677ff;
}
.pro-field-name {
  font-size: 0.88rem;
  color: #262626;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pro-field-required {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: #ff4d4f;
  background: #fff1f0;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
}
.pro-field-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}
.pro-field-item:hover .pro-field-actions,
.pro-field-item.selected .pro-field-actions {
  opacity: 1;
}
.pro-field-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: #bfbfbf;
}
.pro-field-btn:hover {
  background: #f5f5f5;
  color: #595959;
}
.pro-field-btn-delete:hover {
  background: #fff1f0;
  color: #ff4d4f;
}

/* 画布底部 */
.pro-builder-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}

/* 右侧属性面板 */
.pro-builder-props {
  width: 280px;
  flex-shrink: 0;
  border-left: 1px solid #f0f0f0;
  background: #fafafa;
  display: flex;
  flex-direction: column;
}
.pro-builder-props-header {
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #262626;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.pro-builder-props-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.pro-props-empty {
  text-align: center;
  padding: 50px 16px;
  color: #bfbfbf;
}
.pro-props-empty i {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 8px;
  color: #d9d9d9;
}
.pro-props-empty p {
  font-size: 0.8rem;
  margin: 0;
}
.pro-prop-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pro-prop-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pro-prop-label {
  font-size: 0.8rem;
  color: #595959;
  font-weight: 500;
  display: flex;
  align-items: center;
}
.pro-prop-tip {
  font-size: 0.72rem;
  color: #bfbfbf;
  margin-top: 2px;
}
.pro-prop-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}


/* ========== Ant Design Pro 风格 - 整体布局 ========== */
.pro-body {
  margin: 0;
  padding: 0;
  background: #f0f2f5;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.88);
  line-height: 1.5;
}
.pro-layout {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.pro-sider {
  width: 208px;
  flex-shrink: 0;
  background: #001529;
  position: relative;
  transition: all 0.2s;
}
.pro-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pro-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1677ff, #69b1ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}
.pro-logo-text {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.pro-menu {
  padding: 12px 8px;
}
.pro-menu-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pro-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.88rem;
  transition: all 0.2s;
}
.pro-menu-item i {
  font-size: 1.05rem;
  width: 18px;
  text-align: center;
}
.pro-menu-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}
.pro-menu-item.active {
  color: #fff;
  background: #1677ff;
}

/* 主区域 */
.pro-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pro-header {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.pro-header-left {
  display: flex;
  align-items: center;
}
.pro-header-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.88);
}
.pro-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pro-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pro-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1677ff, #69b1ff);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pro-user-detail {
  display: flex;
  flex-direction: column;
}
.pro-user-name {
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pro-role-tag {
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
}
.pro-role-super_admin {
  background: #fff1f0;
  color: #f5222d;
}
.pro-role-admin {
  background: #e6f4ff;
  color: #1677ff;
}
.pro-role-user {
  background: #f6ffed;
  color: #52c41a;
}
.pro-header-actions {
  display: flex;
  gap: 4px;
  border-left: 1px solid #f0f0f0;
  padding-left: 16px;
}
.pro-header-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.45);
  font-size: 1rem;
  transition: all 0.2s;
  text-decoration: none;
}
.pro-header-btn:hover {
  background: #f5f5f5;
  color: rgba(0, 0, 0, 0.88);
  text-decoration: none;
}

/* 内容区 */
.pro-content {
  flex: 1;
  padding: 20px 24px;
  overflow-x: hidden;
}

/* 重置 bootstrap 影响 */
.pro-body .container-fluid {
  padding: 0;
}
.pro-body .row {
  margin: 0;
}
