Просмотр исходного кода

feat(web): 重设计本方变更记录页面

sy 3 дней назад
Родитель
Сommit
5b2323d7f6
3 измененных файлов с 182 добавлено и 46 удалено
  1. 3 3
      web-scaffold/src/app/App.tsx
  2. 83 43
      web-scaffold/src/pages/AuditLogPage.tsx
  3. 96 0
      web-scaffold/src/styles/party-audit.css

+ 3 - 3
web-scaffold/src/app/App.tsx

@@ -302,9 +302,9 @@ function Workspace() {
         <Route path="/audit-logs" element={<AppShell pageTitle="审计日志"><AuditLogPage /></AppShell>} />
         <Route path="/audit-logs" element={<AppShell pageTitle="审计日志"><AuditLogPage /></AppShell>} />
         {/* ══ 册 8 只读视图(视图§14.1 路由表逐字) ══ */}
         {/* ══ 册 8 只读视图(视图§14.1 路由表逐字) ══ */}
         {/* V-P4/V-P9 本方变更记录:同一读口、同一组件,按宿主身份换标题(作业§5.3 纪律 3) */}
         {/* V-P4/V-P9 本方变更记录:同一读口、同一组件,按宿主身份换标题(作业§5.3 纪律 3) */}
-        <Route path="/bos/pv/n" element={<AppShell pageTitle="本方变更记录"><AuditLogPage pageTitle="本方变更记录" /></AppShell>} />
-        <Route path="/bos/ov/n" element={<AppShell pageTitle="本方变更记录"><AuditLogPage pageTitle="本方变更记录" /></AppShell>} />
-        <Route path="/bos/tv/n" element={<AppShell pageTitle="本方变更记录"><AuditLogPage pageTitle="本方变更记录" /></AppShell>} />
+        <Route path="/bos/pv/n" element={<AppShell pageTitle="本方变更记录"><AuditLogPage pageTitle="本方变更记录" partyView /></AppShell>} />
+        <Route path="/bos/ov/n" element={<AppShell pageTitle="本方变更记录"><AuditLogPage pageTitle="本方变更记录" partyView /></AppShell>} />
+        <Route path="/bos/tv/n" element={<AppShell pageTitle="本方变更记录"><AuditLogPage pageTitle="本方变更记录" partyView /></AppShell>} />
         {/* V-P1 合伙人本运营区域对账(合并页) */}
         {/* V-P1 合伙人本运营区域对账(合并页) */}
         <Route path="/bos/pv/recon" element={<AppShell pageTitle="本运营区域对账"><PartnerReconPage /></AppShell>} />
         <Route path="/bos/pv/recon" element={<AppShell pageTitle="本运营区域对账"><PartnerReconPage /></AppShell>} />
         {/* V-P2 合伙人客户清单 */}
         {/* V-P2 合伙人客户清单 */}

+ 83 - 43
web-scaffold/src/pages/AuditLogPage.tsx

@@ -17,7 +17,7 @@
  */
  */
 import { useState } from "react";
 import { useState } from "react";
 import { PageIntro } from "../components/PageIntro";
 import { PageIntro } from "../components/PageIntro";
-import { Download, Search } from "lucide-react";
+import { ChevronDown, Download, Fingerprint, Search, UserRound } from "lucide-react";
 import { Button } from "../components/ui/button";
 import { Button } from "../components/ui/button";
 import { Input } from "../components/ui/input";
 import { Input } from "../components/ui/input";
 import { FilterSelect } from "../components/ui/filter-select";
 import { FilterSelect } from "../components/ui/filter-select";
@@ -54,6 +54,7 @@ import {
 } from "../lib/copy-jobs";
 } from "../lib/copy-jobs";
 import type { AuditItem } from "../lib/api/types";
 import type { AuditItem } from "../lib/api/types";
 import "../styles/operations.css";
 import "../styles/operations.css";
+import "../styles/party-audit.css";
 
 
 /** occurred_at → 东八区「日期+时刻」两行(总则§10.2,⚠️ 不显 UTC 串);null ⇒ 「—」(时刻未知,⛔ 猜) */
 /** occurred_at → 东八区「日期+时刻」两行(总则§10.2,⚠️ 不显 UTC 串);null ⇒ 「—」(时刻未知,⛔ 猜) */
 function TimeCell({ at }: { at: string | null }) {
 function TimeCell({ at }: { at: string | null }) {
@@ -64,7 +65,7 @@ function TimeCell({ at }: { at: string | null }) {
   const timeText = new Intl.DateTimeFormat("zh-CN", { timeZone: "Asia/Shanghai", hour: "2-digit", minute: "2-digit", second: "2-digit", hour12: false }).format(date);
   const timeText = new Intl.DateTimeFormat("zh-CN", { timeZone: "Asia/Shanghai", hour: "2-digit", minute: "2-digit", second: "2-digit", hour12: false }).format(date);
   return (
   return (
     <>
     <>
-      {dateText}
+      <span className="audit-time-date">{dateText}</span>
       <br />
       <br />
       <small>{timeText}</small>
       <small>{timeText}</small>
     </>
     </>
@@ -78,7 +79,7 @@ function ActionCell({ action }: { action: string }) {
   if (display) return <>{display}</>;
   if (display) return <>{display}</>;
   return (
   return (
     <>
     <>
-      <span className="ops-mono">{action}</span>
+      <span className="ops-mono" title={action}>{action}</span>
       <br />
       <br />
       <small>{AUDIT_ACTION_UNREGISTERED}</small>
       <small>{AUDIT_ACTION_UNREGISTERED}</small>
     </>
     </>
@@ -90,31 +91,60 @@ function ActionCell({ action }: { action: string }) {
  * (`detail_json.object`/前后值区的白名单名称键)→ 都取不到才 W32;三种形态都并列「类型 · 主键」小字。
  * (`detail_json.object`/前后值区的白名单名称键)→ 都取不到才 W32;三种形态都并列「类型 · 主键」小字。
  * ⛔ 拿当前库里的名字顶替历史行(I38:改名会伪造流水),⛔ 留空。
  * ⛔ 拿当前库里的名字顶替历史行(I38:改名会伪造流水),⛔ 留空。
  */
  */
-function ObjectCell({ item }: { item: AuditItem }) {
+function ObjectCell({ item, compact }: { item: AuditItem; compact: boolean }) {
   const typeText = AUDIT_OBJECT_TYPE_DISPLAY[normalizeAuditObjectType(item.object.type)] ?? item.object.type;
   const typeText = AUDIT_OBJECT_TYPE_DISPLAY[normalizeAuditObjectType(item.object.type)] ?? item.object.type;
   const snapshot = auditObjectSnapshot(item);
   const snapshot = auditObjectSnapshot(item);
   return (
   return (
     <>
     <>
       {snapshot ? (
       {snapshot ? (
-        <span title={`对象名取自${snapshot.source}(事件当时的快照,不随后续改名变化)`}>{snapshot.text}</span>
+        <span className="audit-object-name" title={`${compact ? `${snapshot.text} · ` : ""}对象名取自${snapshot.source}(事件当时的快照,不随后续改名变化)`}>{snapshot.text}</span>
       ) : (
       ) : (
         W32
         W32
       )}
       )}
       <br />
       <br />
-      <small>
+      <small title={compact ? `${typeText} · ${item.object.id}` : undefined}>
         {typeText} · {item.object.id}
         {typeText} · {item.object.id}
       </small>
       </small>
     </>
     </>
   );
   );
 }
 }
 
 
-function ValueCell({ value }: { value: unknown }) {
+function AuditLines({ lines }: { lines: readonly string[] }) {
+  return lines.map((line, index) => <div key={index}>{line}</div>);
+}
+
+function CompactAuditValue({ value, extra = [] }: {
+  value: unknown;
+  extra?: readonly { label: string; lines: readonly string[] }[];
+}) {
+  const lines = formatAuditValue(value);
+  const blank = lines.length === 1 && (lines[0] === "—" || !lines[0]);
+  const expandable = extra.length > 0 || lines.length > 2 || lines.some((line) => line.length > 64 || line.includes("\n"));
+
+  if (!expandable) {
+    return blank ? <span className="table-placeholder">—</span> : <div className="party-audit-value"><AuditLines lines={lines} /></div>;
+  }
+
   return (
   return (
-    <>
-      {formatAuditValue(value).map((line, index) => (
-        <div key={index}>{line}</div>
-      ))}
-    </>
+    <details className="party-audit-disclosure">
+      <summary>
+        <span className="party-audit-preview" title={blank ? undefined : lines[0]}>{blank ? extra[0]?.label : lines[0]}</span>
+        <span className="party-audit-toggle">
+          <span className="party-audit-expand">展开</span>
+          <span className="party-audit-collapse">收起</span>
+          <ChevronDown size={13} aria-hidden="true" />
+        </span>
+      </summary>
+      <div className="party-audit-value">
+        {!blank && <AuditLines lines={lines} />}
+        {extra.map(({ label, lines: groupLines }) => (
+          <div className="party-audit-value-group" key={label}>
+            <small>{label}</small>
+            <AuditLines lines={groupLines} />
+          </div>
+        ))}
+      </div>
+    </details>
   );
   );
 }
 }
 
 
@@ -124,28 +154,31 @@ function ValueCell({ value }: { value: unknown }) {
  * 「分账号:」一行⛔ 受前后值区是否为空影响(D-76):订阅类流水前后值都有值,而 D-41 的额度
  * 「分账号:」一行⛔ 受前后值区是否为空影响(D-76):订阅类流水前后值都有值,而 D-41 的额度
  * 对齐结果只落在 `detail_json.sub_accounts`,一并短路=审计页读不到补建了哪几个号。
  * 对齐结果只落在 `detail_json.sub_accounts`,一并短路=审计页读不到补建了哪几个号。
  */
  */
-function AfterCell({ item }: { item: AuditItem }) {
+function AfterCell({ item, compact }: { item: AuditItem; compact: boolean }) {
   const detail = auditDetailLines(item);
   const detail = auditDetailLines(item);
   const seats = auditSeatLines(item);
   const seats = auditSeatLines(item);
+  if (compact) {
+    const extra = [
+      { label: "明细", lines: detail },
+      { label: "分账号", lines: seats },
+    ].filter(({ lines }) => lines.length > 0);
+    return <CompactAuditValue value={item.after} extra={extra} />;
+  }
   return (
   return (
     <>
     <>
-      <ValueCell value={item.after} />
+      <AuditLines lines={formatAuditValue(item.after)} />
       {detail.length > 0 && (
       {detail.length > 0 && (
         <>
         <>
           <br />
           <br />
           <small>明细:</small>
           <small>明细:</small>
-          {detail.map((line, index) => (
-            <div key={`detail-${index}`}>{line}</div>
-          ))}
+          <AuditLines lines={detail} />
         </>
         </>
       )}
       )}
       {seats.length > 0 && (
       {seats.length > 0 && (
         <>
         <>
           <br />
           <br />
           <small>分账号:</small>
           <small>分账号:</small>
-          {seats.map((line, index) => (
-            <div key={`seat-${index}`}>{line}</div>
-          ))}
+          <AuditLines lines={seats} />
         </>
         </>
       )}
       )}
     </>
     </>
@@ -216,7 +249,7 @@ function ExportDialog({ filter, onCancel, onDone }: { filter: AuditFilter; onCan
  * 运营侧标题「审计日志」并可导出;`partnerAcct`/`opAcct`/`teamLead` 由宿主路由传入
  * 运营侧标题「审计日志」并可导出;`partnerAcct`/`opAcct`/`teamLead` 由宿主路由传入
  * `pageTitle="本方变更记录"`,横幅与导出按钮都按身份自动收起(四类身份⛔ 渲染导出)。
  * `pageTitle="本方变更记录"`,横幅与导出按钮都按身份自动收起(四类身份⛔ 渲染导出)。
  */
  */
-export function AuditLogPage({ pageTitle = "审计日志" }: { pageTitle?: string } = {}) {
+export function AuditLogPage({ pageTitle = "审计日志", partyView = false }: { pageTitle?: string; partyView?: boolean } = {}) {
   const identity = useDemoIdentity();
   const identity = useDemoIdentity();
   const role = identity?.role;
   const role = identity?.role;
   const canExport = role === "admin" || role === "regAdmin"; // U-77:未放开身份不渲染按钮(⛔ 灰按钮)
   const canExport = role === "admin" || role === "regAdmin"; // U-77:未放开身份不渲染按钮(⛔ 灰按钮)
@@ -225,6 +258,8 @@ export function AuditLogPage({ pageTitle = "审计日志" }: { pageTitle?: strin
   const [filterError, setFilterError] = useState<string | null>(null);
   const [filterError, setFilterError] = useState<string | null>(null);
   const [exporting, setExporting] = useState(false);
   const [exporting, setExporting] = useState(false);
   const [notice, setNotice] = useState<string | null>(null);
   const [notice, setNotice] = useState<string | null>(null);
+  const hasFilter = Object.values(draft).some(Boolean) || Object.values(list.applied).some(Boolean);
+  const intro = partyView ? "按时间、操作人或业务对象查找本方的变更记录。" : "需要追查一笔操作时,可按时间、账号或业务对象查找记录。";
 
 
   const change = (key: keyof AuditFilter, value: string) => {
   const change = (key: keyof AuditFilter, value: string) => {
     setDraft((current) => ({ ...current, [key]: value }));
     setDraft((current) => ({ ...current, [key]: value }));
@@ -254,7 +289,7 @@ export function AuditLogPage({ pageTitle = "审计日志" }: { pageTitle?: strin
         <header className="ops-heading">
         <header className="ops-heading">
           <div>
           <div>
             <h1>{pageTitle}</h1>
             <h1>{pageTitle}</h1>
-            <PageIntro>需要追查一笔操作时,可按时间、账号或业务对象查找记录。</PageIntro>
+            <PageIntro>{intro}</PageIntro>
           </div>
           </div>
         </header>
         </header>
         <div className="ops-empty">
         <div className="ops-empty">
@@ -266,11 +301,11 @@ export function AuditLogPage({ pageTitle = "审计日志" }: { pageTitle?: strin
   }
   }
 
 
   return (
   return (
-    <section className="ops-page ops-page--audit page-fill">
+    <section className={partyView ? "ops-page ops-page--audit party-audit-page page-fill page-fill-window" : "ops-page ops-page--audit page-fill"}>
       <header className="ops-heading">
       <header className="ops-heading">
         <div>
         <div>
           <h1>{pageTitle}</h1>
           <h1>{pageTitle}</h1>
-          <PageIntro>需要追查一笔操作时,可按时间、账号或业务对象查找记录。</PageIntro>
+          <PageIntro>{intro}</PageIntro>
         </div>
         </div>
         {canExport && (
         {canExport && (
           <Button variant="outline" type="button" onClick={() => setExporting(true)}>
           <Button variant="outline" type="button" onClick={() => setExporting(true)}>
@@ -280,11 +315,16 @@ export function AuditLogPage({ pageTitle = "审计日志" }: { pageTitle?: strin
         )}
         )}
       </header>
       </header>
 
 
-      <ScopeBanners role={role} />
+      {partyView ? <aside className="party-audit-scope" aria-label="记录可见范围"><ScopeBanners role={role} /></aside> : <ScopeBanners role={role} />}
 
 
       <section className="ops-list-shell list-shell-fill" aria-label="操作记录">
       <section className="ops-list-shell list-shell-fill" aria-label="操作记录">
         {/* 检索区四件(契约 14.4.1):对象类型/主体定位(只接受 ID)/操作人(ID)/时间区间+关键字 */}
         {/* 检索区四件(契约 14.4.1):对象类型/主体定位(只接受 ID)/操作人(ID)/时间区间+关键字 */}
-        <div className="ops-toolbar flex-wrap">
+        <form className="ops-toolbar flex-wrap" aria-label="筛选操作记录" onSubmit={(event) => { event.preventDefault(); apply(); }}>
+          {partyView && <label className="ops-search party-audit-keyword">
+            <Search size={17} aria-hidden="true" />
+            <Input aria-label="关键字" placeholder="搜索变更记录" value={draft.keyword} onChange={(event) => change("keyword", event.target.value)} />
+          </label>}
+          {partyView && <DateRangeFilter label="时间范围" from={draft.from} to={draft.to} onChange={change} constrainRange />}
           <FilterSelect icon="type" aria-label="对象类型筛选" value={draft.objectType} onChange={(event) => change("objectType", event.target.value)}>
           <FilterSelect icon="type" aria-label="对象类型筛选" value={draft.objectType} onChange={(event) => change("objectType", event.target.value)}>
             <option value="">全部对象类型</option>
             <option value="">全部对象类型</option>
             {AUDIT_OBJECT_TYPES.map((type) => (
             {AUDIT_OBJECT_TYPES.map((type) => (
@@ -294,25 +334,25 @@ export function AuditLogPage({ pageTitle = "审计日志" }: { pageTitle?: strin
             ))}
             ))}
           </FilterSelect>
           </FilterSelect>
           <label className="ops-search">
           <label className="ops-search">
-            <Search size={17} />
-            <Input aria-label="主体定位(对象 ID)" placeholder="主体定位:对象 ID" value={draft.objectId} onChange={(event) => change("objectId", event.target.value)} />
+            {partyView ? <Fingerprint size={17} aria-hidden="true" /> : <Search size={17} />}
+            <Input aria-label="主体定位(对象 ID)" placeholder={partyView ? "对象 ID" : "主体定位:对象 ID"} value={draft.objectId} onChange={(event) => change("objectId", event.target.value)} />
           </label>
           </label>
           <label className="ops-search">
           <label className="ops-search">
-            <Search size={17} />
+            {partyView ? <UserRound size={17} aria-hidden="true" /> : <Search size={17} />}
             <Input aria-label="操作人(账号 ID)" placeholder="操作人:账号 ID" value={draft.actorId} onChange={(event) => change("actorId", event.target.value)} />
             <Input aria-label="操作人(账号 ID)" placeholder="操作人:账号 ID" value={draft.actorId} onChange={(event) => change("actorId", event.target.value)} />
           </label>
           </label>
-          <DateRangeFilter label="时间范围" from={draft.from} to={draft.to} onChange={change} constrainRange />
-          <label className="ops-search">
+          {!partyView && <DateRangeFilter label="时间范围" from={draft.from} to={draft.to} onChange={change} constrainRange />}
+          {!partyView && <label className="ops-search">
             <Search size={17} />
             <Search size={17} />
             <Input aria-label="关键字" placeholder="关键字" value={draft.keyword} onChange={(event) => change("keyword", event.target.value)} />
             <Input aria-label="关键字" placeholder="关键字" value={draft.keyword} onChange={(event) => change("keyword", event.target.value)} />
-          </label>
-          <Button type="button" size="sm" onClick={apply}>
+          </label>}
+          <Button type="submit" size="sm">
             查询
             查询
           </Button>
           </Button>
-          <Button type="button" size="sm" variant="ghost" onClick={reset}>
+          {(!partyView || hasFilter) && <Button type="button" size="sm" variant="ghost" onClick={reset}>
             重置筛选
             重置筛选
-          </Button>
-        </div>
+          </Button>}
+        </form>
         {filterError && (
         {filterError && (
           <p className="ops-form-error" role="alert">
           <p className="ops-form-error" role="alert">
             {filterError}
             {filterError}
@@ -329,12 +369,12 @@ export function AuditLogPage({ pageTitle = "审计日志" }: { pageTitle?: strin
         )}
         )}
 
 
         <div className="measured-table-scroll ops-table-wrap" role="region" aria-label={`${pageTitle},可横向滚动查看字段`} tabIndex={0}>
         <div className="measured-table-scroll ops-table-wrap" role="region" aria-label={`${pageTitle},可横向滚动查看字段`} tabIndex={0}>
-          <table className="ops-table">
-            <OpsTableColumns widths={[11, 11, 13, 18, 22, 25]} />
+          <table className={partyView ? "ops-table party-audit-table" : "ops-table"} aria-busy={partyView ? list.phase.kind === "loading" || list.loadingMore : undefined}>
+            <OpsTableColumns widths={partyView ? [11, 13, 14, 18, 22, 22] : [11, 11, 13, 18, 22, 25]} />
             <thead>
             <thead>
               <tr>
               <tr>
                 {W31_COLUMNS.map((column) => (
                 {W31_COLUMNS.map((column) => (
-                  <th key={column}>{column}</th>
+                  <th key={column} scope="col">{column}</th>
                 ))}
                 ))}
               </tr>
               </tr>
             </thead>
             </thead>
@@ -344,18 +384,18 @@ export function AuditLogPage({ pageTitle = "审计日志" }: { pageTitle?: strin
                   <td>
                   <td>
                     <TimeCell at={item.occurred_at} />
                     <TimeCell at={item.occurred_at} />
                   </td>
                   </td>
-                  <td>{item.actor.username ?? item.actor.user_id ?? <span className="table-placeholder">—</span>}</td>
+                  <td title={partyView ? item.actor.username ?? item.actor.user_id ?? undefined : undefined}>{item.actor.username ?? item.actor.user_id ?? <span className="table-placeholder">—</span>}</td>
                   <td>
                   <td>
                     <ActionCell action={item.action} />
                     <ActionCell action={item.action} />
                   </td>
                   </td>
                   <td>
                   <td>
-                    <ObjectCell item={item} />
+                    <ObjectCell item={item} compact={partyView} />
                   </td>
                   </td>
                   <td>
                   <td>
-                    <ValueCell value={item.before} />
+                    {partyView ? <CompactAuditValue value={item.before} /> : <AuditLines lines={formatAuditValue(item.before)} />}
                   </td>
                   </td>
                   <td>
                   <td>
-                    <AfterCell item={item} />
+                    <AfterCell item={item} compact={partyView} />
                   </td>
                   </td>
                 </tr>
                 </tr>
               ))}
               ))}

+ 96 - 0
web-scaffold/src/styles/party-audit.css

@@ -0,0 +1,96 @@
+.party-audit-page.ops-page--audit .ops-heading { margin-bottom: 12px; }
+
+.party-audit-scope {
+  display: flex;
+  flex-wrap: wrap;
+  align-items: baseline;
+  gap: 4px 18px;
+  margin-bottom: 12px;
+  padding: 9px 16px;
+  border: 1px solid var(--border);
+  border-radius: var(--radius-control);
+  background: var(--surface-subtle);
+}
+.party-audit-scope:empty { display: none; }
+.party-audit-scope .ops-import-note { font-size: var(--type-meta); }
+.party-audit-scope .ops-import-note:first-child { color: var(--text-secondary); font-weight: 500; }
+
+.party-audit-page .ops-toolbar { flex: none; }
+.party-audit-page .ops-toolbar > .ops-search { flex: 1 1 120px; }
+.party-audit-page .ops-toolbar > .party-audit-keyword { flex-basis: 150px; }
+.party-audit-page .ops-list-shell > .ops-form-error { margin: 0 24px 12px; }
+.party-audit-page .ops-table-wrap:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
+.party-audit-page .ops-list-footer { justify-content: flex-end; }
+
+.party-audit-table.ops-table {
+  min-width: 950px;
+  table-layout: fixed;
+  border-collapse: separate;
+  border-spacing: 0;
+}
+.party-audit-table.ops-table td { padding-block: 11px; vertical-align: top; }
+.party-audit-table tbody tr:is(:hover, :focus-within) td { background: var(--surface-subtle); }
+.party-audit-table td:nth-child(2),
+.party-audit-table td:nth-child(3) > span,
+.party-audit-table .audit-object-name,
+.party-audit-table td:nth-child(4) > small,
+.party-audit-preview {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.party-audit-table td:nth-child(3) > span,
+.party-audit-table .audit-object-name,
+.party-audit-table td > small { display: block; }
+.party-audit-table td > br { display: none; }
+.party-audit-table td > small {
+  margin-top: 3px;
+  color: var(--muted-foreground);
+  font-size: var(--type-meta);
+}
+.party-audit-table td:nth-child(3),
+.party-audit-table .audit-object-name { color: var(--text-secondary); font-weight: 500; }
+.party-audit-table .audit-time-date { font-variant-numeric: tabular-nums; }
+.party-audit-table .party-audit-value {
+  color: var(--text-secondary);
+  line-height: 1.5;
+  overflow-wrap: anywhere;
+  white-space: pre-wrap;
+}
+.party-audit-value-group + .party-audit-value-group { margin-top: 6px; }
+.party-audit-value-group > small { color: var(--muted-foreground); font-size: var(--type-meta); }
+.party-audit-disclosure > summary {
+  display: flex;
+  align-items: baseline;
+  gap: 6px;
+  min-width: 0;
+  cursor: pointer;
+  list-style: none;
+}
+.party-audit-disclosure > summary::-webkit-details-marker { display: none; }
+.party-audit-disclosure > summary:focus-visible { outline: 2px solid var(--ring); border-radius: 3px; }
+.party-audit-toggle {
+  display: inline-flex;
+  flex: none;
+  align-items: center;
+  gap: 3px;
+  color: var(--primary);
+  font-size: var(--type-meta);
+  font-weight: 500;
+}
+.party-audit-disclosure:not([open]) .party-audit-collapse,
+.party-audit-disclosure[open] :is(.party-audit-preview, .party-audit-expand) { display: none; }
+.party-audit-disclosure[open] .party-audit-toggle svg { transform: rotate(180deg); }
+.party-audit-disclosure[open] > .party-audit-value { margin-top: 5px; }
+
+@media (min-width: 701px) {
+  .party-audit-page .date-range-filter {
+    grid-template-columns: auto minmax(0, 102px) auto minmax(0, 102px);
+  }
+}
+
+@media (max-width: 599px) {
+  .party-audit-page .ops-toolbar > .ops-search { max-width: none; }
+  .party-audit-page .ops-toolbar > .party-audit-keyword { flex-basis: 100%; }
+  .party-audit-page .ops-list-shell > .ops-form-error { margin-inline: 18px; }
+}