/* Audit and security */
.m-audit .tca-tabs { margin: 32px 0 26px; }
.m-audit .tca-rib .stat-v.tca-ok { color: var(--ok); }
.m-audit .tca-gap { margin-top: 40px; }
.m-audit .tca-sec { margin-top: 36px; }
.m-audit .tca-card { padding: 16px 20px 14px; }
.m-audit .tca-ch { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.m-audit .tca-ch h3 { font-size: 14px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.m-audit .tca-ch p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-3); max-width: 520px; }
.m-audit .tca-peak { text-align: right; flex: none; }
.m-audit .tca-peak b { display: block; font-size: 22px; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.m-audit .tca-peak span { font-size: 12px; color: var(--ink-3); }
.m-audit .tca-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.m-audit .tca-kinds { list-style: none; margin: 4px 0 0; padding: 0; }
.m-audit .tca-kinds li { display: grid; grid-template-columns: 104px minmax(0, 1fr) 64px; align-items: center; gap: 12px; padding: 7px 0; font-size: 12.5px; }
.m-audit .tca-kinds .l { color: var(--ink-2); white-space: nowrap; }
.m-audit .tca-kinds .meter { height: 6px; }
.m-audit .tca-kinds b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }

/* trail */
.m-audit .tca-chips { display: flex; gap: 6px; margin: 0 0 12px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.m-audit .tca-chips::-webkit-scrollbar { display: none; }
.m-audit .tca-chips button { flex: none; display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 12.5px; height: 30px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-2); border-radius: 999px; padding: 0 12px; cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.m-audit .tca-chips button b { font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 11.5px; }
.m-audit .tca-chips button:hover { border-color: var(--ink-4); color: var(--ink); }
.m-audit .tca-chips button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.m-audit .tca-chips button.on b { color: rgba(255,255,255,.7); }
.m-audit .tca-tb { gap: 8px; margin-bottom: 10px; }
.m-audit .tca-tb select.inp { height: 32px; font-size: 12.5px; max-width: 220px; }
.m-audit .tca-q { position: relative; display: inline-flex; align-items: center; flex: 0 1 280px; min-width: 0; }
.m-audit .tca-q .ic { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--ink-3); pointer-events: none; }
.m-audit .tca-q input.inp { height: 32px; width: 100%; padding-left: 32px; font-size: 12.5px; }
.m-audit .tca-cnt { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-audit .tbl td { padding-top: 10px; padding-bottom: 10px; }
.m-audit .tca-nw { white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.m-audit .tca-who { display: block; white-space: nowrap; }
.m-audit .tca-who small { display: block; color: var(--ink-3); font-size: 11.5px; }
.m-audit .tca-tx { display: block; min-width: 280px; max-width: 460px; }
.m-audit .tca-tx .tag { margin-left: 4px; color: var(--tc); border-color: var(--tc-line); }
.m-audit code { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.m-audit .tca-id { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 11.5px; white-space: nowrap; }
.m-audit .tbl .status { font-size: 12.5px; }
.m-audit .tca-chain { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.m-audit .tca-chain .ic { width: 15px; height: 15px; color: var(--ok-dot); margin-top: 1px; }

/* security posture */
.m-audit .tca-pos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.m-audit .tca-pc { padding: 20px 22px 18px; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); min-width: 0; }
.m-audit .tca-pc .hd { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.m-audit .tca-pc .bx { width: 32px; height: 32px; border-radius: 9px; background: var(--panel-2); color: var(--ink); display: grid; place-items: center; flex: none; }
.m-audit .tca-pc .bx .ic { width: 16px; height: 16px; }
.m-audit .tca-pc h3 { font-size: 13.5px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.m-audit .tca-pc small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 1px; }
.m-audit .tca-pc .hd .status { margin-left: auto; font-size: 12px; }
.m-audit .tca-pc ul { list-style: none; margin: 0; padding: 0; }
.m-audit .tca-pc li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; font-size: 12.5px; color: var(--ink-2); padding: 5px 0; line-height: 1.45; }
.m-audit .tca-pc li .ic { width: 13px; height: 13px; color: var(--ok-dot); margin-top: 3px; stroke-width: 2.2; }

/* security events timeline */
.m-audit .tca-tl { list-style: none; margin: 0; padding: 0; }
.m-audit .tca-tl li { position: relative; display: grid; grid-template-columns: 92px 14px minmax(0, 1fr) auto; column-gap: 14px; align-items: start; padding: 12px 0; }
.m-audit .tca-tl li + li { border-top: 1px solid var(--line); }
.m-audit .tca-tl time { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: 2px; white-space: nowrap; }
.m-audit .tca-tl .pin { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; background: var(--ink-4); box-shadow: 0 0 0 3px var(--panel), 0 0 0 4px var(--line-2); }
.m-audit .tca-tl li.bad .pin { background: var(--bad-dot); }
.m-audit .tca-tl li.warn .pin { background: var(--warn-dot); }
.m-audit .tca-tl li.info .pin { background: var(--info-dot); }
.m-audit .tca-tl li.ok .pin { background: var(--ok-dot); }
.m-audit .tca-tl .t1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.m-audit .tca-tl .t1 b { font-weight: 500; font-size: 13px; }
.m-audit .tca-tl .t1 .status { font-size: 12px; }
.m-audit .tca-tl p { margin: 3px 0 0; font-size: 12px; color: var(--ink-3); }
.m-audit .tca-tl .out { font-size: 12px; color: var(--ink-2); white-space: nowrap; padding-top: 2px; }

/* compliance */
.m-audit .tca-fws { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 16px; }
.m-audit .tca-fwc { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); min-width: 0; }
.m-audit .tca-fwc .nm { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.m-audit .tca-fwc .pc { font-size: 28px; font-weight: 500; letter-spacing: -.035em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.m-audit .tca-fwc .status { font-size: 12px; }
.m-audit .tca-fw { font-weight: 500; white-space: nowrap; }
.m-audit .tca-bar { display: inline-flex; align-items: center; gap: 10px; min-width: 150px; white-space: nowrap; }
.m-audit .tca-bar .meter { flex: 1; min-width: 70px; }
.m-audit .tca-bar b { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* drawer */
.tca-dr .tca-diff { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tca-dr .tca-diff > div { position: relative; padding: 12px 16px 12px 18px; font-size: 13px; }
.tca-dr .tca-diff > div::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.tca-dr .tca-diff .b { background: #FFFAF9; color: var(--ink-2); }
.tca-dr .tca-diff .b::before { background: var(--bad-dot); }
.tca-dr .tca-diff .b span { text-decoration: line-through; text-decoration-color: rgba(229,72,77,.45); }
.tca-dr .tca-diff .a { background: #F7FCFA; border-top: 1px solid var(--line); color: var(--ink); }
.tca-dr .tca-diff .a::before { background: var(--ok-dot); }
.tca-dr .tca-diff small { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-3); margin-bottom: 3px; }
.tca-dr .kvl { font-size: 13px; }
.tca-dr .kvl dd { overflow-wrap: anywhere; }
.tca-dr code { font-size: 11.5px; }
.tca-dr .tca-fwm { margin: 12px 0 16px; }

@media (max-width: 1180px) {
  .m-audit .tca-pos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-audit .tca-fws { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .m-audit .tca-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .m-audit .tca-card { padding: 12px 14px; }
  .m-audit .tca-q { flex: 1 1 100%; }
  .m-audit .tca-tb select.inp { flex: 1 1 150px; max-width: none; }
  .m-audit .tca-tb .grow { display: none; }
  .m-audit .tca-pos { grid-template-columns: minmax(0, 1fr); }
  .m-audit .tca-fws { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-audit .tca-ch { flex-direction: column; }
  .m-audit .tca-peak { text-align: left; }
  .m-audit .tca-kinds li { grid-template-columns: 92px minmax(0, 1fr) 56px; }
  .m-audit .tca-tl li { grid-template-columns: 14px minmax(0, 1fr); row-gap: 2px; }
  .m-audit .tca-tl time { grid-column: 2; grid-row: 1; }
  .m-audit .tca-tl .pin { grid-column: 1; grid-row: 1 / 4; }
  .m-audit .tca-tl li > div { grid-column: 2; }
  .m-audit .tca-tl .out { grid-column: 2; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .m-audit .tca-chips button { transition: none; } }
.m-audit .tca-tl .sev { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.m-audit .tca-tl .sev.bad { color: var(--bad); }
.m-audit .tca-tl .sev.warn { color: var(--warn); }
.m-audit .tca-tl .sev.info { color: var(--info); }
.m-audit .tca-tl .sev.ok { color: var(--ok); }
.tca-dr .tca-evt { margin: 0 0 6px; font-size: 15px; line-height: 1.5; color: var(--ink); font-weight: 500; letter-spacing: -.01em; }

/* ===================== V2 visuals ===================== */
.m-audit .tca-ch .row { gap: 14px; align-items: center; }
.m-audit .tca-clock { display: grid; place-items: center; padding: 4px 0 2px; }
.m-audit .tca-clock .vz { width: 100%; max-width: 360px; }
.m-audit .tca-waf, .m-audit .tca-ewaf { display: flex; justify-content: center; }
.m-audit .tca-waf .vz-waffle, .m-audit .tca-ewaf .vz-waffle { width: 100%; }
.m-audit .tca-top { align-items: stretch; }
.m-audit .tca-swn { margin: 8px 0 0; font-size: 12px; color: var(--ink-3); }
.m-audit #tca-sw { min-height: 120px; }
/* rosette */
.m-audit .tca-posw { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.m-audit .tca-rose { position: sticky; top: 84px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.tca-rose .halo { fill: none; stroke: var(--line); stroke-dasharray: 2 5; }
.tca-rose .pt { fill: #EAF6F0; stroke: #fff; stroke-width: 2; transition: fill var(--dur-1, 150ms); }
.tca-rose .mk:hover .pt, .tca-rose .mk:focus-visible .pt { fill: #C9EBDB; }
.tca-rose .mk:focus-visible .pt { stroke: var(--ink); stroke-width: 2.5; }
.tca-rose .ic { color: var(--ok); }
.tca-rose .core { fill: var(--panel); stroke: var(--ok-dot); stroke-width: 2; }
.tca-rose > svg > .ic { color: var(--ok); }
.tca-rose .cv { font-size: 15px; font-weight: 600; fill: var(--ink); }
.tca-rose .cl { font-size: 11px; fill: var(--ink-3); }
.m-audit .tca-pos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.m-audit .tca-pc.flash { animation: tca-flash 400ms var(--ease-out, ease); }
@keyframes tca-flash { 0% { background: var(--ok-bg); } 100% { background: transparent; } }
.m-audit .tca-evl { margin-top: 12px; }
/* compliance rings */
.m-audit .tca-fws { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; background: none; border: 0; border-radius: 0; overflow: visible; }
.m-audit .tca-fwr { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; text-align: center; }
.m-audit .tca-fwr > b { font-size: 13px; font-weight: 600; }
.m-audit .tca-fwr .status { font-size: 12px; }
.m-audit .tca-fwr:focus-visible { outline: 2px solid var(--tc); outline-offset: 2px; }
.m-audit .tca-fwr .vz { margin: 0; }
@media (max-width: 1180px) { .m-audit .tca-posw { grid-template-columns: minmax(0, 1fr); } .m-audit .tca-rose { position: static; max-width: 340px; margin: 0 auto; } .m-audit .tca-fws { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .m-audit .tca-pos { grid-template-columns: minmax(0, 1fr); } .m-audit .tca-fws { grid-template-columns: repeat(2, minmax(0, 1fr)); } .m-audit .tca-ewaf { overflow-x: auto; justify-content: flex-start; position: relative; } }
.m-audit .tca-ch { flex-wrap: wrap; }
.m-audit .tca-ch > div:first-child { flex: 1 1 260px; min-width: 0; }
.m-audit .tca-ch .row { flex-wrap: wrap; }
.m-audit .tca-peak { text-align: left; }
.m-audit .tca-ew { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; align-items: center; width: 100%; }
.m-audit .tca-ew svg { max-width: 600px; }
.m-audit .tca-ew .pend { stroke-width: 1.5; }
.m-audit .tca-ewl { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.m-audit .tca-ewl > a, .m-audit .tca-ewl > span { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 5px 6px; margin: 0 -6px; border-radius: 7px; font-size: 12.5px; color: var(--ink-2); text-decoration: none; }
.m-audit .tca-ewl > a:hover, .m-audit .tca-ewl > a:focus-visible { background: var(--panel-2); color: var(--ink); }
.m-audit .tca-ewl i { width: 10px; height: 10px; border-radius: 3px; }
.m-audit .tca-ewl .pend i { background: #fff; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.m-audit .tca-ewl b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .m-audit .tca-ew { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .m-audit .tca-ch > div:first-child { flex: 0 0 auto; } }
/* kind x hour grid */
.m-audit .tca-hm { display: grid; gap: 3px; overflow-x: auto; padding-bottom: 4px; position: relative; }
.m-audit .tca-hm-r { display: grid; grid-template-columns: 150px repeat(13, minmax(54px, 1fr)) 70px; gap: 3px; align-items: center; min-width: 900px; }
.m-audit .tca-hm-x span { font-size: 11.5px; color: var(--ink-3); text-align: center; }
.m-audit .tca-hm-k { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.m-audit .tca-hm-k i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.m-audit .tca-hm-ws .tca-hm-k i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--tc); }
.m-audit .tca-hm-r > b { text-align: right; font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.m-audit .tca-hm-c { all: unset; box-sizing: border-box; display: grid; place-items: center; width: 100%; height: 30px; border-radius: 7px; font-size: 11.5px; font-variant-numeric: tabular-nums; cursor: pointer; color: var(--ink); background: color-mix(in srgb, var(--c) calc(var(--a) * 100%), #fff); transition: transform var(--dur-1, 150ms) var(--ease-out, ease), box-shadow var(--dur-1, 150ms); }
.m-audit .tca-hm-c:hover { transform: scale(1.06); box-shadow: 0 4px 12px -6px rgba(11,15,25,.3); }
.m-audit .tca-hm-c:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.m-audit .tca-hm-c.ws { background: var(--panel); box-shadow: inset 0 0 0 1.5px var(--tc); color: var(--tc); font-weight: 600; }
.m-audit .tca-hm-z { display: grid; place-items: center; height: 30px; color: var(--ink-4); font-size: 11.5px; }
.m-audit .tca-hbars { padding-top: 6px; }
.m-audit .tca-hm-c.dk { color: #fff; }
.m-audit .tca-kw { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; width: 100%; }
.m-audit .tca-kw svg { max-width: 430px; }
.m-audit .tca-ewl > .tca-kb { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 5px 6px; margin: 0 -6px; border-radius: 7px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.m-audit .tca-ewl > .tca-kb:hover, .m-audit .tca-ewl > .tca-kb:focus-visible { background: var(--panel-2); color: var(--ink); }
.m-audit .tca-ewl > .tca-kb:focus-visible { outline: 2px solid var(--tc); }
.m-audit .tca-ewl > .tca-kb b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.m-audit .tca-ewl > .tca-kb i { width: 10px; height: 10px; border-radius: 3px; }
.m-audit .tca-hm-r > :first-child { position: sticky; left: 0; z-index: 1; background: var(--panel); }
@media (max-width: 600px) { .m-audit .tca-hm-r { grid-template-columns: 112px repeat(13, 50px) 56px; min-width: 0; } .m-audit .tca-hm-k { font-size: 12px; } }
.m-audit .tca-scope { margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.m-audit .tca-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 2px 2px; }
.m-audit .tca-pager .pg-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.m-audit .tca-jump { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.m-audit .tca-jump input { width: 72px; height: 32px; padding: 0 8px; text-align: center; font-variant-numeric: tabular-nums; }
.m-audit .tca-jmsg { font-size: 12px; color: var(--ink-3); }
