:root {
  /* 基础与背景配色（精确匹配参考图冷灰蓝调） */
  --bg-body: #edf3f9;
  --sidebar-bg: #ebf2f8;
  --sidebar-border: #dbe5f0;
  --sidebar-text: #475569;
  --sidebar-active-bg: #d7e4f2;
  --sidebar-active-text: #0f172a;
  
  --card-bg: #ffffff;
  --card-border: #e6edf5;
  --card-radius: 12px;
  --card-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);

  /* 文字配色 */
  --text-title: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* 按钮体系（炭黑主操作 #27272a + 纯白次级操作） */
  --btn-primary-bg: #27272a;
  --btn-primary-hover: #18181b;
  --btn-secondary-bg: #ffffff;
  --btn-secondary-border: #d1d5db;
  --btn-secondary-text: #374151;

  --accent-blue: #2563eb;
  --focus-ring: rgba(59, 130, 246, 0.18);
  --border-focus: #3b82f6;

  --tag-orange: #ea580c;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 20px;
  
  --success: #10b981;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-body);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* 整体容器 */
.admin-container {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏布局（字号与层级优化，无图标纯净版） */
.admin-sidebar {
  width: 220px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  user-select: none;
}

.sidebar-header {
  padding: 16px 14px 12px;
}

.workspace-dropdown-btn {
  background: #ffffff;
  border: 1px solid #dce5f0;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-title);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px 24px;
}

.menu-group-title {
  font-size: 12px;
  color: #8295ab;
  padding: 16px 12px 6px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 9px 14px;
  color: var(--sidebar-text);
  border-radius: var(--radius-md);
  margin-bottom: 3px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.65);
  color: var(--text-title);
}

.menu-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 600;
}

.submenu {
  padding-left: 4px;
  margin-bottom: 2px;
}

.submenu-item {
  display: block;
  padding: 8px 14px 8px 20px;
  color: var(--sidebar-text);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all 0.15s ease;
}

.submenu-item:hover {
  color: var(--text-title);
  background: rgba(255, 255, 255, 0.5);
}

.submenu-item.active {
  color: var(--sidebar-active-text);
  font-weight: 600;
  background: var(--sidebar-active-bg);
}

/* 主内容区 */
.admin-main {
  flex: 1;
  margin-left: 220px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-header {
  height: 54px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.header-domain-badge {
  background: #ffffff;
  border: 1px solid #dce5f0;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-muted);
}

.admin-body {
  padding: 0 32px 40px;
  flex: 1;
}

/* 页面大标题区 */
.page-title-area {
  margin-bottom: 24px;
}

.page-main-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.page-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* 渐变状态横幅卡片 */
.banner-wallet-card {
  background: linear-gradient(135deg, #e0f2fe 0%, #f0fdf4 50%, #faf5ff 100%);
  border: 1px solid #dbeafe;
  border-radius: var(--card-radius);
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.banner-wallet-title {
  font-size: 14px;
  color: #334155;
  margin-bottom: 6px;
  font-weight: 600;
}

.banner-wallet-value {
  font-size: 30px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.banner-wallet-value span {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
}

.banner-wallet-tip {
  font-size: 13px;
  color: #64748b;
  margin-top: 6px;
}

/* 现代应用与核心资产卡片网格（精确参考图 2 AI小程序卡片风格） */
.stats-grid-ai {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card-ai {
  background: #ffffff;
  border: 1px solid #e6edf5;
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: all 0.2s ease;
}

.stat-card-ai:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}

.stat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stat-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-title);
  line-height: 1.3;
}

.stat-card-status {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.stat-card-status.online {
  color: #10b981;
}

.stat-card-status.active {
  color: #2563eb;
}

.stat-card-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-title);
  letter-spacing: -0.5px;
}

.stat-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 12px 0;
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stat-card-meta {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 16px;
  line-height: 1.6;
}

.stat-card-meta div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-card-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 0;
  text-align: center;
  font-size: 13.5px;
  font-weight: 500;
  color: #334155;
  transition: all 0.15s ease;
  display: block;
}

.stat-card-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--text-title);
}

/* 3 列特色亮点卡片（参考图 2 样式升级） */
.feature-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.feature-highlight-card {
  background: #ffffff;
  border: 1px solid #e6edf5;
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.feature-highlight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.feature-highlight-header {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.feature-highlight-body {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* 精选卡片网格（精确参考图 1 样式：无图标、大气质感、带分类和标签） */
.res-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.res-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  position: relative;
  transition: all 0.2s ease;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.res-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}

.res-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  min-width: 0;
  width: 100%;
}

.res-card-main {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding-right: 8px;
}

.res-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  min-width: 0;
}

.res-card-subtitle {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  width: 100%;
  min-width: 0;
}

.res-badge-top {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.res-badge-top1 {
  background: #ffedd5;
  color: #ea580c;
}

.res-badge-top2 {
  background: #e0f2fe;
  color: #0284c7;
}

.res-badge-top3 {
  background: #f1f5f9;
  color: #64748b;
}

.res-card-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
  word-break: break-word;
}

.res-card-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.res-tag-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
}

.res-tag-green {
  background: #dcfce7;
  color: #15803d;
  font-weight: 600;
}

.res-card-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid #f8fafc;
  padding-top: 12px;
}

.res-btn-action {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 0;
  font-size: 12.5px;
  font-weight: 500;
  color: #334155;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.res-btn-action:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* 胶囊分段选择器 (Pills) */
.capsule-filter-group {
  display: inline-flex;
  align-items: center;
  background: #e2e8f0;
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 2px;
}

.capsule-pill {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

.capsule-pill:hover {
  color: var(--text-title);
}

.capsule-pill.active {
  background: #ffffff;
  color: var(--text-title);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* 通用卡片 */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-title);
}

.card-body {
  padding: 20px;
}

/* 表单与输入框 */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-title);
  margin-bottom: 6px;
}

.form-label .required-star {
  color: #ef4444;
  margin-right: 3px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  outline: none;
  background: #ffffff;
  color: var(--text-title);
  transition: all 0.15s ease;
}

.form-control:focus {
  border-color: var(--border-focus) !important;
  box-shadow: 0 0 0 3.5px var(--focus-ring) !important;
}

textarea.form-control {
  min-height: 85px;
  resize: vertical;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* 虚线照片/Logo上传框（参考图 3） */
.upload-dashed-box {
  width: 92px;
  height: 92px;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.upload-dashed-box:hover {
  background: #f1f5f9;
  border-color: var(--border-focus);
  color: var(--border-focus);
}

.upload-dashed-box .plus-icon {
  font-size: 22px;
  font-weight: 300;
  margin-bottom: 2px;
  line-height: 1;
}

/* 规则说明蓝色框 */
.callout-blue-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 18px 22px;
  margin-top: 24px;
}

.callout-blue-title {
  font-size: 14px;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 10px;
}

.callout-blue-list {
  list-style: none;
  font-size: 13px;
  color: #1e40af;
  line-height: 1.8;
}

/* 模态弹窗组件 */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.modal-content-card {
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 36px;
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.15);
  border: 1px solid #e2e8f0;
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-title);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.modal-close-btn:hover {
  background: #f1f5f9;
  color: var(--text-title);
}

/* 按钮体系 */
.form-actions-bar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: #ffffff;
  border: 1px solid var(--btn-primary-bg);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
  color: #ffffff;
}

.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border: 1px solid var(--btn-secondary-border);
}

.btn-secondary:hover {
  background: #f9fafb;
  color: #111827;
  border-color: #9ca3af;
}

.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.btn-danger:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-success {
  background: #10b981;
  color: #ffffff;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12.5px;
}

/* 表格组件 */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  background: #f8fafc;
  padding: 13px 18px;
  font-weight: 600;
  color: #506176;
  font-size: 13px;
  border-bottom: 1px solid #edf2f7;
}

.table td {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  font-size: 13.5px;
}

.table tr:hover td {
  background: #fbfdff;
}

/* 状态徽章 */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: #ecfdf5;
  color: #047857;
}

.badge-secondary {
  background: #f1f5f9;
  color: #475569;
}

.badge-primary {
  background: #eff6ff;
  color: #1d4ed8;
}

.badge-danger {
  background: #fef2f2;
  color: #b91c1c;
}

/* 空状态组件 */
.empty-state {
  text-align: center;
  padding: 36px 20px;
}

.empty-title {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
}

/* 提示框 */
.alert {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 13.5px;
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* 登录界面 */
.login-body {
  background: #edf3f9;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  padding: 36px;
  border-radius: var(--card-radius);
  border: 1px solid #dce5f0;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
}
