/* LEMP - Winda-style admin framework */

/* 可访问性：覆盖 bootstrap .text-muted 默认灰（#6c757d 对比 3.9:1 < 4.5），
   加深到 #6b7280（4.8:1，WCAG AA 达标） */
.text-muted { color: #6b7280 !important; }

:root {
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 64px;
  --topbar-height: 56px;
  /* 主色：sky-500 科技蓝（替换旧 Ant 蓝 #0ea5e9） */
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  /* 外壳：近黑深侧栏 slate-900（替换旧 #001529） */
  --bg-sidebar: #0f172a;
  --bg-sidebar-light: #0b1220;
  --text-sidebar: rgba(255, 255, 255, 0.75);
  --text-sidebar-active: #fff;
  /* 内容区：更亮更留白（替换旧 #f0f2f5） */
  --bg-content: #f8fafc;
  --card-shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --card-radius: 12px;
  /* 统一描边 / 主文字（旧 lemp.css 未定义，导致部分描边失效，此处补全） */
  --border-color: #e2e8f0;
  --text-primary: #0f172a;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

/* 覆盖 Tabler 原生组件主色（.btn-primary / .badge.bg-primary / .alert-primary
   / .text-primary / 聚焦环 / 链接等）→ sky 科技蓝。lemp.css 在 tabler.min.css
   之后加载，故此处覆盖即对原生组件生效，无需逐个重绘。 */
:root,
[data-bs-theme="light"]{
  --tblr-primary: #0ea5e9;
  --tblr-primary-rgb: 14, 165, 233;
  --tblr-primary-darken: #0284c7;
  --tblr-primary-lt: #e0f2fe;
  --tblr-primary-lt-rgb: 224, 242, 254;
  --tblr-primary-bg-subtle: #e0f2fe;
  --tblr-primary-border-subtle: #bae6fd;
  --tblr-primary-text-emphasis: #0369a1;
  --tblr-primary-fg: #ffffff;
  --tblr-link-color: #0ea5e9;
  --tblr-link-hover-color: #0284c7;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-content);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Layout */
.lemp-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.lemp-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: var(--text-sidebar);
  display: flex;
  flex-direction: column;
  transition: width 0.3s;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
}

.lemp-sidebar::-webkit-scrollbar {
  width: 4px;
}

.lemp-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.lemp-sidebar-brand {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  text-decoration: none;
}

.lemp-sidebar-brand:hover {
  color: #fff;
}

.lemp-sidebar-brand i {
  font-size: 22px;
  margin-right: 12px;
  color: var(--primary);
}

.lemp-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.lemp-menu-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.lemp-menu-link {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--text-sidebar);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  user-select: none;
}

.lemp-menu-link:hover {
  color: var(--text-sidebar-active);
  background: var(--primary);
}

.lemp-menu-link.active {
  color: var(--text-sidebar-active);
  background: var(--primary);
  box-shadow: inset 3px 0 0 #fff;
}

.lemp-menu-link i.lemp-menu-icon {
  font-size: 16px;
  width: 24px;
  text-align: center;
  margin-right: 10px;
}

.lemp-menu-arrow {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.2s;
}

.lemp-menu-item.open > .lemp-menu-link .lemp-menu-arrow {
  transform: rotate(90deg);
}

.lemp-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--bg-sidebar-light);
  display: none;
}

.lemp-menu-item.open > .lemp-submenu {
  display: block;
}

.lemp-submenu-link {
  display: block;
  padding: 10px 20px 10px 54px;
  color: var(--text-sidebar);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  white-space: nowrap;
}

.lemp-submenu-link:hover {
  color: var(--text-sidebar-active);
  background: rgba(14, 165, 233, 0.2);
}

.lemp-submenu-link.active {
  color: #fff;
  background: #0369a1;
  box-shadow: inset 3px 0 0 #fff;
}

/* Third-level menu */
.lemp-third-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.15);
  display: none;
}

.lemp-submenu-item.open > .lemp-third-menu {
  display: block;
}

.lemp-third-menu-link {
  display: block;
  padding: 8px 20px 8px 74px;
  color: var(--text-sidebar);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
}

.lemp-third-menu-link:hover {
  color: var(--text-sidebar-active);
  background: rgba(14, 165, 233, 0.2);
}
.lemp-third-menu-link.active {
  color: var(--text-sidebar-active);
  background: var(--primary);
  box-shadow: inset 3px 0 0 #fff;
}

/* Main wrapper */
.lemp-main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: margin-left 0.3s;
}

.lemp-topbar {
  height: var(--topbar-height);
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 999;
}

.lemp-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lemp-sidebar-toggle {
  background: none;
  border: none;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.lemp-sidebar-toggle:hover {
  background: #f0f2f5;
}

.lemp-breadcrumb {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
}

.lemp-breadcrumb li:last-child {
  color: #333;
  font-weight: 500;
}

.lemp-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lemp-topbar-btn {
  position: relative;
  background: none;
  border: none;
  padding: 8px 10px;
  border-radius: 50%;
  color: #666;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lemp-topbar-btn:hover {
  background: #f0f2f5;
  color: var(--primary);
}

.lemp-topbar-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: #dc2626;
  border-radius: 50%;
}

.lemp-topbar-user-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  color: #333;
  font-size: 14px;
  background: transparent;
  border: 1px solid transparent;
  outline: none;
  box-shadow: none;
  line-height: 1.4;
}

.lemp-topbar-user-btn:focus,
.lemp-topbar-user-btn:active,
.lemp-topbar-user-btn.show {
  background: transparent;
  border-color: transparent;
  outline: none;
  box-shadow: none;
}

.lemp-topbar-user-btn:hover {
  background: #f0f2f5;
}

.lemp-topbar-user img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}

/* Content area */
.lemp-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px;
  overflow-y: auto;
}

.lemp-content-header {
  margin-bottom: 20px;
}

.lemp-content-title {
  font-size: 20px;
  font-weight: 600;
  color: #262626;
  margin-bottom: 4px;
}

.lemp-content-subtitle {
  font-size: 13px;
  color: #6b7280;
}

/* Cards */
.lemp-card {
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
}

.lemp-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color, #f0f0f0);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.lemp-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #262626);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lemp-card-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

.lemp-card-body {
  padding: 20px;
}
.lemp-qr-box {
  width: 120px;
  height: 120px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 6px;
  flex-shrink: 0;
}
.lemp-qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lemp-card-footer {
  padding: 12px 20px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  border-radius: 0 0 var(--card-radius) var(--card-radius);
}

/* KPI cards */
.lemp-kpi-card {
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.2s;
}

.lemp-kpi-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lemp-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.lemp-kpi-icon.blue { background: #e6f7ff; color: var(--primary); }
.lemp-kpi-icon.green { background: #f6ffed; color: #52c41a; }
.lemp-kpi-icon.orange { background: #fff7e6; color: #faad14; }
.lemp-kpi-icon.red { background: #fff4e6; color: #d97706; }
.lemp-kpi-icon.purple { background: #f9f0ff; color: #722ed1; }
.lemp-kpi-icon.cyan { background: #e6fffb; color: #13c2c2; }

.lemp-kpi-body {
  flex: 1;
}

.lemp-kpi-label {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 4px;
}

.lemp-kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: #262626;
  line-height: 1.2;
}

.lemp-kpi-trend {
  font-size: 12px;
  margin-top: 4px;
}

.lemp-kpi-trend.up { color: #dc2626; }
.lemp-kpi-trend.down { color: #52c41a; }

/* ============ 通用列表表格 ============ */
.lemp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: auto; /* 默认自动布局，按内容自适应紧凑排列 */
}

/* 强制撑满容器：列均分，无右侧留白 */
.lemp-table-full {
  table-layout: fixed !important;
  width: 100% !important;
}
.lemp-table-full th,
.lemp-table-full td {
  width: auto !important;
}

.lemp-table th {
  background: #fafafa;
  color: #262626;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px; /* 收紧内边距，让列更紧凑 */
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap; /* 表头保持不换行 */
}

.lemp-table td {
  padding: 8px 12px; /* 收紧内边距 */
  border-bottom: 1px solid #f0f0f0;
  color: #595959;
  vertical-align: middle;
}

.lemp-table tr:hover td {
  background: #fafafa;
}

.lemp-table .actions {
  white-space: nowrap;
}

/* Badges */
.lemp-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.lemp-badge-primary { background: #e6f7ff; color: #0284c7; }
.lemp-badge-success { background: #f6ffed; color: #389e0d; }
.lemp-badge-warning { background: #fff7e6; color: #d48806; }
.lemp-badge-danger { background: #fff1f0; color: #cf1322; }
.lemp-badge-info { background: #e6fffb; color: #08979c; }
.lemp-badge-purple { background: #f9f0ff; color: #722ed1; }
.lemp-badge-secondary { background: #f5f5f5; color: #595959; }
.lemp-badge-dark { background: #262626; color: #fff; }

/* ========== 表格内 Badge 全局增强（浅底深字+边框，解决条纹表上看不清问题）========== */
.table .badge {
  padding: 3px 8px !important;
  min-width: 28px !important;
  display: inline-block !important;
  text-align: center !important;
}
.table .badge.bg-primary   { background: #dbeafe !important; color: #1d4ed8 !important; border: 1px solid #93c5fd; }
.table .badge.bg-success  { background: #dcfce7 !important; color: #15803d !important; border: 1px solid #86efac; }
.table .badge.bg-warning  { background: #fef3c7 !important; color: #b45309 !important; border: 1px solid #fcd34d; }
.table .badge.bg-danger   { background: #fee2e2 !important; color: #dc2626 !important; border: 1px solid #fca5a5; }
.table .badge.bg-info     { background: #cffafe !important; color: #0e7490 !important; border: 1px solid #67e8f9; }
.table .badge.bg-secondary{ background: #e5e7eb !important; color: #374151 !important; border: 1px solid #d1d5db; font-weight: 600; }
.table .badge.bg-dark     { background: #374151 !important; color: #f9fafb !important; }
/* 详情页/卡片内/页头的 bg-secondary：与表格保持一致（浅灰底+深灰字），避免白字看不清 */
.badge.bg-secondary { background: #e5e7eb !important; color: #374151 !important; border: 1px solid #d1d5db; font-weight: 600; }
/* text-bg-* 变体也覆盖 */
.table .badge.text-bg-primary   { background: #dbeafe !important; color: #1d4ed8 !important; }
.table .badge.text-bg-success   { background: #dcfce7 !important; color: #15803d !important; }
.table .badge.text-bg-warning   { background: #fef3c7 !important; color: #b45309 !important; }
.table .badge.text-bg-danger    { background: #fee2e2 !important; color: #dc2626 !important; }
.table .badge.text-bg-info      { background: #cffafe !important; color: #0e7490 !important; }
.table .badge.text-bg-secondary { background: #e5e7eb !important; color: #374151 !important; }

/* ========== Filter Pills 彩色分类筛选芯片 ========== */
.lemp-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
}
.lemp-pill,
a.lemp-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 9px 20px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  border: 1.5px solid transparent !important;
  transition: all .2s ease !important;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.lemp-pill:hover,
a.lemp-pill:hover {
  filter: brightness(.95);
  transform: translateY(-1px);
  text-decoration: none !important;
}

/* 默认态：彩色浅底（始终带色） */
.lemp-pill-c-blue   { background:#e0f2fe !important; color:#0369a1 !important; border-color:#bae6fd !important; }
.lemp-pill-c-cyan   { background:#e6fffb !important; color:#08979c !important; border-color:#87e8de !important; }
.lemp-pill-c-orange { background:#fff7e6 !important; color:#d48806 !important; border-color:#ffd591 !important; }
.lemp-pill-c-gray   { background:#fafafa !important; color:#595959 !important; border-color:#d9d9d9 !important; }
.lemp-pill-c-green  { background:#f6ffed !important; color:#389e0d !important; border-color:#b7eb8f !important; }
.lemp-pill-c-red    { background:#fff1f0 !important; color:#cf1322 !important; border-color:#ffa39e !important; }

/* 激活态：同色实心 + 白字 + 投影 + 对勾 */
.lemp-pill-active {
  color: #fff !important;
  font-weight: 700 !important;
  border-color: transparent !important;
  box-shadow: 0 3px 10px rgba(0,0,0,.20) !important;
}
.lemp-pill-c-blue.lemp-pill-active   { background:#0369a1 !important; }
.lemp-pill-c-cyan.lemp-pill-active   { background:#08979c !important; }
.lemp-pill-c-orange.lemp-pill-active { background:#fa8c16 !important; }
.lemp-pill-c-gray.lemp-pill-active   { background:#595959 !important; }
.lemp-pill-c-green.lemp-pill-active  { background:#52c41a !important; }
.lemp-pill-c-red.lemp-pill-active    { background:#f5222d !important; }
/* 选中提示：对勾 */
.lemp-pill-active::after {
  content: '\2713';
  font-weight: 700;
  margin-left: 1px;
  font-size: 13px;
  line-height: 1;
}

/* 计数角标 */
.lemp-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}
.lemp-pill-active .lemp-pill-count,
a.lemp-pill-active .lemp-pill-count {
  background: rgba(255,255,255,.30);
  color: #fff !important;
}
.lemp-pill:not(.lemp-pill-active) .lemp-pill-count,
a.lemp-pill:not(.lemp-pill-active) .lemp-pill-count {
  background: rgba(0,0,0,.06);
  color: inherit !important;
}

/* Buttons */
.lemp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}

.lemp-btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.lemp-btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.lemp-btn-default {
  background: #fff;
  color: #595959;
  border-color: #d9d9d9;
}

.lemp-btn-default:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.lemp-btn-danger {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}

.lemp-btn-danger:hover {
  background: #ff7875;
}

.lemp-btn-warning {
  background: #faad14;
  color: #fff;
  border-color: #faad14;
}

.lemp-btn-warning:hover {
  background: #d48806;
  color: #fff;
}

.lemp-btn-success {
  background: #52c41a;
  color: #fff;
  border-color: #52c41a;
}

.lemp-btn-success:hover {
  background: #73d13d;
  color: #fff;
}

.lemp-btn-info {
  background: #1890ff;
  color: #fff;
  border-color: #1890ff;
}

.lemp-btn-info:hover {
  background: #40a9ff;
  color: #fff;
}

.lemp-row-warning > td {
  background: #fffbe6;
}

.lemp-btn-sm {
  padding: 4px 12px;
  font-size: 13px;
}

/* Search form */
.lemp-search-form {
  background: #fafafa;
  padding: 16px 20px;
  border-radius: var(--card-radius);
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.lemp-search-form .form-group {
  margin-bottom: 0;
}

.lemp-search-form .form-label {
  font-size: 13px;
  color: #262626;
  margin-bottom: 4px;
  font-weight: 500;
}

.lemp-search-form .form-control,
.lemp-search-form .form-select {
  font-size: 14px;
  border-color: #d9d9d9;
}

.lemp-search-form .form-control:focus,
.lemp-search-form .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* 统一所有输入框聚焦态：蓝色高亮 + 平滑过渡（与模糊搜索组件一致） */
.form-control,
.form-select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15) !important;
}

/* Pagination */
.lemp-pagination {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.lemp-pagination .page-link {
  border: 1px solid #d9d9d9;
  color: #595959;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 14px;
}

.lemp-pagination .page-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

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

/* Pagination Bar (full-featured) */
.lemp-pagination-bar {
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  border-radius: 0 0 8px 8px;
}
.lemp-page-size-selector select {
  font-size: 13px;
  padding: 4px 28px 4px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: border-color 0.2s;
}
.lemp-page-size-selector select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
}
.lemp-page-jumper input {
  font-size: 13px;
  text-align: center;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  transition: border-color 0.2s;
}
.lemp-page-jumper input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
}
.lemp-page-jumper .btn {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
}

/* Login page */
.lemp-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #001529 0%, #0c2135 100%);
  position: relative;
  overflow: hidden;
}

.lemp-login-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 80% 80%, rgba(14, 165, 233, 0.1) 0%, transparent 40%);
}

.lemp-login-box {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.lemp-login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.lemp-login-logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  margin-bottom: 16px;
}

.lemp-login-logo h3 {
  font-size: 24px;
  font-weight: 600;
  color: #262626;
  margin-bottom: 4px;
}

.lemp-login-logo p {
  color: #6b7280;
  font-size: 20px;
  margin: 0;
}

.lemp-login-company-logo {
  position: absolute;
  top: 0;
  left: 12px;
  width: 100px;
  height: 100px;
  object-fit: contain;
  z-index: 2;
}

.lemp-login-platform-logo {
  width: 104px;
  height: 104px;
  margin-bottom: 12px;
}

.lemp-login-form .form-label {
  font-size: 14px;
  color: #262626;
  font-weight: 500;
}

.lemp-login-form .input-group-text {
  background: #fafafa;
  border-right: none;
  color: #6b7280;
}

.lemp-login-form .form-control {
  border-left: none;
  padding-left: 0;
}

.lemp-login-form .form-control:focus {
  box-shadow: none;
  border-color: #d9d9d9;
}

.lemp-login-form .form-control:focus + .input-group-text,
.lemp-login-form .form-control:focus ~ .input-group-text {
  border-color: var(--primary);
  color: var(--primary);
}

.lemp-login-btn {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 4px;
  background: var(--primary);
  border-color: var(--primary);
}

.lemp-login-btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.lemp-login-footer {
  text-align: center;
  margin-top: 24px;
  color: #6b7280;
  font-size: 13px;
}

/* Collapsed sidebar state */
.lemp-layout.collapsed .lemp-sidebar {
  width: var(--sidebar-collapsed-width);
}

.lemp-layout.collapsed .lemp-sidebar-brand span,
.lemp-layout.collapsed .lemp-menu-text,
.lemp-layout.collapsed .lemp-menu-arrow,
.lemp-layout.collapsed .lemp-submenu,
.lemp-layout.collapsed .lemp-third-menu {
  display: none;
}

.lemp-layout.collapsed .lemp-main-wrapper {
  margin-left: var(--sidebar-collapsed-width);
}

.lemp-layout.collapsed .lemp-menu-link {
  justify-content: center;
  padding: 12px 0;
}

.lemp-layout.collapsed .lemp-menu-link i.lemp-menu-icon {
  margin-right: 0;
  font-size: 20px;
}

/* Responsive */
@media (max-width: 992px) {
  .lemp-sidebar {
    transform: translateX(-100%);
  }
  .lemp-sidebar.open {
    transform: translateX(0);
  }
  .lemp-main-wrapper {
    margin-left: 0;
  }
  .lemp-layout.collapsed .lemp-main-wrapper {
    margin-left: 0;
  }
}

/* Utilities */
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }

.lemp-empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #6b7280;
}

.lemp-empty-state i {
  font-size: 48px;
  color: #d9d9d9;
  margin-bottom: 16px;
}

/* Sidebar collapse button (desktop) */
.lemp-sidebar-collapse {
  position: absolute;
  right: -12px;
  bottom: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--bg-sidebar-light);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.2s;
}

.lemp-sidebar-collapse:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.lemp-sidebar-collapse i {
  font-size: 12px;
  transition: transform 0.3s;
}

/* Mobile sidebar overlay */
.lemp-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
}

.lemp-sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Breadcrumb separators */
.lemp-breadcrumb-sep {
  color: #bfbfbf;
  font-size: 12px;
}

/* Topbar center + global search */
.lemp-topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  min-width: 0;
}

.lemp-global-search {
  position: relative;
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0f2f5;
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 0 14px;
  height: 36px;
  transition: all 0.2s;
}

.lemp-global-search:focus-within {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.lemp-global-search > i {
  color: #6b7280;
  font-size: 15px;
}

.lemp-global-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #333;
  min-width: 0;
}

.lemp-global-search kbd {
  font-size: 11px;
  color: #6b7280;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--font-family);
  white-space: nowrap;
}

.lemp-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
  padding: 6px;
  display: none;
  z-index: 1100;
  max-height: 360px;
  overflow-y: auto;
}

.lemp-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  transition: background 0.15s ease, color 0.15s ease;
}

.lemp-search-item:hover,
.lemp-search-item.active {
  background: #e8f4fd !important;
  color: #0ea5e9 !important;
}

.lemp-search-item-group {
  font-size: 12px;
  color: #6b7280;
  background: #f5f5f5;
  border-radius: 4px;
  padding: 1px 8px;
  white-space: nowrap;
}

.lemp-search-item-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.lemp-search-item > i {
  color: #bfbfbf;
  font-size: 13px;
}

.lemp-search-empty {
  padding: 16px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}

/* Topbar clock */
.lemp-topbar-clock {
  font-size: 13px;
  color: #595959;
  white-space: nowrap;
  padding: 0 8px;
  font-variant-numeric: tabular-nums;
}

/* Hide search + clock on small screens */
@media (max-width: 992px) {
  .lemp-topbar-center { display: none; }
  .lemp-topbar-clock { display: none; }
}

/* Collapsed sidebar -> show tooltips via native title on top-level items */
.lemp-layout.collapsed .lemp-menu-link {
  position: relative;
}

.lemp-layout.collapsed .lemp-sidebar-collapse {
  right: 50%;
  transform: translateX(50%);
}

/* Quick actions on dashboard */
.lemp-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.lemp-quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  text-decoration: none;
  color: #262626;
  transition: all 0.2s;
}

.lemp-quick-action:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.12);
  color: var(--primary-dark);
  transform: translateY(-2px);
}

.lemp-quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}

.lemp-quick-action-text {
  font-size: 14px;
  font-weight: 500;
}

.lemp-quick-action-sub {
  font-size: 12px;
  color: #6b7280;
}

/* List-page scaffold helpers */
.lemp-page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lemp-list-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lemp-list-tools .lemp-btn {
  padding: 4px 12px;
  font-size: 13px;
}

.lemp-content-header .lemp-page-actions .lemp-btn {
  box-shadow: var(--card-shadow);
}

/* ============ 设备台账：卡片视图 ============ */
.lemp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.lemp-eq-card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.lemp-eq-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.10);
  /* 不用 transform（避免成为内部 fixed 元素的 containing block → modal 频闪） */
  top: -2px;
}
.lemp-eq-card-img {
  position: relative;
  height: 130px;
  background: linear-gradient(135deg, #eef2f7, #dde6f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: #9aa7b8;
}
.lemp-eq-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lemp-eq-card-status {
  position: absolute;
  top: 8px;
  left: 8px;
}
.lemp-eq-card-usage {
  position: absolute;
  top: 8px;
  right: 8px;
}
.lemp-eq-card-qr {
  position: absolute;
  top: 38px;
  right: 8px;
  width: 46px;
  height: 46px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,.28);
  background: #fff;
  z-index: 3;
  transition: transform .15s;
}
.lemp-eq-card-qr:hover {
  transform: scale(1.08);
}
.lemp-eq-card-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.lemp-eq-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.lemp-eq-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lemp-eq-card-code {
  font-size: 12px;
  color: #6b7280;
}
.lemp-eq-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lemp-tag {
  font-size: 12px;
  background: #f0f3f7;
  color: #5a6573;
  padding: 1px 8px;
  border-radius: 10px;
}
.lemp-eq-card-info {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 10px;
}
.lemp-eq-card-info li {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  border-bottom: 1px dashed #eee;
  padding: 2px 0;
}
.lemp-eq-card-info li span {
  color: #6b7280;
}
.lemp-eq-card-info li b {
  font-weight: 600;
  color: var(--text-primary);
}
.lemp-eq-card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  padding-top: 8px;
}
.lemp-eq-card-actions .lemp-btn {
  flex: 1;
  justify-content: center;
}

/* ============ 设备台账 / 列表宽表 ============ */
/* 用 table. 类提升特异性，覆盖 Bootstrap .table { width: 100% } */
table.lemp-table-wide {
  /* 默认按内容自适应紧凑排列，不强制撑满容器；
     用户拖拽某列后由 table_resizable.js 切为 fixed + 像素宽度 */
  width: max-content !important;
  min-width: 0 !important;
}
/* 仅当表格被拖拽过（.lemp-table-resizable）时才撑满并允许横向滚动 */
table.lemp-table-resizable {
  width: 100% !important;
  min-width: max-content !important;
}
/* 横向滚动容器：仅控制横向溢出滚动，不限制高度（避免全屏后滚动条异常消失） */
.lemp-content .table-responsive {
  overflow-x: auto;
  overflow-y: visible; /* 纵向不在此处截断，由页面自然流动 */
}
/* 表头纵向吸附 + 文字居中 */
.lemp-table-wide thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fafafa;
  box-shadow: inset 0 -1px 0 #f0f0f0;
  text-align: center;
}
/* 冻结列（序号/图片/设备编号/设备名称）由 equipment_ledger.js 动态计算 left 偏移并加 .frozen 类，
   这里仅保留 thead 纵向吸附；横向冻结的 background 由 .frozen 规则提供 */
.lemp-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}
.lemp-cell-clamp {
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ 设备详情 ============ */
.lemp-detail-tabs {
  border-bottom: 1px solid #e8e8e8;
}
.lemp-detail-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  color: #595959;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 0;
}
.lemp-detail-tabs .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}
.lemp-detail-tabs .nav-link:hover {
  color: var(--primary);
}
.lemp-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.lemp-detail-list {
  display: flex;
  flex-direction: column;
}
.lemp-detail-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed #eee;
  font-size: 14px;
}
.lemp-detail-item:last-child {
  border-bottom: none;
}
.lemp-detail-item span {
  color: #6b7280;
  flex-shrink: 0;
}
.lemp-detail-item b {
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  word-break: break-all;
}
.lemp-field-label {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
}
.lemp-field-value {
  font-size: 14px;
  color: var(--text-primary);
  white-space: pre-wrap;
}

/* ============ 设备表单 ============ */
.lemp-form-section {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin: 18px 0 10px;
  padding-left: 8px;
  border-left: 3px solid var(--primary);
}
.lemp-form-section:first-of-type {
  margin-top: 0;
}
.lemp-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px 18px;
}
.lemp-form-grid .form-group {
  margin-bottom: 0;
}

/* ============ 设备台账：列宽拖拽 / 列筛选 ============ */
.lemp-table-wide th {
  position: relative;
}
.lemp-col-resizer {
  position: absolute;
  top: 0;
  right: -5px;
  width: 12px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
  user-select: none;
  /* 始终显示淡色竖线，提示可拖拽 */
  background: linear-gradient(to right, transparent 40%, rgba(14,165,233,.4) 50%, transparent 60%);
  transition: background .12s, width .12s;
}
.lemp-col-resizer:hover,
.lemp-col-resizer:active {
  background: linear-gradient(to right, transparent 30%, var(--primary) 48%, var(--primary) 52%, transparent 70%);
  width: 14px;
}
/* 确保 th 不裁剪手柄（防止 sticky/overflow 影响点击区） */
.lemp-table-wide th {
  position: relative;
  overflow: visible !important;
}

/* ============ 通用列表：列宽拖拽（table_resizable.js 按需启用） ============ */
/* 仅在用户实际拖拽调整后才添加此类，默认不生效，保持 table-layout:auto 自适应 */
.lemp-table-resizable {
  table-layout: fixed;
}
.lemp-table-resizable thead th {
  position: relative;
}
/* 用户拖拽固定列宽后，超长内容省略号显示 */
.lemp-table-resizable td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 操作列 / 文本居右列保持不省略，避免按钮被截断 */
.lemp-table-resizable th.actions,
.lemp-table-resizable td.actions,
.lemp-table-resizable th.text-end,
.lemp-table-resizable td.text-end {
  overflow: visible;
  white-space: nowrap;
}
/* 隐藏列 */
.lemp-table-wide th.eq-hidden,
.lemp-table-wide td.eq-hidden {
  display: none !important;
}
/* 冻结列：由 JS 计算 left；这里仅提供底色与层级 */
.lemp-table-wide th.frozen,
.lemp-table-wide td.frozen {
  position: sticky;
  z-index: 2;
  background: #fff;
}
.lemp-table-wide thead th.frozen {
  z-index: 5;
  background: #fafafa;
}
.lemp-table-wide tbody tr:hover td.frozen {
  background: #f5f5f5;
}
/* 冻结列右侧投影 */
.lemp-table-wide td.frozen::after {
  content: '';
  position: absolute;
  top: 0;
  right: -4px;
  width: 4px;
  height: 100%;
  box-shadow: 3px 0 5px -2px rgba(0,0,0,0.12);
  pointer-events: none;
}
.lemp-link-strong {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.lemp-link-strong:hover {
  text-decoration: underline;
}

/* 字段筛选面板 */
.eq-col-filter-panel {
  position: absolute;
  top: 38px;
  right: 0;
  width: 240px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  z-index: 1080;
  display: none;
  overflow: hidden;
}
.eq-col-filter-panel.show {
  display: block;
}
.eq-col-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  font-weight: 600;
  color: #262626;
}
.eq-col-link {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  margin-left: 8px;
}
.eq-col-link:hover { text-decoration: underline; }
.eq-col-filter-body {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
}
.eq-col-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 13px;
  color: #595959;
  cursor: pointer;
  border-radius: 4px;
}
.eq-col-option:hover { background: #f5f7fa; }
.eq-col-option input { cursor: pointer; }

/* ============ 设备台账：卡片视图（风塔风格） ============ */
.lemp-eq-card-img {
  position: relative;
  height: 150px;
  background: linear-gradient(135deg, #eef2f7, #dde6f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #9aa7b8;
  overflow: hidden;
}
.lemp-eq-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lemp-eq-card-imgbtn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: background .2s;
}
.lemp-eq-card-imgbtn:hover { background: var(--primary); }
.lemp-eq-card-title-link {
  color: var(--text-primary);
  text-decoration: none;
}
.lemp-eq-card-title-link:hover { color: var(--primary); }
.lemp-eq-card-code-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.lemp-eq-card-code-link:hover { text-decoration: underline; }

/* ============ 设备快速查看抽屉 ============ */
.eq-quick-offcanvas {
  width: 420px;
  max-width: 92vw;
}
.eq-quick-header {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #fff;
  border-bottom: none;
}
.eq-quick-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}
.eq-quick-head-left {
  display: flex;
  gap: 14px;
  align-items: center;
}
.eq-quick-photo-wrap {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.eq-quick-photo { width: 100%; height: 100%; object-fit: cover; }
.eq-quick-photo-icon { font-size: 34px; color: rgba(255,255,255,0.8); }
.eq-quick-head-info { flex: 1; min-width: 0; }
.eq-quick-name { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq-quick-code { font-size: 13px; opacity: 0.9; margin-bottom: 6px; }
.eq-quick-badges { display: flex; gap: 6px; }
.eq-quick-body { padding: 0; display: flex; flex-direction: column; }
.eq-quick-tabs { padding: 0 12px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0; }
.eq-quick-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  color: #595959;
  font-size: 13px;
  padding: 10px 8px;
  border-radius: 0;
}
.eq-quick-tabs .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
  font-weight: 600;
}
.eq-quick-tab-content {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
}
.eq-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.eq-quick-field {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed #eee;
  font-size: 13px;
}
.eq-quick-field span { color: #6b7280; flex-shrink: 0; }
.eq-quick-field b { font-weight: 600; color: var(--text-primary); text-align: right; word-break: break-all; }
.eq-quick-section-title { font-size: 13px; font-weight: 600; color: #262626; margin: 12px 0 6px; }
.eq-quick-actions {
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  background: #fafafa;
}
.eq-quick-actions .lemp-btn { justify-content: center; }
.eq-quick-photo-wrap { position: relative; }




/* ===== 到期预警行高亮（专项/计量台账通用） ===== */
.lemp-table tr.table-danger-soft > td { background: #fff1f0; }
.lemp-table tr.table-warning-soft > td { background: #fffbe6; }
.lemp-badge-dark { background: #262626; color: #fff; }


/* ===== 设备可搜索下拉选择器（全局通用组件） ===== */
.eq-search-select { position: relative; }
.eq-search-input { width: 100%; padding-right: 30px; box-sizing: border-box; }
.eq-search-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 1055;
  background: #fff; border: 1px solid #dee2e6; border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12); max-height: 240px; overflow-y: auto; display: none;
}
.eq-search-dropdown.show { display: block; }
.eq-search-item {
  padding: 8px 12px; cursor: pointer; font-size: 13px;
  border-bottom: 1px solid #f0f0f0;
  transition: background .18s ease, color .18s ease, border-left-color .18s ease;
  border-left: 3px solid transparent;
}
.eq-search-item:last-child { border-bottom: none; }
/* 蓝色高亮：悬停 + 键盘导航 active（全场景含 Modal 内生效） */
.eq-search-dropdown .eq-search-item:hover,
.eq-search-dropdown .eq-search-item.active,
.modal .eq-search-item:hover,
.modal .eq-search-item.active,
.eq-search-dropdown .modal .eq-search-item:hover,
.eq-search-dropdown .modal .eq-search-item.active {
  background: #e8f4fd !important;
  color: #0ea5e9 !important;
  border-left-color: #0ea5e9 !important;
}
.eq-search-item .eq-code { font-weight: 600; font-size: 12.5px; color: #333; }
.eq-search-item .eq-warehouse { color: #888; font-size: 11.5px; margin-left: 6px; }
.eq-search-empty { padding: 12px; text-align: center; color: #999; font-size: 12.5px; }
.eq-search-spin { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #999; font-size: 14px; pointer-events: none; }

/* ===== 审批流程横向步骤条（1.3.4） ===== */
.lemp-flow-steps {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  padding: 6px 4px 10px;
  -webkit-overflow-scrolling: touch;
}
.lemp-flow-step {
  flex: 0 0 auto;
  min-width: 104px;
  max-width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 2px;
}
.lemp-flow-step .dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #d9d9d9;
  background: #fff;
  color: #bfbfbf;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.lemp-flow-step .dot i { font-size: 14px; line-height: 1; }
.lemp-flow-step .step-name {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #333;
  line-height: 1.3;
  word-break: break-all;
}
.lemp-flow-step .step-meta { font-size: 11px; color: #999; margin-top: 2px; }
.lemp-flow-step .step-status { font-size: 11px; margin-top: 2px; color: #999; }
/* 状态配色 */
.lemp-flow-step.is-done .dot { border-color: #52c41a; background: #f6ffed; color: #389e0d; }
.lemp-flow-step.is-done .step-status { color: #389e0d; }
.lemp-flow-step.is-active .dot {
  border-color: #0ea5e9; background: #e0f2fe; color: #0ea5e9;
  animation: lemp-flow-pulse 1.8s ease-out infinite;
}
.lemp-flow-step.is-active .step-status { color: #0ea5e9; font-weight: 600; }
.lemp-flow-step.is-rejected .dot { border-color: #dc2626; background: #fff2f0; color: #dc2626; }
.lemp-flow-step.is-rejected .step-status { color: #dc2626; }
.lemp-flow-step.is-returned .dot { border-color: #fa8c16; background: #fff7e6; color: #d48806; }
.lemp-flow-step.is-returned .step-status { color: #d48806; }
.lemp-flow-step.is-skipped .dot,
.lemp-flow-step.is-cancelled .dot { border-color: #d9d9d9; background: #fafafa; color: #bbb; }
.lemp-flow-step.is-skipped .step-status,
.lemp-flow-step.is-cancelled .step-status { color: #bbb; }
@keyframes lemp-flow-pulse {
  0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, .35); }
  70% { box-shadow: 0 0 0 8px rgba(14, 165, 233, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}
.lemp-flow-connector {
  flex: 0 0 34px;
  height: 2px;
  background: #e8e8e8;
  margin-top: 14px;
  border-radius: 1px;
}
.lemp-flow-connector.is-done { background: #52c41a; }

/* ===== 审批轨迹时间线（1.3.4） ===== */
.lemp-flow-timeline { padding: 10px 16px 6px; }
.lemp-timeline-item {
  position: relative;
  padding: 0 0 18px 24px;
  border-left: 2px solid #eef0f3;
  margin-left: 7px;
}
.lemp-timeline-item:last-child { border-left-color: transparent; padding-bottom: 6px; }
.lemp-timeline-dot {
  position: absolute;
  left: -9px;
  top: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f0f1f3;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  z-index: 1;
}
.lemp-timeline-dot i { font-size: 9px; line-height: 1; }
.lemp-timeline-body { font-size: 13px; color: #333; }
.lemp-timeline-comment {
  margin-top: 5px;
  background: #fafafa;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12.5px;
  color: #555;
  word-break: break-all;
}
/* 轨迹动作色调 */
.lemp-timeline-item.tone-ok .lemp-timeline-dot { background: #f6ffed; color: #389e0d; }
.lemp-timeline-item.tone-bad .lemp-timeline-dot { background: #fff2f0; color: #dc2626; }
.lemp-timeline-item.tone-warn .lemp-timeline-dot { background: #fff7e6; color: #d48806; }
.lemp-timeline-item.tone-info .lemp-timeline-dot { background: #e0f2fe; color: #0ea5e9; }
.lemp-timeline-item.tone-mute .lemp-timeline-dot { background: #f0f1f3; color: #999; }

/* ===== 1.3.7 UI 规范 ===== */
/* ① 子菜单图标 */
.lemp-submenu-icon { margin-right: 6px; font-size: 13px; opacity: .72; vertical-align: -1px; }

/* ② 长列表冻结表头：表容器限高滚动 + thead sticky */
.table-responsive {
  max-height: 70vh;
}
.table-responsive thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--tblr-bg-surface, #fff);
  box-shadow: inset 0 -1px 0 var(--tblr-border-color, #e9ecef);
}
.table-responsive thead th:first-child { border-top-left-radius: 0; }
.table-responsive thead th:last-child { border-top-right-radius: 0; }

/* ③ 表单错误：字段级提示样式（配合 base.html 全局 JS 指明字段名） */
.errorlist {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  font-size: 12.5px;
  color: #dc3545;
}
.errorlist li { margin-top: 2px; }
.form-control.is-invalid, .form-select.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, .12);
}
.lemp-field-error {
  color: #dc3545;
  font-size: 12.5px;
  margin-top: 4px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

/* ⑤ 管理端移动端补强 */
@media (max-width: 767px) {
  .lemp-topbar { height: auto; min-height: 52px; padding: 6px 10px; gap: 4px; }
  .lemp-topbar-center { order: 3; width: 100%; padding: 2px 0; }
  .lemp-global-search { width: 100%; }
  .lemp-global-search input { min-width: 0; width: 100%; }
  .lemp-topbar-clock { display: none; }
  .lemp-global-search kbd { display: none; }
  .lemp-content-header { gap: 8px; }
  .lemp-card-body { padding: 12px; }
}
