/* ============================================================
 * 灵核应用市场后台（Tabler UI 定制层）
 * Tabler 自带 Bootstrap 5 组件样式，这里只做品牌色与细节调整。
 * ============================================================ */

:root {
  --tblr-primary: #206bc4;
  --mk-accent: #6f42c1;
}

/* ---------- 品牌色：主色保留 Tabler 蓝 ---------- */
.btn-primary {
  --tblr-btn-bg: var(--tblr-primary);
  --tblr-btn-border-color: var(--tblr-primary);
}

/* ---------- 侧边栏品牌图标 ---------- */
.sidebar-brand-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--tblr-primary), var(--mk-accent));
  color: #fff; font-size: 18px;
}

/* ---------- 内容区卡片间距 ---------- */
.page-body .card + .card { margin-top: 24px; }

/* ---------- 卡片头部统一 ---------- */
.card-header {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-header i {
  color: var(--tblr-primary);
}

/* ---------- 统计卡片悬浮 ---------- */
.stat-card {
  transition: all .2s ease;
  text-decoration: none;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(32,107,196,.12);
  text-decoration: none;
}

/* ---------- 表格交互优化 ---------- */
.table > :not(caption) > * > * {
  padding: 0.75rem 1rem;
}
.table tbody tr {
  transition: background-color .15s ease;
}
.table tbody tr:hover {
  background-color: rgba(32,107,196,.04);
}

/* ---------- 按钮点击反馈 ---------- */
.btn {
  transition: all .15s ease;
}
.btn:active {
  transform: scale(.97);
}

/* ---------- 页面标题区 ---------- */
.page-title {
  font-size: 1.25rem;
  font-weight: 600;
}

/* ---------- 顶部导航栏 ---------- */
.navbar {
  border-bottom: 1px solid var(--tblr-border-color);
  background: #fff;
}

/* ---------- 表格徽章（Tabler 风格微调） ---------- */
.badge {
  font-weight: 500;
}
/* 彩色背景徽章强制白字（Tabler 默认不设文字色） */
.badge.bg-primary,
.badge.bg-success,
.badge.bg-danger,
.badge.bg-warning,
.badge.bg-info {
  color: #fff !important;
}
/* 动作徽章：浅色背景深色字（Tabler 默认 bg-secondary 是深底白字） */
.badge.bg-secondary {
  background: var(--tblr-secondary-bg) !important;
  color: var(--tblr-secondary) !important;
}
.badge.method-get    { background: #dcfce7; color: #15803d; font-weight: 600; }
.badge.method-post   { background: #dbeafe; color: #1d4ed8; font-weight: 600; }
.badge.method-put    { background: #fef3c7; color: #b45309; font-weight: 600; }
.badge.method-delete { background: #fee2e2; color: #b91c1c; font-weight: 600; }

/* ---------- 布局：Tabler 原生 navbar-vertical 侧边栏 ---------- */
.page { display: flex; flex-direction: row; min-height: 100vh; }
.page-wrapper { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- 表单 fieldset 卡片化 ---------- */
fieldset.settings-group {
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  background: #fff;
}
fieldset.settings-group legend {
  width: auto;
  padding: 0 10px;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tblr-secondary);
}
fieldset.settings-group legend i {
  color: var(--tblr-primary);
}

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--tblr-secondary);
}
.empty-state i {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: .4;
}

/* ---------- 响应式：小屏隐藏底部链接 ---------- */
@media (max-width: 991.98px) {
  .navbar-footer { display: none; }
}
