/* 原生 CSS 供 Vue/React/组件库映射；无框架运行时依赖。所有规则限制在 jh-ui 内。 */
.jh-ui, .jh-ui :where(*, *::before, *::after) { box-sizing: border-box; }
.jh-ui :where(h1, h2, h3, p, ul, ol, figure) { margin: 0; }
.jh-ui :where(button, input, select, textarea) { font: inherit; }
.jh-ui :where(button, a, input, select, textarea):focus-visible { outline: 3px solid var(--jh-focus); outline-offset: 3px; }
.jh-ui :where(button) { cursor: pointer; }
.jh-ui :where(button:disabled) { cursor: not-allowed; opacity: .55; }
.jh-ui :where(a) { color: var(--jh-link); text-underline-offset: 4px; }
.jh-ui :where([hidden]) { display: none !important; }
.jh-ui .jh-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.jh-ui .jh-icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.jh-ui .jh-muted { color: var(--jh-text-muted); }
.jh-ui .jh-eyebrow { color: var(--jh-text-muted); font-size: var(--jh-font-xs); letter-spacing: .1em; font-weight: 600; }
.jh-ui .jh-number { font-variant-numeric: tabular-nums; }
.jh-ui .jh-stack { display: grid; gap: var(--jh-space-4); min-width: 0; }
.jh-ui .jh-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--jh-space-2); }
.jh-ui .jh-button { min-height: var(--jh-control-height); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 16px; border: 1px solid var(--jh-border); border-radius: var(--jh-control-radius); background: var(--jh-surface); color: var(--jh-text); text-decoration: none; font-weight: 600; line-height: 1.4; transition: background var(--jh-duration-fast), border-color var(--jh-duration-fast); }
.jh-ui .jh-button:hover:not(:disabled) { background: var(--jh-surface-muted); border-color: var(--jh-text-muted); }
.jh-ui .jh-button--primary { background: var(--jh-brand); color: var(--jh-on-brand); border-color: var(--jh-brand); }
.jh-ui .jh-button--primary:hover:not(:disabled) { background: var(--jh-brand-hover); border-color: var(--jh-brand-hover); }
.jh-ui .jh-button--danger { color: var(--jh-danger); border-color: var(--jh-danger); }
.jh-ui .jh-button[aria-pressed="true"] { background: var(--jh-brand-soft); color: var(--jh-text); border-color: var(--jh-brand-mark); box-shadow: inset 0 -2px 0 var(--jh-brand-mark); }
.jh-ui .jh-field { display: grid; gap: 6px; min-width: 0; color: var(--jh-text); }
.jh-ui .jh-field > span { font-weight: 600; font-size: var(--jh-font-sm); }
.jh-ui .jh-field :where(input, select, textarea) { width: 100%; min-height: var(--jh-control-height); min-width: 0; padding: 8px 12px; border: 1px solid var(--jh-border); border-radius: var(--jh-control-radius); background: var(--jh-surface); color: var(--jh-text); line-height: 1.4; }
.jh-ui .jh-field :where(input, textarea)::placeholder { color: var(--jh-text-muted); opacity: 1; }
.jh-ui .jh-field [aria-invalid="true"] { border-color: var(--jh-danger); }
.jh-ui .jh-field small { font-size: var(--jh-font-xs); color: var(--jh-text-muted); }
.jh-ui .jh-field .jh-field__error { color: var(--jh-danger); }
.jh-ui .jh-formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--jh-space-4); }
.jh-ui .jh-pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; min-width: 0; }
.jh-ui .jh-pagehead > div { min-width: 0; }
.jh-ui .jh-pagehead h1, .jh-ui .jh-pagehead h2 { font-size: var(--jh-font-title); font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.jh-ui .jh-pagehead p { margin-top: 4px; color: var(--jh-text-muted); }
.jh-ui .jh-panel { min-width: 0; border: 1px solid var(--jh-border); border-radius: var(--jh-panel-radius); background: var(--jh-surface); overflow: clip; }
.jh-ui .jh-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--jh-border); flex-wrap: wrap; }
.jh-ui .jh-panel__head h2, .jh-ui .jh-panel__head h3 { font-size: var(--jh-font-section); font-weight: 600; }
.jh-ui .jh-panel__body { padding: 20px; min-width: 0; }
.jh-ui .jh-panel__foot { padding: 12px 20px; border-top: 1px solid var(--jh-border); color: var(--jh-text-muted); font-size: var(--jh-font-xs); }
.jh-ui .jh-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--jh-space-4); }
.jh-ui .jh-metric { min-width: 0; padding: 18px 20px; background: var(--jh-surface); border: 1px solid var(--jh-border); border-radius: var(--jh-panel-radius); }
.jh-ui .jh-metric__label { color: var(--jh-text-muted); font-size: var(--jh-font-sm); }
.jh-ui .jh-metric__value { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 6px; font-size: var(--jh-font-metric); line-height: 1.3; font-weight: 650; font-variant-numeric: tabular-nums; margin: 8px 0; overflow-wrap: anywhere; }
.jh-ui .jh-metric__value small { font-size: var(--jh-font-sm); color: var(--jh-text-muted); font-weight: 400; }
.jh-ui .jh-metric__note { color: var(--jh-text-muted); font-size: var(--jh-font-xs); }
.jh-ui .jh-metrics--strip { gap: 0; border: 1px solid var(--jh-border); border-radius: var(--jh-panel-radius); overflow: hidden; background: var(--jh-surface); }
.jh-ui .jh-metrics--strip .jh-metric { border: 0; border-right: 1px solid var(--jh-border); border-radius: 0; }
.jh-ui .jh-metrics--strip .jh-metric:last-child { border-right: 0; }
.jh-ui .jh-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: var(--jh-space-4); }
.jh-ui .jh-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 4px; background: var(--jh-surface-muted); color: var(--jh-text); font-size: var(--jh-font-xs); font-weight: 500; line-height: 1.6; white-space: nowrap; }
.jh-ui .jh-badge[data-tone="success"] { background: var(--jh-success-soft); color: var(--jh-success); }
.jh-ui .jh-badge[data-tone="warning"] { background: var(--jh-warning-soft); color: var(--jh-warning); }
.jh-ui .jh-badge[data-tone="danger"] { background: var(--jh-danger-soft); color: var(--jh-danger); }
.jh-ui .jh-badge[data-tone="info"] { background: var(--jh-info-soft); color: var(--jh-info); }
.jh-ui .jh-tasklist { list-style: none; padding: 0; }
.jh-ui .jh-tasklist li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 0; }
.jh-ui .jh-tasklist li + li { border-top: 1px solid var(--jh-border); }
.jh-ui .jh-tasklist li:first-child { padding-top: 0; }
.jh-ui .jh-tasklist li:last-child { padding-bottom: 0; }
.jh-ui .jh-tasklist p { margin-top: 5px; font-size: var(--jh-font-xs); color: var(--jh-text-muted); }
.jh-ui .jh-filterbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--jh-space-3); padding: 16px 20px; border-bottom: 1px solid var(--jh-border); }
.jh-ui .jh-filterbar .jh-field { flex: 1 1 160px; }
.jh-ui .jh-tablewrap { width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; }
.jh-ui .jh-table { width: 100%; border-collapse: collapse; font-size: var(--jh-font-sm); text-align: left; }
.jh-ui .jh-table caption { text-align: left; padding: 12px 20px; color: var(--jh-text-muted); font-size: var(--jh-font-xs); }
.jh-ui .jh-table th { height: var(--jh-table-head); color: var(--jh-text-muted); background: var(--jh-surface-muted); font-weight: 600; white-space: nowrap; }
.jh-ui .jh-table :where(th, td) { padding: var(--jh-table-cell-padding) 20px; border-bottom: 1px solid var(--jh-border); }
.jh-ui .jh-table td { height: var(--jh-table-row); }
.jh-ui .jh-table .jh-button { min-height: 32px; padding: 4px 10px; }
.jh-ui .jh-table tbody tr:hover { background: var(--jh-surface-muted); }
.jh-ui .jh-table tbody tr:last-child td { border-bottom: 0; }
.jh-ui .jh-table .jh-numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.jh-ui .jh-state { padding: 40px 20px; display: grid; gap: 12px; justify-items: center; text-align: center; min-height: 220px; align-content: center; }
.jh-ui .jh-state p { color: var(--jh-text-muted); }
.jh-ui .jh-state[data-tone="danger"] strong { color: var(--jh-danger); }
.jh-ui .jh-skeleton { width: min(440px, 90%); height: 12px; border-radius: 4px; background: var(--jh-border); animation: jh-pulse 1.2s ease-in-out infinite alternate; }
.jh-ui .jh-skeleton:nth-of-type(2) { width: min(340px, 70%); }
@keyframes jh-pulse { to { opacity: .35; } }
.jh-ui .jh-progress { display: grid; gap: 16px; }
.jh-ui .jh-progress__row { display: grid; grid-template-columns: 85px minmax(0, 1fr) 48px; align-items: center; gap: 12px; font-size: var(--jh-font-sm); }
.jh-ui .jh-progress progress { display: block; width: 100%; height: 8px; border: 0; border-radius: 4px; overflow: hidden; appearance: none; background: var(--jh-surface-muted); accent-color: var(--jh-brand); }
.jh-ui .jh-progress progress::-webkit-progress-bar { background: var(--jh-surface-muted); }
.jh-ui .jh-progress progress::-webkit-progress-value { background: var(--jh-brand); }
.jh-ui .jh-progress progress::-moz-progress-bar { background: var(--jh-brand); }
.jh-ui .jh-progress__row[data-tone="warning"] progress { accent-color: var(--jh-warning); }
.jh-ui .jh-progress__row[data-tone="warning"] progress::-webkit-progress-value { background: var(--jh-warning); }
.jh-ui .jh-progress__row[data-tone="warning"] progress::-moz-progress-bar { background: var(--jh-warning); }
.jh-ui .jh-shell { display: grid; grid-template-columns: var(--jh-sidebar-width) minmax(0, 1fr); min-width: 0; position: relative; }
.jh-ui .jh-sidebar { grid-row: 1 / 3; padding: 24px 12px; border-right: 1px solid var(--jh-border); background: var(--jh-surface); display: flex; flex-direction: column; gap: 24px; }
.jh-ui .jh-sidebar__brand { padding: 0 12px; font-size: 18px; font-weight: 650; color: var(--jh-brand-text); }
.jh-ui .jh-sidebar nav { display: grid; gap: 6px; }
.jh-ui .jh-navitem { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--jh-text); text-decoration: none; border-radius: 6px; border: 1px solid transparent; font-size: 14px; }
.jh-ui .jh-navitem:hover { background: var(--jh-surface-muted); }
.jh-ui .jh-navitem[aria-current="page"] { background: var(--jh-brand-soft); color: var(--jh-brand-text); border-color: var(--jh-border); box-shadow: inset 3px 0 0 var(--jh-brand); font-weight: 600; }
.jh-ui .jh-topbar { min-height: var(--jh-topbar-height); padding: 12px var(--jh-page-padding); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--jh-border); background: var(--jh-surface); }
.jh-ui .jh-main { padding: var(--jh-page-padding); min-width: 0; display: grid; gap: var(--jh-space-4); align-content: start; }
.jh-ui .jh-menu-toggle { display: none; }
.jh-ui .jh-container { width: 100%; max-width: var(--jh-container); margin-inline: auto; padding-inline: var(--jh-page-padding); }
.jh-ui .jh-sitebar { min-height: var(--jh-topbar-height); display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--jh-border); }
.jh-ui .jh-sitebar strong { font-size: 18px; }
.jh-ui .jh-hero { padding: 64px 0; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); align-items: center; gap: 40px; }
.jh-ui .jh-hero h2 { font-size: clamp(28px, 3.5vw, 48px); line-height: 1.3; margin: 14px 0; font-weight: 650; }
.jh-ui .jh-hero p { max-width: 42em; color: var(--jh-text-muted); }
.jh-ui .jh-hero .jh-actions { margin-top: 24px; }
.jh-ui .jh-hero__aside { padding: 24px; border: 1px solid var(--jh-border); border-radius: var(--jh-panel-radius); background: var(--jh-surface); }
.jh-ui .jh-hero__aside h3 { font-size: 18px; margin-bottom: 16px; }
.jh-ui .jh-servicegrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--jh-space-4); }
.jh-ui .jh-service { display: grid; align-content: start; gap: 10px; min-width: 0; padding: 24px; color: var(--jh-text); text-decoration: none; background: var(--jh-surface); border: 1px solid var(--jh-border); border-radius: var(--jh-panel-radius); transition: border-color var(--jh-duration-fast); }
.jh-ui .jh-service:hover { border-color: var(--jh-brand-mark); }
.jh-ui .jh-service > span { color: var(--jh-text-muted); font-size: var(--jh-font-xs); }
.jh-ui .jh-service h3 { font-size: 18px; }
.jh-ui .jh-service p { color: var(--jh-text-muted); font-size: var(--jh-font-sm); }
.jh-ui .jh-civicnav { display: flex; flex-wrap: wrap; background: var(--jh-brand); padding: 0 16px; gap: 4px; }
.jh-ui .jh-civicnav a { color: var(--jh-on-brand); text-decoration: none; padding: 14px 18px; }
.jh-ui .jh-civicnav a:hover, .jh-ui .jh-civicnav a[aria-current="page"] { background: var(--jh-brand-hover); box-shadow: inset 0 -3px 0 var(--jh-accent); }
.jh-ui .jh-search { display: flex; align-items: end; gap: 8px; margin-top: 24px; }
.jh-ui .jh-search .jh-field { flex: 1; }
.jh-ui .jh-inline-note { padding: 12px 16px; color: var(--jh-text-muted); background: var(--jh-surface-muted); border-left: 3px solid var(--jh-brand-mark); font-size: var(--jh-font-xs); }
.jh-ui .jh-toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: min(420px, calc(100vw - 32px)); padding: 16px 20px; border: 1px solid var(--jh-border); background: var(--jh-surface); color: var(--jh-text); border-radius: 8px; box-shadow: var(--jh-shadow); }

@media (max-width: 1024px) {
  .jh-ui .jh-split { grid-template-columns: 1fr; }
  .jh-ui .jh-pagehead { flex-wrap: wrap; }
  .jh-ui .jh-hero { gap: 24px; }
}
@media (max-width: 768px) {
  .jh-ui .jh-shell { grid-template-columns: minmax(0, 1fr); }
  .jh-ui .jh-sidebar { display: none; position: absolute; z-index: 20; grid-area: 2 / 1 / 3 / 2; inset: 0 auto 0 0; width: min(280px, 85%); box-shadow: var(--jh-shadow); }
  .jh-ui .jh-shell[data-jh-menu-open="true"] .jh-sidebar { display: flex; }
  .jh-ui .jh-menu-toggle { display: inline-flex; }
  .jh-ui .jh-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jh-ui .jh-metrics--strip .jh-metric { border-bottom: 1px solid var(--jh-border); }
  .jh-ui .jh-metrics--strip .jh-metric:nth-child(even) { border-right: 0; }
  .jh-ui .jh-metrics--strip .jh-metric:nth-last-child(-n+2) { border-bottom: 0; }
  .jh-ui .jh-metric { padding: 16px; }
  .jh-ui .jh-metric__value { font-size: 26px; }
  .jh-ui .jh-hero { padding: 32px 0; grid-template-columns: 1fr; }
  .jh-ui .jh-servicegrid, .jh-ui .jh-formgrid { grid-template-columns: 1fr; }
  .jh-ui .jh-sitebar { flex-wrap: wrap; padding-block: 16px; }
  .jh-ui .jh-civicnav { padding: 0 4px; }
  .jh-ui .jh-civicnav a { padding: 12px; }
  .jh-ui .jh-filterbar .jh-field { flex-basis: 100%; }
  .jh-ui .jh-search { align-items: stretch; flex-direction: column; }
  .jh-ui .jh-table { min-width: 640px; }
}
@media (pointer: coarse) {
  .jh-ui :where(.jh-navitem, .jh-civicnav a) { min-height: 44px; }
  .jh-ui .jh-table .jh-button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .jh-ui :where(*, *::before, *::after) { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
