/*!
 * 伏虎工作台 P1 增量样式 · 2026-11-07 t521u
 * 挂载：ui-p0-20261107.css 之后；戳：20261107v273
 * 覆盖：侧栏搜索/收藏；最近使用宫格；表格壳；移动端抽屉；登录页对比度
 */
:root {
  --fh-p1-primary: #1a56db;
  --fh-p1-primary-deep: #1e3a8a;
  --fh-p1-accent: #f59e0b;
  --fh-p1-accent-soft: #fffbeb;
  --fh-p1-border: #e2e8f0;
  --fh-p1-card: #ffffff;
  --fh-p1-danger: #b91c1c;
  --fh-p1-danger-bg: #fee2e2;
}

/* ===== 1) 登录页：加大对比度 / 字号（一眼差异） ===== */
.login-page .login-subtitle {
  color: #0f172a !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  margin-top: 12px !important;
  letter-spacing: 0.4px;
}
.login-page .login-hint {
  margin-top: 14px !important;
  padding: 12px 14px !important;
  background: #eff6ff !important;
  border: 2px solid #93c5fd !important;
  border-radius: 10px !important;
  color: #1e3a8a !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  box-shadow: 0 2px 8px rgba(26, 86, 219, 0.08);
}
.login-page .login-hint strong {
  color: #1e3a8a !important;
  font-weight: 800 !important;
  font-size: 14.5px;
}
.login-page .login-error {
  font-size: 15px !important;
  font-weight: 600 !important;
  padding: 12px 14px !important;
  border-width: 2px !important;
  border-radius: 10px !important;
}
.login-page .login-error.is-visible,
.login-page .login-error[style*="display: block"] {
  display: block !important;
  background: var(--fh-p1-danger-bg) !important;
  color: var(--fh-p1-danger) !important;
  border-color: #fca5a5 !important;
}
.login-page .login-pwd-path {
  margin-top: 14px !important;
  font-size: 13.5px !important;
  color: #334155 !important;
  font-weight: 500;
}
.login-page .login-footer {
  margin-top: 22px !important;
  padding: 16px 12px 8px !important;
  font-size: 13.5px !important;
  background: rgba(15, 23, 42, 0.28);
  border-radius: 12px;
  max-width: 520px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.login-page .login-footer .lf-org {
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px;
}
.login-page .login-footer .lf-meta {
  opacity: 0.95 !important;
  font-size: 13px !important;
}
.login-page .login-btn {
  font-size: 17px !important;
  padding: 15px !important;
  letter-spacing: 2px;
  box-shadow: 0 8px 20px rgba(26, 86, 219, 0.35);
}
.login-page .fh-p1-login-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #1a56db;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ===== 2) 侧栏搜索 + 收藏置顶 ===== */
.fh-nav-tools {
  padding: 10px 10px 8px;
  border-bottom: 1px solid #334155;
  background: #0f172a;
  position: sticky;
  top: 0;
  z-index: 5;
}
.fh-nav-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.fh-nav-search-wrap::before {
  content: "⌕";
  position: absolute;
  left: 10px;
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
}
.fh-nav-search {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 30px;
  border: 2px solid #3b82f6;
  border-radius: 10px;
  background: #1e293b;
  color: #f8fafc;
  font-size: 13.5px;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}
.fh-nav-search::placeholder { color: #94a3b8; }
.fh-nav-search:focus {
  border-color: #60a5fa;
  background: #0f172a;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.4);
}
.fh-nav-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: none;
}
.fh-nav-search-clear.is-on { display: inline-flex; align-items: center; justify-content: center; }
.fh-nav-search-clear:hover { background: #334155; color: #fff; }
.fh-nav-tools-hint {
  margin-top: 6px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
}
.fh-nav-fav {
  margin: 8px 8px 4px;
  padding: 8px 8px 6px;
  border-radius: 10px;
  background: linear-gradient(180deg, #1e3a5f 0%, #1e293b 100%);
  border: 1px solid #334155;
}
.fh-nav-fav-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px 6px;
  font-size: 12px;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.3px;
}
.fh-nav-fav-empty {
  padding: 6px 4px 4px;
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.4;
}
.fh-nav-fav .nav-item {
  margin: 2px 0 !important;
  background: rgba(251, 191, 36, 0.08);
}
.fh-nav-fav .nav-item:hover { background: rgba(251, 191, 36, 0.18) !important; }
.nav-item .fh-fav-star {
  margin-left: auto;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-item .fh-fav-star:hover { background: rgba(255,255,255,0.08); color: #fbbf24; }
.nav-item .fh-fav-star.is-on { color: #fbbf24; }
.sidebar.collapsed .fh-nav-tools,
.sidebar.collapsed .fh-nav-fav { display: none; }
.nav-group.fh-nav-filtered-out,
.nav-item.fh-nav-filtered-out,
.nav-sub.fh-nav-filtered-out { display: none !important; }
.nav-group.fh-nav-search-hit:not(.collapsed) .nav-group-body,
.nav-group.fh-nav-search-hit .nav-group-body { display: block !important; }
#navCompactBar { border-color: #334155 !important; }
#navCompactBar .btn,
#navCompactBtn {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}

/* ===== 3) 首页「最近使用」6 宫格 ===== */
.fh-recent-zone {
  margin: 0 0 16px;
  padding: 14px 16px 12px;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 55%);
  border: 2px solid #fcd34d;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12);
}
.fh-recent-zone .fh-zone-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.fh-recent-zone .fh-zone-title {
  font-size: 16px;
  font-weight: 800;
  color: #92400e;
}
.fh-recent-zone .fh-zone-sub {
  font-size: 12px;
  color: #b45309;
  font-weight: 500;
}
.fh-recent-zone .fh-zone-clear {
  margin-left: auto;
  font-size: 12px;
  color: #92400e;
  background: transparent;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 3px 8px;
  cursor: pointer;
}
.fh-recent-zone .fh-zone-clear:hover { background: #fef3c7; }
.fh-recent-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.fh-recent-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 84px;
  padding: 10px 6px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #fde68a;
  text-decoration: none !important;
  color: #78350f !important;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  text-align: center;
}
.fh-recent-card:hover {
  transform: translateY(-2px);
  border-color: #f59e0b;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.2);
}
.fh-recent-card .ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff7ed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.fh-recent-card .lab {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fh-recent-card .meta {
  font-size: 10.5px;
  color: #a16207;
}
.fh-recent-empty {
  grid-column: 1 / -1;
  padding: 14px;
  text-align: center;
  color: #92400e;
  font-size: 13px;
  background: #fffbeb;
  border-radius: 10px;
  border: 1px dashed #fcd34d;
}

/* ===== 4) 表格壳统一 ===== */
.fh-table-shell,
.table-wrap,
.biz-table-wrap,
.page-container .table-responsive,
.page-container .data-table-wrap {
  background: #fff;
  border: 1px solid var(--fh-p1-border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
}
.fh-table-toolbar,
.fh-table-shell > .fh-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--fh-p1-border);
}
.fh-table-toolbar .fh-filter-input,
.fh-table-shell .fh-filter-input {
  height: 34px;
  min-width: 160px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
}
.fh-table-toolbar .btn,
.fh-table-shell .btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
}
.fh-table-shell .data-table,
.fh-table-shell table,
.table-wrap .data-table,
.biz-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.fh-table-shell th,
.table-wrap th,
.biz-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f5f9;
  font-weight: 700;
  color: #334155;
}
.fh-table-shell td.fh-col-actions,
.fh-table-shell th.fh-col-actions,
.data-table td.fh-col-actions,
.data-table th.fh-col-actions,
.biz-table td:last-child,
.data-table td:last-child {
  position: sticky;
  right: 0;
  background: #fff;
  box-shadow: -6px 0 8px -6px rgba(15, 23, 42, 0.18);
  white-space: nowrap;
  z-index: 1;
}
.fh-table-shell th.fh-col-actions,
.data-table th.fh-col-actions,
.biz-table th:last-child,
.data-table th:last-child {
  background: #f1f5f9;
  z-index: 2;
}
.fh-table-scroll {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.fh-table-empty {
  padding: 28px 16px;
  text-align: center;
  color: #64748b;
}
.fh-table-empty .empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}
.fh-table-empty .empty-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== 5) 移动端：抽屉触发更明显 + 窄屏宫格 ===== */
.mobile-menu-btn.fh-p1-drawer-btn,
button.mobile-menu-btn {
  display: none;
}
@media (max-width: 768px) {
  .mobile-menu-btn,
  button.mobile-menu-btn,
  .mobile-menu-btn.fh-p1-drawer-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-width: 72px !important;
    height: 40px !important;
    padding: 0 12px !important;
    border-radius: 10px !important;
    background: #1a56db !important;
    color: #fff !important;
    border: 2px solid #1e40af !important;
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.35) !important;
    flex-direction: row !important;
  }
  .mobile-menu-btn span {
    background: #fff !important;
    width: 16px !important;
    height: 2px !important;
  }
  .mobile-menu-btn .fh-drawer-label {
    display: inline !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
  }
  .fh-drawer-fab {
    display: flex !important;
    position: fixed;
    right: 14px;
    bottom: 18px;
    z-index: 1200;
    align-items: center;
    gap: 6px;
    height: 48px;
    padding: 0 16px;
    border-radius: 999px;
    background: #1a56db;
    color: #fff;
    border: 0;
    box-shadow: 0 8px 24px rgba(26, 86, 219, 0.45);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }
  .fh-recent-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .fh-home-tri .fh-shortcut-grid,
  .fh-shortcut-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .sidebar-overlay.fh-p1-overlay,
  .fh-p1-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 999;
  }
  .sidebar.open ~ .fh-p1-overlay,
  .sidebar.open + .sidebar-overlay,
  body.fh-sidebar-open .fh-p1-overlay {
    display: block !important;
  }
  .sidebar {
    box-shadow: 8px 0 28px rgba(0, 0, 0, 0.28);
  }
}
@media (min-width: 769px) {
  .fh-drawer-fab { display: none !important; }
  .fh-recent-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .fh-recent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* 版本角标（桌面顶栏弱提示，证明 P1 已挂） */
.fh-p1-ver {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  margin-right: 6px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
