/* INPLUG.TRACKING — страницы аудита Revit (tracking/audit.js). Цвета — из токенов styles.css. */
:root { --au-prep: #d5dcd8; --au-ok-bg: #e3f1d2; --au-ok-fg: #3f6212; --au-blue-bg: #e0ecff; --au-blue-fg: #1e3a8a; --au-bad-bg: #fee2e2; --au-bad-fg: #7f1d1d; --au-amber-bg: #fef3c7; --au-amber-fg: #78350f; --au-note-bg: #f3f9e8; --au-note-line: #d6ebb0; --au-warn-bg: #fffbeb; --au-warn-line: #fde68a; }
:root[data-theme="dark"] { --au-prep: #3a423e; --au-ok-bg: #22351a; --au-ok-fg: #bdf553; --au-blue-bg: #1c2a44; --au-blue-fg: #a9c6ff; --au-bad-bg: #3d1f1f; --au-bad-fg: #ffb8b8; --au-amber-bg: #3a2e12; --au-amber-fg: #fcd683; --au-note-bg: #1b2414; --au-note-line: #33461f; --au-warn-bg: #2b2412; --au-warn-line: #5a4a1a; }

.au-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.au-kpi span { font-size: 13px; color: var(--muted); font-weight: 600; }
.au-kpi strong { display: block; font-family: var(--font-display); font-size: 28px; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.au-kpi small { color: var(--muted); font-size: 13px; }
.content .card + .card, .au-cols, .au-toolbar + .card, .au-note + .card, .au-note + .au-toolbar, .au-toolbar + .au-note { margin-top: 16px; }
.au-cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.au-wide { flex: 3 1 560px; min-width: 0; }
.au-narrow { flex: 2 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.au-cols .card { margin-top: 0; }
.au-hd { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.au-hd h3 { margin: 0; }
.au-pad { padding: 18px 20px 0; }
.au-flush { padding: 0 0 6px; overflow: hidden; }
.au-flush .au-tbl th:first-child, .au-flush .au-tbl td:first-child { padding-left: 20px; }
.au-flush .au-tbl th:last-child, .au-flush .au-tbl td:last-child { padding-right: 20px; }
.au-muted { color: var(--muted); font-size: 14px; }
.au-small { font-size: 13px; }
.au-lead { font-size: 16px; max-width: 80ch; margin: 0 0 16px; }
.au-strip { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.au-strip b { color: var(--text); }
.au-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.au-toolbar .au-strip { margin: 0; flex: 1 1 auto; }
.au-field { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.au-field select, .au-ep-row select, .au-rule select, .au-tbl select { height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--control); color: var(--text); padding: 0 8px; font: inherit; font-size: 14px; }
.au-scroll { overflow-x: auto; }
.au-tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.au-tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.au-tbl td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; white-space: nowrap; }
.au-tbl th.r, .au-tbl td.r { text-align: right; }
.au-tbl td.wrap { white-space: normal; }
.au-tbl td small { display: block; color: var(--muted); font-size: 12px; }
.au-tbl tr:last-child td { border-bottom: 0; }
.au-tbl a { color: inherit; text-decoration: none; }
.au-tbl a:hover b { text-decoration: underline; }
.au-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text); white-space: nowrap; }
.au-pill.ok { background: var(--au-ok-bg); color: var(--au-ok-fg); }
.au-pill.blue { background: var(--au-blue-bg); color: var(--au-blue-fg); }
.au-pill.bad { background: var(--au-bad-bg); color: var(--au-bad-fg); }
.au-pill.amber { background: var(--au-amber-bg); color: var(--au-amber-fg); }
.au-pill.star { background: var(--text); color: var(--accent); }
.au-pill.ghost { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.au-sw { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.au-ok { color: var(--au-ok-fg); font-weight: 600; }
.au-warn { color: var(--au-amber-fg); font-weight: 700; }
.au-who { display: inline-flex; align-items: center; gap: 8px; }
.au-av { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.au-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.au-bar i { display: block; height: 100%; }
.au-bar--big { height: 22px; border-radius: 8px; }
.au-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin-top: 10px; }
.au-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.au-hd .au-legend { margin: 0; }
.au-note { display: flex; gap: 10px; align-items: flex-start; border-radius: 10px; padding: 10px 12px; font-size: 14px; background: var(--surface-2); border: 1px solid var(--line-soft); }
.au-note.ok { background: var(--au-note-bg); border-color: var(--au-note-line); }
.au-note.warn { background: var(--au-warn-bg); border-color: var(--au-warn-line); color: var(--au-amber-fg); }
.au-note svg { flex: none; margin-top: 1px; }
.au-tl { position: relative; height: 34px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.au-tl i { position: absolute; top: 0; bottom: 0; }
.au-ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.au-ep { display: grid; grid-template-columns: 48px 6px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.au-ep time { font-variant-numeric: tabular-nums; color: var(--muted); padding-top: 8px; font-size: 14px; }
.au-ep-sw { align-self: stretch; border-radius: 3px; }
.au-ep-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.au-ep-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13px; }
.au-ep .au-pill { margin-top: 8px; }
.au-goal { font: inherit; font-weight: 600; font-size: 15px; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; margin-left: -8px; background: transparent; color: var(--text); width: 100%; box-sizing: border-box; }
.au-goal:hover:not(:disabled) { border-color: var(--line-soft); }
.au-goal:focus { outline: none; border-color: var(--accent); background: var(--control); }
.au-goal--big { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.au-ask { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--au-warn-bg); border-radius: 8px; padding: 8px 10px; color: var(--au-amber-fg); font-size: 13px; margin-top: 10px; }
.au-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.au-chip { font: inherit; font-size: 13px; font-weight: 600; min-height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--control); color: var(--text); cursor: pointer; }
.au-chip.on { background: var(--au-ok-bg); border-color: var(--accent); color: var(--au-ok-fg); }
.au-cmp { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.au-cmp:last-child { border-bottom: 0; }
.au-cmp small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.au-hint { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.au-sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.au-cell { display: inline-block; min-width: 56px; text-align: center; padding: 3px 8px; border-radius: 6px; }
.au-cell.f { background: var(--au-ok-bg); color: var(--au-ok-fg); }
.au-cell.m { background: var(--surface-2); }
.au-cell.s { background: var(--au-bad-bg); color: var(--au-bad-fg); }
.au-cell.n { color: var(--muted); font-size: 12px; }
.au-rel { position: relative; height: 8px; border-radius: 999px; background: var(--surface-2); min-width: 120px; }
.au-rel b { position: absolute; top: 0; height: 8px; border-radius: 999px; }
.au-rel i { position: absolute; left: 50%; top: -3px; width: 3px; height: 14px; background: var(--text); border-radius: 2px; }
.au-crumbs { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.au-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.au-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; }
.au-rule .au-actions { margin-top: 0; }
.au-steps { list-style: none; margin: 0; padding: 0; }
.au-steps li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.au-steps li:last-child { border-bottom: 0; }
.au-steps time { color: var(--muted); font-variant-numeric: tabular-nums; }
.au-steps small { display: block; color: var(--muted); font-size: 13px; }
.au-was { color: var(--au-bad-fg); text-decoration: line-through; }
.au-now { color: var(--au-ok-fg); font-weight: 600; }
.au-code { background: #111815; color: #d8e4dc; border-radius: 12px; padding: 14px 16px; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre; margin: 0; }
.au-kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 7px 14px; font-size: 14px; margin: 0; }
.au-kv dt { color: var(--muted); }
.au-kv dd { margin: 0; }
.au-chk { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.au-chk li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; }
.au-chk small { display: block; color: var(--muted); font-size: 12px; }
.au-list { list-style: none; margin: 0; padding: 0; }
.au-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.au-list li:last-child { border-bottom: 0; }
.au-rule { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.au-rule small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.au-meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; min-width: 100px; display: block; }
.au-meter i { display: block; height: 100%; background: var(--accent-hover); border-radius: 999px; }
.au-meter--w { flex: 0 0 180px; }
.au-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.au-flow div { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.au-flow em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--au-ok-fg); text-transform: uppercase; letter-spacing: 0.06em; }
.au-flow span { color: var(--muted); font-size: 13px; }
.au-form { display: grid; gap: 10px; }
.au-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.au-form input, .au-form select { height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--control); color: var(--text); padding: 0 10px; font: inherit; }
.au-form input[type="file"] { padding: 6px; }
.au-form--row { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) {
  .au-ep { grid-template-columns: 40px 4px minmax(0, 1fr); }
  .au-ep > .au-pill { grid-column: 3; justify-self: start; margin-top: 0; }
  .au-rule { grid-template-columns: 1fr; }
  .au-rule .au-actions { justify-content: flex-start; }
}
.seg-tabs a { display: inline-flex; align-items: center; color: var(--muted); min-height: 34px; padding: 0 12px; border-radius: 8px; font-weight: var(--weight-label); text-decoration: none; white-space: nowrap; }
.seg-tabs a.is-active { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line-soft); }
.au-toolbar .seg-tabs { flex-wrap: wrap; }
.au-list li > span:first-child { flex: 1 1 auto; }
.au-status { padding: 14px 18px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.au-status div { display: flex; flex-direction: column; gap: 2px; }
.au-status span { color: var(--muted); font-size: 14px; }
.au-status.on { box-shadow: inset 4px 0 0 var(--accent-hover); }
.au-status.off { box-shadow: inset 4px 0 0 var(--warning); }
.au-consent-text { max-width: 80ch; font-size: 15px; }
.au-consent-text h4 { margin: 16px 0 6px; font-size: 15px; }
.au-bullets { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.au-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
.au-link:hover { text-decoration: underline; }
.au-recorders { margin-bottom: 16px; }
.au-check { display: flex !important; flex-direction: row; align-items: center; gap: 8px; }
.au-check input { height: auto; }
.au-quote { font-style: italic; color: var(--text) !important; opacity: 0.8; }
