/* Layout polish + hover animations + popup mode for the
 * 综合项目智能辅助评审 prototype (fix.js companion).
 *
 * Sections:
 *  1) Font
 *  2) Card vertical centring (fixes "bar/donut 整体布局偏上")
 *  3) Popup mode for the historical-ledger drawer
 *  4) Hover animations (KPI cards, bar rects, donut segments, rows)
 *  5) Logo sizing
 *  6) Bar chart axis/grid visibility
 *  7) Misc polish
 */

/* === 1) Font =================================================== */
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Inter", system-ui, sans-serif;
}

/* === 8) Attachment preview: widen the original inline panel ===== */
/* Keep the prototype's native inline preview (toggled by 📎 查看附件,
 * with the 文件： attachment switcher + 关联问题定位 box). Only make it
 * wider so it occupies more screen space. !important beats the inline
 * width:700 the React component sets. */
.fx-review-split {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 14px !important;
  width: 100% !important;
}
.fx-preview-wide {
  order: -1 !important;
  flex: 0 0 60% !important;
  width: 60% !important;
  max-width: 60% !important;
  min-width: 0 !important;
}
.fx-review-split > div:not(.fx-preview-wide) {
  flex: 1 1 40% !important;
  min-width: 0 !important;
  max-width: 40% !important;
}
.fx-review-items {
  margin-left: auto !important;
  flex: 0 0 40% !important;
  width: 40% !important;
  max-width: 40% !important;
  min-width: 0 !important;
  height: calc(100vh - 220px) !important;
  overflow: auto !important;
}
.fx-preview-wide {
  display: flex !important;
  flex-direction: column !important;
  height: calc(100vh - 220px) !important;
  min-height: calc(100vh - 220px) !important;
}
.fx-preview-wide iframe.fx-file-frame {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  border: 0 !important;
  background: #E8EBF0 !important;
}
.fx-preview-title-sel {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #1D2129 !important;
  border: 1px solid #D9DEE6 !important;
  border-radius: 6px !important;
  padding: 4px 10px !important;
  background: #fff !important;
  min-width: 260px !important;
  max-width: min(420px, 70%) !important;
  height: 32px !important;
}
.fx-preview-file-row { display: none !important; }

/* === 9) 存疑定位 flash ========================================== */
/* Product decision (2026-08-28): the red-dashed border + numbered badge were
 * removed — the flash framed the whole document and looked wrong. Locate now
 * only scrolls the target into view (see fxLocateInPreview in fix.js). A
 * gentle background tint is kept as a subtle non-intrusive hint. */
.fx-locate-flash {
  border-radius: 6px !important;
  animation: fx-locate-flash 1.7s ease;
}
@keyframes fx-locate-flash {
  0%   { box-shadow: 0 0 0 0 rgba(217,109,0,0);   background: #FFF8F8; }
  18%  { box-shadow: 0 0 0 5px rgba(217,109,0,.45); background: #FFF1E6; }
  100% { box-shadow: 0 0 0 0 rgba(217,109,0,0);   background: #FFF8F8; }
}
.fx-locate-marker {
  position: absolute !important;
  top: -12px !important;
  right: -12px !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  background: #D96D00 !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  z-index: 10 !important;
  box-shadow: 0 2px 6px rgba(217,109,0,0.4) !important;
}

/* === 2) Card vertical centring ================================ */
/* The bar / donut cards: make them flex columns so the chart mount
   can flex:1 and the SVG can centre inside the card content area. */
.fx-card {
  display: flex !important;
  flex-direction: column !important;
}
.fx-card > .fx-chart-mount {
  flex: 1 1 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 280px;
}
/* keep the (hidden) original Recharts wrapper from claiming space */
.fx-card > .fx-hidden-rc { display: none !important; }

/* === 3) Popup mode ============================================ */
/* Convert the right-side drawer (position:fixed, top:56, bottom:0,
   right:0, width:420) into a centred modal. !important beats React's
   inline style on re-render. */
.fx-popup-panel {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  width: 820px !important;
  max-width: calc(100vw - 48px) !important;
  max-height: 84vh !important;
  border-radius: 14px !important;
  border-left: none !important;
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.24),
              0 2px 8px rgba(0, 0, 0, 0.08) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  animation: fx-popup-in 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes fx-popup-in {
  from { transform: translate(-50%, -46%) scale(0.96); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1);     opacity: 1; }
}
/* Slight inner re-layout: title row, tabs, body */
.fx-popup-panel > div:first-child  { padding: 16px 22px !important; border-bottom: 1px solid #F0F2F5; flex: 0 0 auto; }
.fx-popup-panel > div:nth-child(2) { padding: 0 22px !important; flex: 0 0 auto; }
.fx-popup-panel > div:nth-child(3) { flex: 1 1 auto !important; overflow-y: auto !important; padding: 16px 22px !important; }

/* === 4) Hover animations ====================================== */
.fx-kpi { transition: transform 220ms ease, box-shadow 220ms ease; }
.fx-kpi:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08); }

.fx-bar-rect {
  transition: filter 160ms ease, transform 180ms ease;
  transform-origin: bottom center;
  transform-box: fill-box;
  cursor: pointer;
}
.fx-bar-rect:hover {
  filter: brightness(1.18) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35)) saturate(1.2);
  transform: scaleY(1.12);
  stroke: #333;
  stroke-width: 1.5;
}

.fx-donut-seg {
  transition: transform 220ms ease, filter 220ms ease;
  transform-origin: center;
  transform-box: fill-box;
  cursor: pointer;
}
.fx-donut-seg:hover {
  filter: brightness(1.15) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35)) saturate(1.25);
  transform: scale(1.1);
  stroke: #333;
  stroke-width: 2;
}

/* Table row subtle hover */
table tbody tr { transition: background-color 120ms ease; }
table tbody tr:hover { background-color: #FAFBFC !important; }

/* === 5) Logo =================================================== */
.fx-logo-img { display: block; height: 34px; width: auto; }

/* === 6) Bar chart axis visibility ============================== */
.fx-axis  { stroke: #C9CDD4; stroke-width: 1; }
.fx-grid  { stroke: #EEF0F3; stroke-width: 1; }
.fx-axis-tick { font-size: 11px; fill: #4E5969; }
.fx-axis-title { font-size: 12px; fill: #4E5969; font-weight: 500; }

/* === 6b) Bar/donut chart: prevent legend ↔ value-label overlap ===== */
/* The "数量(个) / 金额(万元)" legend sits at the top of the bar chart, and
 * tall bar value labels (e.g. 518 on 营销) crash into it. Give the chart
 * container more top padding so the legend and the tallest value label
 * no longer collide. */
.fx-chart-mount { padding-top: 28px !important; }

/* Move the bar chart legend to the upper-right corner so it doesn't sit
 * in the center overlapping tall value labels. The Recharts legend
 * wrapper is a flex container; we re-anchor it to the right. */
.recharts-legend-wrapper { right: 12px !important; left: auto !important; top: 4px !important; }

/* When a bar scales up on hover (transform: scaleY), the value-label text
 * sits at the bar's original top and gets covered. Lift the label up
 * alongside the bar AND enlarge + color it, matching the standard chart
 * hover pattern (Recharts / ECharts): the value you're reading about
 * jumps out at you. */
.fx-bar-group:hover .recharts-bar-rectangle text {
  transform: translateY(-18px) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  fill: #1250D0 !important;
  transition: transform 160ms ease, font-size 120ms ease;
}

/* === 13b) Review detail: tabs sit close to review items below ===== */
/* The 完整性/规范性/技经 tabs and the review-item list below should feel
 * like one unified block. Reduce the vertical gap between them. */
.fx-review-tab-row + * { margin-top: 0 !important; }
.fx-review-item-list { padding-top: 4px !important; margin-top: 0 !important; }

/* === 14) Review detail: compact breadcrumb row ============== */
/* React's inline `padding: 12px 20px 0px` on the breadcrumb row overwrites
 * any JS !important on re-render (the shorthand expansion wipes the
 * longhand !important we just set). A stylesheet rule with !important
 * wins against non-important inline styles. We tag the row in fix.js
 * with data-fx-crumb="1" (React doesn't manage data-attrs unless they're
 * in props) and target it here. */
[data-fx-crumb="1"] {
  padding: 2px 20px !important;
}
/* === 7) Misc polish ============================================ */
select { font-family: inherit; }

/* Make the long list tables scroll horizontally on narrow screens.
   NOTE (2026-09-10): this used to be a bare `table { min-width: 1180px }`,
   which forced every table in the app — including the ones inside the
   新建批次 / 新建评审意见 dialogs — to at least 1180px, producing a
   pointless horizontal scrollbar inside modals. Scoped to the real long
   tables instead. */
.fx-list-center { min-width: 1180px; }
.fx-invest-table { min-width: 720px; }
table { min-width: 0; }

/* Tabular numbers for KPI values and table cells. */
table td, table th { font-variant-numeric: tabular-nums; }

/* === 10) Center content in 项目列表 & 批次列表 =================== */
/* fix.js tags the two list tables with .fx-list-center. React renders the
 * 项目名称 / 申报时间 / 评审意见 headers with inline textAlign:left, so the
 * cell text sits left while the other columns look centered — lopsided.
 * text-align:center !important beats the inline left-align uniformly. */
.fx-list-center th,
.fx-list-center td {
  text-align: center !important;
}
/* If an 操作 cell uses a flex row (multiple buttons), also center those. */
.fx-list-center td[style*="flex"] {
  justify-content: center !important;
}
/* Keep list-table cells + buttons on a single line so 收口金额（万元） and
 * 编辑 etc. don't break into multi-line fragments when the column is narrow. */
.fx-list-center th,
.fx-list-center td,
.fx-list-center td button {
  white-space: nowrap !important;
}

/* === 12) Dashboard KPI cards polish ============================== */
/* Each .fx-kpi card gets a subtle gradient + a decorative blurred circle in
 * the top-right (the "背景虚化" effect), a colored icon area, and the wavy-line
 * SVG (227×32) is hidden. fix.js's polishKpiCards() applies the per-card
 * palette and hides the wave SVG. */
.fx-kpi {
  position: relative !important;
  overflow: hidden !important;
  /* No max-width — user wants cards back to natural flex sizing so the
   * horizontal gap between cards is even (the 200px cap left huge gaps). */
  flex: 1 1 0 !important;
  min-width: 0 !important;
  background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 60%) !important;
  border-color: rgba(0,0,0,0.06) !important;
}
/* KPI row: full content width, evenly spread. (There used to be a second,
 * contradictory `div:has(> .fx-kpi)` block here that capped the row at
 * 1120px and centred it — dead code, since fix.js also writes width/max-width
 * as inline !important. Removed 2026-09-10 so there is one source of truth.) */
div:has(> .fx-kpi) {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  row-gap: 14px !important;
}
.fx-kpi .fx-blur-deco {
  position: absolute !important;
  top: -30px !important;
  right: -30px !important;
  width: 120px !important;
  height: 120px !important;
  border-radius: 50% !important;
  filter: blur(35px) !important;
  opacity: 0.45 !important;
  z-index: 0 !important;
  pointer-events: none !important;
}
.fx-kpi > *:not(.fx-blur-deco) {
  position: relative !important;
  z-index: 1 !important;
}
.fx-icon-area {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
}

/* === 15) KPI card typography & responsive behaviour ==============
 * React renders the metric label with white-space:nowrap + text-overflow:
 * ellipsis, so at 1440px 累计发文项目数量（比例） was already truncated and
 * below ~1130px all five labels were clipped ("累计评审项目…"). The label now
 * wraps onto at most two lines, and two lines are reserved on every card so
 * the row keeps one uniform height instead of jumping between 124px and
 * 154px. The value scales down on narrower windows rather than overflowing.
 */
[data-fx-kpi-label] {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.4 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  min-height: 2.8em !important;
}
[data-fx-kpi-value] {
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums;
}
.fx-kpi {
  min-height: 118px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}
@media (max-width: 1280px) {
  [data-fx-kpi-value] { font-size: 23px !important; }
}
@media (max-width: 1120px) {
  [data-fx-kpi-value] { font-size: 20px !important; }
  .fx-kpi { flex: 1 1 calc(33.333% - 14px) !important; min-width: 190px !important; }
}
@media (max-width: 820px) {
  [data-fx-kpi-value] { font-size: 19px !important; }
  .fx-kpi { flex: 1 1 calc(50% - 14px) !important; min-width: 170px !important; }
}

/* === 16) App header =============================================
 * The header is a fixed bar; give it a hairline shadow so content scrolling
 * underneath stays legible, and let the nav strip shrink (it used to push
 * 评审人员 / 帮助 off-screen once the window dropped to ~1000px). */
[data-fx-header="1"] {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 2px 10px rgba(0, 0, 0, 0.04) !important;
  z-index: 60 !important;
}
.fx-nav-scroll {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none;
}
.fx-nav-scroll::-webkit-scrollbar { height: 0; display: none; }

/* === 17) Data tables: sticky header, text/number alignment =========
 * Sticky header is applied to the two long 综合计划投资情况表 only.
 *
 * `top` for a sticky element is measured from its nearest SCROLL CONTAINER,
 * not from the viewport. These tables sit in an overflow:auto wrapper, so if
 * the sticky offset is applied while that wrapper still scrolls, the header
 * gets pushed 56px down and lands on top of the first data row. That is
 * exactly what broke the 评审管理 list, so the rule below is enabled only
 * together with the overflow release, and the 评审管理 / 项目列表 tables are
 * left with a normal (non-sticky) header. */
@media (min-width: 1200px) {
  .fx-invest-table thead th {
    position: sticky !important;
    top: 56px !important;
    z-index: 3 !important;
  }
  .fx-table-card:has(.fx-invest-table) { overflow: visible !important; }
  .fx-table-scroll:has(.fx-invest-table) {
    overflow-x: clip !important;
    overflow-y: visible !important;
  }
}
.fx-invest-table th.fx-col-text,
.fx-invest-table td.fx-col-text { text-align: left !important; }
.fx-invest-table th.fx-col-num,
.fx-invest-table td.fx-col-num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}
.fx-invest-table th.fx-col-idx,
.fx-invest-table td.fx-col-idx { text-align: center !important; }
.fx-invest-table td.fx-col-text { padding-left: 14px !important; }
.fx-invest-table th.fx-col-num, .fx-invest-table td.fx-col-num { padding-right: 16px !important; }
/* Group separation: the 一级分类 column is rendered Excel-style (the label
 * on the group's first row with a rowSpan covering the whole group), so every
 * group start gets a divider and subtotal/total rows get emphasis. Note: do
 * NOT try to "fix" the short rows with colSpan — the merge is already correct
 * and adding colSpan shifts the row one column to the right. */
.fx-invest-table tr.fx-group-start > td { border-top: 2px solid #E5E6EB !important; }
.fx-invest-table tr.fx-subtotal-row > td {
  background: #F7F8FA !important;
  font-weight: 600 !important;
}
.fx-invest-table tr.fx-total-row > td {
  background: #EAF3F2 !important;
  font-weight: 700 !important;
  border-top: 2px solid #0D867F !important;
}

/* === 18) Form controls: one size, one radius, visible focus ======== */
select,
input[type="text"],
input[type="number"],
input[type="date"] {
  height: 32px;
  border-radius: 6px !important;
  border: 1px solid #E5E6EB !important;
  color: #1D2129;
  background: #fff;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
/* Textareas keep their own height — only radius/border are unified. */
textarea {
  border-radius: 6px !important;
  border: 1px solid #E5E6EB !important;
  color: #1D2129;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
select { padding: 0 10px; }
select:hover,
input[type="text"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
textarea:hover { border-color: #C9CDD4 !important; }
select:focus,
input:focus,
textarea:focus {
  outline: none;
  border-color: #0D867F !important;
  box-shadow: 0 0 0 3px rgba(13, 134, 127, 0.14);
}
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid #1250D0 !important;
  outline-offset: 2px !important;
}
/* Table action buttons (查看/编辑/编制 …) were only 20px tall — too small a
 * click target next to 13px text. */
table button { min-height: 26px; }

/* === 19) Scrolling & surfaces ==================================== */
/* === 19b) Dashboard charts on narrow windows =====================
 * The bar chart card (flex 3) and the donut card (flex 2) sit side by side.
 * Below ~1150px the donut card gets too narrow for its 类型/数量/占比 legend:
 * the legend overflowed the card and pushed the whole document 48px wider
 * than the viewport. They now stack instead of squeezing. */
@media (max-width: 1150px) {
  div:has(> .fx-card) {
    flex-wrap: wrap !important;
  }
  .fx-card {
    flex: 1 1 100% !important;
    min-width: 0 !important;
  }
}

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: #D6DAE0;
  border: 2px solid transparent;
  background-clip: content-box;
  border-radius: 6px;
}
*::-webkit-scrollbar-thumb:hover { background: #B8BEC8; background-clip: content-box; }
/* Content cards (charts, investment tables) rendered 8px while the KPI cards
 * use 10px — unify. */
.fx-surface { border-radius: 10px !important; }

/* === 20) Minimum readable type ===================================
 * 审查规则配置 renders several badges / units (专业标签、完整性/规范性、
 * AI 标记、单位) at 10px, which is below the comfortable floor for Chinese
 * text. Lift those to 11px; everything else already sits at 11px and up. */
span[style*="font-size: 10px"],
span[style*="font-size:10px"] { font-size: 11px !important; }

/* === 21) Dashboard KPI cards: styled from the very first paint =====
 * The polished KPI look (soft accent gradient, tinted border, per-card icon
 * colour, no wave sparkline) used to be written by fix.js after React mounted.
 * On a cold load React can commit the raw cards well before fix.js' first
 * apply() pass, so the original white card + teal icon + wavy line stayed on
 * screen for a moment (reported as "指标刷新时会先变成旧样式，2-3 秒后才正常").
 *
 * These rules reproduce the same look straight from the inline styles React
 * renders — they match the moment the nodes exist, i.e. in the first painted
 * frame, with no JS involved. fix.js keeps writing the identical values as a
 * fallback, so the two layers agree.
 */
svg[viewBox="0 0 160 32"][preserveAspectRatio="none"] { display: none !important; }

div[style*="flex-wrap: wrap"][style*="gap: 14px"][style*="margin-bottom: 24px"] > div:nth-child(1) {
  background: linear-gradient(135deg, rgba(13,134,127,0.12) 0%, rgba(255,255,255,0) 55%) !important;
  border-color: rgba(13,134,127,0.25) !important;
}
div[style*="flex-wrap: wrap"][style*="gap: 14px"][style*="margin-bottom: 24px"] > div:nth-child(2) {
  background: linear-gradient(135deg, rgba(22,93,255,0.12) 0%, rgba(255,255,255,0) 55%) !important;
  border-color: rgba(22,93,255,0.25) !important;
}
div[style*="flex-wrap: wrap"][style*="gap: 14px"][style*="margin-bottom: 24px"] > div:nth-child(3) {
  background: linear-gradient(135deg, rgba(247,186,30,0.14) 0%, rgba(255,255,255,0) 55%) !important;
  border-color: rgba(212,160,23,0.25) !important;
}
div[style*="flex-wrap: wrap"][style*="gap: 14px"][style*="margin-bottom: 24px"] > div:nth-child(4) {
  background: linear-gradient(135deg, rgba(114,46,209,0.12) 0%, rgba(255,255,255,0) 55%) !important;
  border-color: rgba(114,46,209,0.25) !important;
}
div[style*="flex-wrap: wrap"][style*="gap: 14px"][style*="margin-bottom: 24px"] > div:nth-child(5) {
  background: linear-gradient(135deg, rgba(20,201,201,0.12) 0%, rgba(255,255,255,0) 55%) !important;
  border-color: rgba(20,201,201,0.25) !important;
}
/* Icon boxes: React draws all five in the same teal; re-colour them per card
 * in the first frame so the icons never visibly change colour after load. */
div[style*="flex-wrap: wrap"][style*="gap: 14px"][style*="margin-bottom: 24px"] > div:nth-child(1) div[style*="width: 46px"][style*="height: 46px"] { background: #0D867F !important; }
div[style*="flex-wrap: wrap"][style*="gap: 14px"][style*="margin-bottom: 24px"] > div:nth-child(2) div[style*="width: 46px"][style*="height: 46px"] { background: #165DFF !important; }
div[style*="flex-wrap: wrap"][style*="gap: 14px"][style*="margin-bottom: 24px"] > div:nth-child(3) div[style*="width: 46px"][style*="height: 46px"] { background: #D4A017 !important; }
div[style*="flex-wrap: wrap"][style*="gap: 14px"][style*="margin-bottom: 24px"] > div:nth-child(4) div[style*="width: 46px"][style*="height: 46px"] { background: #722ED1 !important; }
div[style*="flex-wrap: wrap"][style*="gap: 14px"][style*="margin-bottom: 24px"] > div:nth-child(5) div[style*="width: 46px"][style*="height: 46px"] { background: #0FA9A9 !important; }

/* === Review-detail 50/50 preview split, widened new-opinion modal ===
 * The 新建评审意见 / 编辑评审意见 dialog is a custom React modal hardcoded
 * at width:620px. fix.js's resizeOpinionModal walks up from the green
 * (#0D867F) header and bumps it to 1100px; this rule keeps the two
 * .fx-transfer-col even once the dialog is wide, and the name span gets
 * a natural tooltip via the title attribute set in refreshProjectTransfer. */
.fx-project-transfer {
  width: 100%;
  padding: 4px 0 8px !important;
}
.fx-project-transfer > .fx-transfer-col {
  flex: 1 1 50% !important;
  min-width: 0 !important;
}
.fx-project-transfer .fx-transfer-col > label > span[title] {
  /* hover-shows-full-name is pure HTML title; just give it breathing room */
}

/* === 13) Review detail: 50/50 panel split ========================== */
/* The review detail page (审查结果) has the review-items panel on the left
 * and the file-preview panel on the right. Make them each take 50% of
 * the row. The .fx-preview-wide class is already applied to the preview
 * panel by fix.js's enlargePreview(). */
.fx-preview-wide {
  width: 60% !important;
  min-width: 0 !important;
  max-width: 60% !important;
  flex: 0 0 60% !important;
}

.fx-ledger-table thead th {
  background: #F7F8FA !important;
  color: #1D2129 !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}
/* 数字化专业：公共包＋七类子包 */
.fx-rule-original-select {
  display: block !important;
}

.fx-digital-rule-tabs {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid #E5E6EB;
  background: #fff;
}

.fx-rule-tabs-label {
  flex: 0 0 auto;
  padding: 13px 0 11px;
  color: #86909C;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.fx-rule-tab-list {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: flex-end;
  min-width: 0;
  column-gap: 2px;
}

.fx-rule-tab {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 13px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  outline: none;
  background: transparent;
  color: #4E5969;
  font: inherit;
  font-size: 13px;
  line-height: 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.fx-rule-tab:hover {
  background: #F0FBF9;
  color: #0D867F;
}

.fx-rule-tab.is-active {
  border-bottom-color: #0D867F;
  color: #0D867F;
  font-weight: 650;
}

.fx-rule-tab:focus-visible {
  border-radius: 4px 4px 0 0;
  box-shadow: 0 0 0 2px rgba(13, 134, 127, .2) inset;
}

.fx-rule-row-hidden {
  display: none !important;
}

.fx-custom-category {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid #8DCAC7;
  border-radius: 10px;
  background: #E6F4F3;
  color: #0D867F;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.fx-custom-rule-title {
  display: flex;
  align-items: center;
  margin-bottom: 3px;
  color: #1D2129;
  font-size: 13px;
  font-weight: 600;
}

.fx-custom-rule-desc {
  color: #86909C;
  font-size: 12px;
  line-height: 1.5;
}

.fx-custom-rule-switch {
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

.fx-package-ai {
  flex: 0 0 auto;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, #1250D0, #0D867F);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
}

.fx-package-param-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fx-package-param-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fx-package-param-line > span:first-child {
  flex: 0 0 110px;
  min-width: 110px;
  color: #86909C;
  font-size: 11px;
}

.fx-package-param-line input {
  width: 64px;
  padding: 3px 7px;
  border: 1px solid #E5E6EB;
  border-radius: 4px;
  outline: none;
  background: #fff;
  color: #1D2129;
  font-family: monospace;
  font-size: 12px;
  text-align: right;
}

.fx-package-param-line input:focus {
  border-color: #0D867F;
  box-shadow: 0 0 0 2px rgba(13, 134, 127, .12);
}

.fx-package-param-line > span:last-child {
  color: #86909C;
  font-size: 11px;
}

.fx-rule-package-empty {
  padding: 42px 20px 46px;
  border-bottom: 1px solid #F2F3F5;
  background: #fff;
  text-align: center;
}

.fx-rule-package-empty span,
.fx-rule-package-empty em {
  display: block;
}

.fx-rule-package-empty span {
  color: #4E5969;
  font-size: 14px;
  font-weight: 600;
}

.fx-rule-package-empty em {
  margin-top: 6px;
  color: #A9AEB8;
  font-size: 12px;
  font-style: normal;
}

@media (max-width: 980px) {
  .fx-digital-rule-tabs {
    align-items: flex-start;
    gap: 4px;
    padding-top: 7px;
  }

  .fx-rule-tabs-label {
    padding: 7px 10px 0 0;
  }

  .fx-rule-tab {
    padding: 7px 10px 8px;
  }
}
