@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/manrope.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
:root {
  color-scheme: light;
  --frame: #f7f8fc;
  --surface: #ffffff;
  --raised: #f5f3fa;
  --ink: #19151f;
  --muted: #696575;
  --faint: #797382;
  --line: #e9e7ef;
  --accent: #9419f8;
  --accent-dark: #7711cb;
  --accent-soft: #f3eaff;
  --positive: #21725a;
  --positive-bg: #eaf6ef;
  --negative: #ad4149;
  --negative-bg: #fceff0;
  --warning: #895d1c;
  --warning-bg: #fff6e6;
  --blue: #3d648e;
  --blue-bg: #edf3fb;
  --radius: 14px;
  --gap: 24px;
  --font: "Manrope", system-ui, sans-serif;
  --nav-width: 248px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--frame);
  font: 400 14px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  outline: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
::selection {
  background: #e5ccff;
  color: #441071;
}
input,
textarea {
  caret-color: var(--accent);
}
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-thumb {
  background: #d1c8dc;
  border-radius: 8px;
}
::-webkit-scrollbar-track {
  background: var(--frame);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -0.9px;
  line-height: 1.3;
  text-wrap: balance;
}
h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.35px;
  line-height: 1.5;
}
h3 {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.5;
}
small,
.small {
  font-size: 13px;
}
.muted {
  color: var(--muted);
}
.num {
  font-variant-numeric: tabular-nums;
}
.icon {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.65;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  vertical-align: middle;
}
.plain {
  border: 0;
  background: none;
  padding: 0;
}
.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.icon-button:hover {
  background: var(--raised);
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 100;
  background: var(--ink);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}
/* One shared grid: a 248px navigation column and a fluid canvas; all panels use 24px gutters. */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--nav-width);
  padding: 26px 18px 20px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.brand {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-height: 93px;
  margin: 0 13px 16px;
}
.brand img {
  display: block;
  width: 182px;
  height: 112px;
  margin: -10px 0 -10px -18px;
  object-fit: contain;
}
.brand-product {
  margin: 0 13px 22px;
}
.brand-product strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.6px;
}
.brand-product strong .icon {
  color: var(--accent);
  width: 20px;
  height: 20px;
}
.brand-product p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}
.workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
  padding: 12px;
  background: var(--frame);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
}
.workspace small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
  margin-top: 2px;
}
.workspace-monogram {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #ded9e7;
  border-radius: 8px;
  background: var(--surface);
  font-size: 18px;
  font-weight: 700;
}
.workspace-chevron {
  margin-left: auto;
  color: var(--muted);
}
.workspace-chevron .icon {
  width: 15px;
}
.nav-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin: 28px 13px 12px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 45px;
  padding: 11px 13px;
  border-radius: 9px;
  margin-bottom: 5px;
  color: #696473;
  font-size: 14px;
  font-weight: 500;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}
.nav-item:hover {
  background: var(--frame);
  color: var(--ink);
}
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
}
.nav-item .icon {
  width: 18px;
  height: 18px;
}
.nav-count {
  margin-left: auto;
  min-width: 22px;
  padding: 0 6px;
  background: var(--surface);
  color: var(--accent-dark);
  border-radius: 5px;
  text-align: center;
  font-size: 12px;
  font-weight: 650;
  line-height: 22px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 25px;
}
.integration-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.integration-summary .icon-button {
  margin-left: auto;
  width: 27px;
  height: 30px;
}
.integration-summary .icon {
  width: 14px;
}
.connection-dot {
  width: 5px;
  height: 5px;
  background: var(--positive);
  border-radius: 50%;
  flex: none;
}
.help-button {
  display: flex;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 9px 11px;
  font-size: 12px;
  text-align: left;
}
.help-button .icon {
  width: 15px;
  height: 15px;
}
.help-button > span:last-child {
  margin-left: auto;
}
.help-button:hover {
  background: var(--frame);
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 9px 0;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 650;
}
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}
.profile small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}
.app-body {
  margin-left: var(--nav-width);
}
.topbar {
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumbs .crumb-product {
  color: var(--ink);
  font-weight: 700;
}
.crumb-divider {
  color: #b3acbe;
}
.breadcrumbs > span:last-child {
  color: var(--muted);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.simulation-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.simulation-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.topbar-right .icon {
  color: var(--muted);
  width: 18px;
}
.mobile-menu,
.mobile-brand {
  display: none;
}
.sheet {
  padding: 32px 36px 30px;
  min-height: calc(100vh - 112px);
  outline: none;
}
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 8px 36px 17px;
  color: var(--muted);
  font-size: 12px;
}
.footer-brand {
  font-weight: 700;
  color: #62586d;
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.page-heading p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}
.heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 5px;
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  border: 1px solid #ded9e7;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  white-space: nowrap;
  background: var(--surface);
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}
.btn:hover {
  background: var(--raised);
  border-color: #c9bfd6;
}
.btn:active:not(:disabled) {
  transform: translateY(1px);
}
.btn .icon {
  width: 16px;
  height: 16px;
}
.btn-primary {
  color: white;
  border-color: var(--accent);
  background: var(--accent);
}
.btn-primary:hover {
  color: white;
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}
.btn-soft {
  color: var(--accent-dark);
  border-color: transparent;
  background: var(--accent-soft);
}
.btn-soft:hover {
  background: #e9d9ff;
}
.btn-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.btn-sm {
  min-height: 33px;
  font-size: 12px;
  padding: 7px 10px;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  color: var(--accent-dark);
  background: none;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-link .icon {
  width: 15px;
  height: 15px;
}
.select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.select-wrap > .icon {
  position: absolute;
  left: 12px;
  width: 16px;
  color: var(--muted);
  pointer-events: none;
}
select {
  appearance: none;
  min-height: 39px;
  max-width: 100%;
  border: 1px solid #ded9e7;
  border-radius: 8px;
  padding: 8px 33px 8px 12px;
  font-size: 13px;
  color: #514a5c;
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23696575' stroke-width='1.5'%3E%3Cpath d='m3 4 3 3 3-3'/%3E%3C/svg%3E")
    right 12px center no-repeat;
}
.select-wrap:has(> .icon) select {
  padding-left: 36px;
}
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: var(--gap);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  position: relative;
  text-align: left;
  padding: 21px 24px 20px;
  border: 0;
  background: transparent;
  min-height: 125px;
}
.stat:not(:last-child):after {
  content: "";
  position: absolute;
  right: 0;
  top: 24px;
  bottom: 24px;
  width: 1px;
  background: var(--line);
}
.stat:hover {
  background: #fcfaff;
}
.stat-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.stat-value {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -1.2px;
  line-height: 1.2;
  margin: 8px 0 6px;
}
.stat-caption {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.stat-value.purple {
  color: var(--accent);
}
.stat-value.orange {
  color: var(--warning);
}
.stat-value.red {
  color: var(--negative);
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--gap);
  margin-bottom: var(--gap);
  align-items: stretch;
}
.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 17px;
}
.panel-header h2 {
  font-size: 15px;
}
.panel-header small {
  font-size: 12px;
  color: var(--muted);
}
.panel-body {
  padding: 0 22px 21px;
}
.count-tag {
  display: inline-block;
  vertical-align: 1px;
  padding: 1px 6px;
  margin-left: 7px;
  color: var(--muted);
  background: #f0edf5;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 14px 12px;
  white-space: nowrap;
}
td {
  border-top: 1px solid #efedf4;
  padding: 15px 14px;
  vertical-align: middle;
}
th:first-child,
td:first-child {
  padding-left: 22px;
}
th:last-child,
td:last-child {
  padding-right: 22px;
}
tbody tr[data-open] {
  cursor: pointer;
}
tbody tr[data-open]:hover {
  background: #fcf9ff;
}
.control-name {
  display: block;
  min-width: 170px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}
.control-code {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.control-summary {
  font-size: 12px;
  color: var(--muted);
}
.table-actions {
  width: 32px;
  text-align: right;
}
.table-actions .icon {
  width: 16px;
  color: #8b7c9b;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: #6c6478;
  background: #f0edf5;
  border-radius: 5px;
  white-space: nowrap;
  flex: none;
}
.badge .icon {
  width: 12px;
  height: 12px;
}
.badge.positive {
  color: var(--positive);
  background: var(--positive-bg);
}
.badge.negative {
  color: var(--negative);
  background: var(--negative-bg);
}
.badge.warning {
  color: var(--warning);
  background: var(--warning-bg);
}
.badge.purple {
  color: var(--accent-dark);
  background: var(--accent-soft);
}
.badge.blue {
  color: var(--blue);
  background: var(--blue-bg);
}
.review-card {
  padding: 21px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.review-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 19px;
}
.review-card h2 {
  font-size: 14px;
}
.status-outline {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-dark);
  border: 1px solid #e7d3fc;
  padding: 3px 6px;
  border-radius: 5px;
  white-space: nowrap;
}
.review-card h3 {
  max-width: 270px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.5;
}
.review-card .description {
  margin-top: 11px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.review-finding {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 14px;
  margin: 20px 0;
  border-radius: 9px;
  background: var(--negative-bg);
  color: #9c404b;
  font-size: 12px;
  line-height: 1.65;
}
.review-finding > .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}
.review-finding strong {
  display: block;
  font-weight: 700;
  margin-bottom: 3px;
}
.review-card .btn {
  width: 100%;
  margin-top: auto;
}
.mini-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}
.mini-meta .icon {
  width: 12px;
  height: 12px;
}
.agent-panel {
  margin-bottom: var(--gap);
}
.agent-panel .panel-header {
  padding-bottom: 7px;
}
.agent-caption {
  padding: 0 22px;
  font-size: 12px;
  color: var(--muted);
}
.agent-flow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding: 23px 22px 24px;
  gap: 0;
}
.agent-node {
  min-width: 0;
  padding: 0 4px;
  position: relative;
  border: 0;
  background: none;
  text-align: center;
  border-radius: 8px;
}
.agent-node:not(:last-child):after {
  content: "";
  height: 1px;
  position: absolute;
  top: 27px;
  left: calc(50% + 28px);
  right: calc(-50% + 28px);
  background: var(--line);
}
.agent-node.done:not(:last-child):after {
  background: #dfc7fa;
}
.agent-symbol {
  position: relative;
  width: 49px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  color: #92869f;
}
.agent-symbol > svg.hex {
  position: absolute;
  inset: 0;
  width: 49px;
  height: 54px;
  fill: #faf8fd;
  stroke: #e4dfec;
  stroke-width: 1.2;
}
.agent-symbol > .icon {
  width: 20px;
  height: 20px;
  z-index: 1;
}
.agent-node.done .agent-symbol {
  color: var(--accent-dark);
}
.agent-node.done .hex {
  fill: var(--accent-soft);
  stroke: #dcbcfb;
}
.agent-node.running .agent-symbol {
  color: var(--accent);
}
.agent-node.running .hex {
  fill: #eedbff;
  stroke: var(--accent);
  stroke-width: 1.6;
}
.agent-node.running .agent-symbol > .icon {
  animation: agentpulse 1.8s ease-in-out infinite;
}
.agent-node.human .agent-symbol {
  color: var(--warning);
}
.agent-node.human .hex {
  fill: var(--warning-bg);
  stroke: #ead4ac;
}
.agent-name {
  display: block;
  font-size: 13px;
  font-weight: 650;
}
.agent-state {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.agent-node:hover .agent-name {
  color: var(--accent-dark);
}
.agent-node:hover .hex {
  stroke: var(--accent);
}
.agent-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 22px;
  background: #fcfaff;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.agent-note > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.agent-note .icon {
  width: 14px;
  height: 14px;
}
.bottom-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--gap);
}
.activity-item {
  display: flex;
  gap: 11px;
  padding: 12px 0;
  font-size: 12px;
}
.activity-item:not(:last-child) {
  border-bottom: 1px solid #f0edf5;
}
.activity-icon {
  color: #8c73a7;
  padding-top: 3px;
}
.activity-icon .icon {
  width: 15px;
  height: 15px;
}
.activity-item p {
  line-height: 1.65;
}
.activity-item small {
  display: inline-block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.activity-time {
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
  flex: none;
  padding-top: 3px;
}
.integration-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0edf5;
  font-size: 13px;
}
.integration-row:last-child {
  border-bottom: 0;
}
.integration-name {
  display: flex;
  gap: 12px;
  align-items: center;
}
.integration-logo {
  min-width: 30px;
  color: #6a5d78;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: -0.5px;
}
.integration-name small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 23px 0;
}
.search-field {
  position: relative;
  min-width: 220px;
  max-width: 330px;
  flex: 1;
}
.search-field > .icon {
  position: absolute;
  left: 13px;
  top: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.search-field input {
  width: 100%;
  height: 40px;
  padding: 9px 12px 9px 38px;
  border: 1px solid #ded9e7;
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  color: var(--ink);
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
.toolbar-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
.tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid #e1dce9;
  margin-bottom: 24px;
  overflow: auto;
}
.tab {
  position: relative;
  border: 0;
  padding: 4px 1px 15px;
  min-height: 42px;
  color: var(--muted);
  background: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.tab.active {
  color: var(--accent-dark);
  font-weight: 750;
}
.tab.active:after {
  content: "";
  position: absolute;
  height: 3px;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
}
.tab:hover {
  color: var(--accent-dark);
}
.full-table td {
  padding-top: 22px;
  padding-bottom: 22px;
}
.full-table .control-name {
  font-size: 14px;
}
.empty-state {
  text-align: center;
  padding: 35px 22px;
  color: var(--muted);
  font-size: 14px;
}
.empty-state > .icon {
  width: 30px;
  height: 30px;
  color: #9c84b4;
  margin-bottom: 13px;
}
.empty-state h3 {
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 8px;
}
.empty-state .btn {
  margin-top: 18px;
}
.detail-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 20px;
}
.detail-breadcrumb .icon {
  width: 15px;
  height: 15px;
}
.detail-breadcrumb:hover {
  color: var(--accent-dark);
}
.detail-heading {
  margin-bottom: 15px;
}
.detail-heading h1 {
  max-width: 670px;
  font-size: 27px;
}
.detail-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  margin-top: 13px;
}
.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.detail-meta .icon {
  width: 14px;
  height: 14px;
}
.run-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0 23px;
}
.run-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.run-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.run-status .icon {
  width: 15px;
  height: 15px;
}
.gate-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 22px;
  border: 1px solid #e5cffb;
  border-radius: 12px;
  background: #f8f1ff;
  margin-bottom: 24px;
}
.gate-content {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.gate-content > .icon {
  color: var(--accent);
  width: 21px;
  height: 21px;
  margin-top: 3px;
}
.gate-banner h3 {
  font-size: 14px;
  font-weight: 700;
}
.gate-banner p {
  color: #74617e;
  font-size: 13px;
  margin-top: 5px;
  line-height: 1.65;
}
.gate-banner.warning-banner {
  background: #fffbf1;
  border-color: #ecdfc4;
}
.gate-banner.warning-banner .gate-content > .icon {
  color: var(--warning);
}
.gate-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: var(--gap);
  align-items: start;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}
.section-title h2 {
  font-size: 17px;
}
.section-title p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}
.criteria-list {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
}
.criterion {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 20px;
  border: 0;
  background: var(--surface);
  text-align: left;
}
.criterion:not(:last-child) {
  border-bottom: 1px solid var(--line);
}
.criterion:hover {
  background: #fcf9ff;
}
.criterion-indicator {
  display: grid;
  place-items: center;
  flex: none;
  width: 25px;
  height: 25px;
  margin-top: 1px;
  border: 1px solid #ded7e7;
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
}
.criterion-indicator.pass {
  color: var(--positive);
  background: var(--positive-bg);
  border: 0;
}
.criterion-indicator.fail {
  color: var(--negative);
  background: var(--negative-bg);
  border: 0;
}
.criterion-indicator .icon {
  width: 14px;
  height: 14px;
}
.criterion-text {
  flex: 1;
  min-width: 0;
}
.criterion-text h3 {
  font-size: 14px;
  font-weight: 650;
}
.criterion-text p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}
.criterion-text small {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-dark);
  font-size: 12px;
  margin-top: 8px;
}
.criterion-text small .icon {
  width: 13px;
  height: 13px;
}
.criterion > .badge {
  margin-top: 3px;
}
.sheet-side {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  background: var(--surface);
}
.sheet-side h3 {
  font-size: 14px;
  margin-bottom: 15px;
}
.kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: 12px;
}
.kv > span:first-child {
  color: var(--muted);
}
.side-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 15px 0 19px;
}
.evidence-mini {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  background: none;
  border: 0;
  padding: 10px 0;
  text-align: left;
  font-size: 12px;
}
.evidence-mini .icon {
  width: 16px;
  height: 16px;
  color: #9171ad;
}
.evidence-mini span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.evidence-mini:hover {
  color: var(--accent-dark);
}
.evidence-mini .missing {
  color: var(--warning);
}
.document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.document {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 200px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 23px;
}
.document > .icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  margin-bottom: 20px;
}
.document h3 {
  font-size: 14px;
  margin-bottom: 8px;
}
.document p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 22px;
}
.document-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: auto;
}
.document.missing {
  border-style: dashed;
  background: #fffcf6;
}
.timeline {
  border-left: 1px solid #ded5e9;
  margin-left: 9px;
  padding-left: 29px;
}
.timeline-item {
  position: relative;
  margin-bottom: 28px;
}
.timeline-item:before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  background: #b485e0;
  border: 4px solid var(--frame);
  border-radius: 50%;
  left: -37px;
  top: 4px;
  box-sizing: content-box;
}
.timeline-item h3 {
  font-size: 14px;
}
.timeline-item p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}
.timeline-item time {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 7px;
}
.version-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}
.version-box {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 19px;
  background: var(--surface);
  font-size: 14px;
}
.version-box.new {
  background: #f6eeff;
  border-color: #dbc0f6;
}
.version-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.version-box mark {
  background: #e9d4ff;
  color: #642490;
  border-radius: 3px;
  padding: 2px 5px;
}
.auditor-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 24px;
  align-items: start;
}
.audit-result,
.evidence-viewer {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.audit-result-header {
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.audit-result-header .badge {
  margin-bottom: 14px;
}
.audit-result-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.audit-result-header p {
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}
.audit-result .criteria-list {
  border: 0;
  border-radius: 0;
}
.audit-result .criterion {
  padding: 18px 24px;
}
.audit-result .criterion.active {
  background: #f8f1ff;
}
.audit-result .criterion.active .criterion-text h3 {
  color: var(--accent-dark);
}
.audit-decisions {
  padding: 21px 24px;
  border-top: 1px solid var(--line);
  background: #fdfbff;
}
.audit-decisions p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 13px;
}
.audit-decisions p .icon {
  width: 13px;
  height: 13px;
}
.audit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.audit-actions .btn-primary {
  width: 100%;
  min-height: 42px;
}
#audit-evidence {
  position: sticky;
  top: 24px;
}
.evidence-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 20px;
  border-bottom: 1px solid var(--line);
}
.evidence-viewer-header h3 {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.evidence-viewer-header small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.evidence-viewer-header .btn {
  flex: none;
  font-size: 12px;
}
.evidence-context {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 15px 20px;
  color: var(--warning);
  background: var(--warning-bg);
  font-size: 12px;
  line-height: 1.8;
}
.evidence-context .icon {
  width: 15px;
  height: 15px;
  margin-top: 3px;
}
.evidence-rows-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.evidence-rows-toolbar .text-link {
  white-space: nowrap;
  font-size: 12px;
}
.evidence-table {
  max-height: 500px;
  overflow: auto;
}
.evidence-table table {
  font-size: 12px;
}
.evidence-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: white;
  padding: 13px 11px;
  font-size: 12px;
}
.evidence-table td {
  padding: 15px 11px;
  white-space: nowrap;
}
.evidence-table th:first-child,
.evidence-table td:first-child {
  padding-left: 20px;
}
.evidence-table tr.highlight {
  background: #fff5e7;
}
.evidence-table tr.highlight td {
  border-color: #f1dfc3;
  color: #8b5428;
}
.evidence-table tr.highlight td:first-child {
  font-weight: 750;
}
.row-number {
  width: 35px;
  color: var(--muted);
}
.evidence-text {
  white-space: pre-wrap;
  padding: 24px;
  max-height: 600px;
  overflow: auto;
  color: #554b60;
  font-size: 14px;
  line-height: 1.95;
}
.evidence-image {
  display: block;
  width: 100%;
  height: auto;
}
.file-frame {
  display: block;
  border: 0;
  width: 100%;
  height: 520px;
  background: var(--frame);
}
.decision-record {
  padding: 22px 24px;
  background: var(--positive-bg);
  font-size: 14px;
}
.decision-record strong {
  color: var(--positive);
  font-weight: 700;
}
.decision-record p {
  color: #476b59;
  font-size: 13px;
  margin-top: 8px;
}
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin: 24px 0;
}
.report-type {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.report-type > .icon {
  color: var(--accent);
  width: 24px;
  height: 24px;
  margin-bottom: 15px;
}
.report-type h2 {
  font-size: 18px;
}
.report-type p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin: 8px 0 20px;
  max-width: 54ch;
}
.report-count {
  display: block;
  margin: 12px 0;
  font-size: 28px;
  font-weight: 600;
}
.report-count small {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.report-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px;
  border-top: 1px solid var(--line);
}
.report-row h3 {
  font-size: 14px;
}
.report-row p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  margin-top: 5px;
  max-width: 80ch;
}
.report-row .btn {
  flex: none;
}
dialog {
  width: min(980px, calc(100vw - 40px));
  max-height: calc(100dvh - 60px);
  border: 0;
  border-radius: 16px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 70px #2e173d30;
}
dialog::backdrop {
  background: #1c112b77;
}
dialog.compact {
  width: min(540px, calc(100vw - 40px));
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px 25px;
  border-bottom: 1px solid var(--line);
}
.dialog-header h2 {
  font-size: 18px;
}
.dialog-body {
  padding: 24px 25px;
}
.dialog-body > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
  margin-bottom: 21px;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 22px;
}
.form-label {
  display: block;
  font-weight: 650;
  font-size: 14px;
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  border: 1px solid #d9cfe5;
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 19px;
}
textarea.form-input {
  min-height: 115px;
  resize: vertical;
}
.field-help {
  color: var(--muted);
  font-size: 12px;
  margin-top: -9px;
}
.error-inline {
  min-height: 18px;
  color: var(--negative);
  font-size: 13px;
  margin-top: 8px;
}
.toast-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: calc(100vw - 40px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 430px;
  border-radius: 10px;
  padding: 15px 19px;
  background: #2d1b3e;
  color: white;
  font-size: 13px;
  box-shadow: 0 5px 20px #21102d20;
  animation: toastin 0.2s ease-out;
}
.toast .icon {
  width: 17px;
  height: 17px;
  color: #d6a9ff;
}
.toast.error {
  background: #85434b;
}
.guide-step {
  display: flex;
  gap: 15px;
  margin-bottom: 22px;
}
.guide-step > span {
  width: 38px;
  flex: none;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.guide-step h3 {
  font-size: 14px;
}
.guide-step p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 5px;
}
.agent-output {
  padding: 19px;
  border-radius: 9px;
  background: var(--frame);
  color: #55485f;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.9;
}
.loading-state {
  min-height: 65vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}
.loading-state h1 {
  font-size: 24px;
}
.loading-state p {
  font-size: 14px;
  color: var(--muted);
}
.loading-mark {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  border: 2px solid #e9d6ff;
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}
.tag-line {
  display: flex;
  gap: 7px;
  align-items: center;
}
.queue-list .queue-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding: 24px;
  border-top: 1px solid var(--line);
}
.queue-item h3 {
  font-size: 16px;
}
.queue-item p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}
.queue-item .badge {
  margin-bottom: 10px;
}
.sheet-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.sheet-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 2px;
}
.version-history {
  margin-top: 29px;
}
.version-history details {
  margin-top: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  padding: 15px 18px;
  font-size: 14px;
}
.version-history summary {
  cursor: pointer;
  font-weight: 600;
}
.version-history pre {
  font: 12px/1.9 var(--font);
  color: var(--muted);
  white-space: pre-wrap;
  margin: 15px 0 0;
}
.run-history {
  margin-top: 23px;
  color: var(--muted);
  font-size: 13px;
}
.agent-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.agent-progress-track {
  height: 4px;
  width: 75px;
  border-radius: 5px;
  background: #ede6f5;
  overflow: hidden;
}
.agent-progress-track span {
  height: 100%;
  display: block;
  background: var(--accent);
  border-radius: inherit;
}
.mobile-evidence-jump {
  display: none;
}
.menu-scrim {
  display: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes agentpulse {
  50% {
    opacity: 0.4;
  }
}
@keyframes toastin {
  from {
    transform: translateY(6px);
    opacity: 0.5;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@media (min-width: 1600px) {
  .sheet {
    padding: 38px 46px;
  }
  .topbar {
    padding: 0 46px;
  }
  .app-footer {
    padding-left: 46px;
    padding-right: 46px;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .review-card {
    padding: 26px;
  }
  .review-card h3 {
    font-size: 20px;
  }
  .control-name {
    font-size: 14px;
  }
  .control-summary {
    font-size: 13px;
  }
  .overview-table td {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .agent-flow {
    padding-top: 28px;
    padding-bottom: 29px;
  }
}
@media (max-width: 1280px) {
  :root {
    --nav-width: 226px;
  }
  .sidebar {
    padding-left: 14px;
    padding-right: 14px;
  }
  .topbar {
    padding: 0 26px;
  }
  .sheet {
    padding: 28px 26px;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1fr) 278px;
    gap: 20px;
  }
  .overview-table .management-cell {
    display: none;
  }
  .stat {
    padding: 20px 19px;
  }
  .stat-label {
    font-size: 12px;
  }
  .stat-caption {
    font-size: 12px;
  }
  .detail-heading h1 {
    font-size: 24px;
  }
  .detail-heading .heading-actions {
    justify-content: flex-end;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
  .document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .agent-name {
    font-size: 12px;
  }
  .agent-state {
    font-size: 12px;
  }
  .agent-progress {
    display: none;
  }
  .auditor-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 20px;
  }
}
@media (max-width: 1050px) {
  .simulation-label {
    font-size: 0;
    gap: 0;
  }
  .simulation-label:after {
    content: "Dados e agentes simulados";
    font-size: 12px;
  }
  .simulation-dot {
    margin-right: 7px;
  }
  .agent-flow {
    display: flex;
    overflow-x: auto;
  }
  .agent-node {
    flex: 1 0 88px;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .review-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
  }
  .review-card-top {
    grid-column: 1/-1;
    margin-bottom: 13px;
  }
  .review-card h3 {
    max-width: none;
  }
  .review-card .description {
    grid-column: 1;
  }
  .review-finding {
    grid-column: 2;
    grid-row: 2/5;
    margin: 0;
  }
  .review-card > .btn {
    grid-column: 1;
    width: fit-content;
    margin-top: 16px;
  }
  .review-card > .mini-meta {
    display: none;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .sheet-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 25px;
  }
  .sheet-side h3,
  .sheet-side .side-divider {
    grid-column: 1/-1;
  }
  .auditor-layout {
    grid-template-columns: 1fr;
  }
  #audit-evidence {
    position: static;
  }
  .mobile-evidence-jump {
    display: inline-flex;
    margin-top: 12px;
  }
  .heading-actions {
    flex-wrap: wrap;
  }
  .gate-banner {
    align-items: flex-start;
  }
  .bottom-grid {
    grid-template-columns: 1fr;
  }
  .full-table .owner-cell {
    display: none;
  }
}
@media (max-width: 760px) {
  html {
    scrollbar-gutter: auto;
  }
  .sidebar {
    overflow-y: auto;
    overscroll-behavior: contain;
    width: 260px;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.22s ease-out;
    box-shadow: 12px 0 40px #25103320;
    padding-top: 17px;
  }
  .sidebar.open {
    transform: translateX(0);
    visibility: visible;
  }
  .menu-scrim.visible {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 29;
    background: #1e112f66;
  }
  .app-body {
    margin-left: 0;
  }
  .topbar {
    height: 62px;
    padding: 0 18px;
  }
  .mobile-menu {
    display: inline-flex;
    width: 44px;
    height: 44px;
    margin-left: -8px;
  }
  .breadcrumbs {
    gap: 9px;
    font-size: 12px;
  }
  .breadcrumbs .crumb-product,
  .breadcrumbs .crumb-divider,
  .breadcrumbs #breadcrumb {
    display: none;
  }
  .mobile-brand {
    display: inline-flex;
    align-items: center;
  }
  .mobile-brand img {
    display: block;
    width: 82px;
    height: 52px;
    object-fit: contain;
  }
  .topbar-right {
    gap: 0;
  }
  .simulation-label {
    font-size: 0;
    gap: 0;
  }
  .simulation-label:after {
    content: "Demonstração";
    font-size: 12px;
  }
  .simulation-dot {
    margin-right: 6px;
  }
  .topbar-right .icon-button {
    width: 44px;
    height: 44px;
    margin-right: -8px;
  }
  .sheet {
    padding: 25px 18px;
    min-height: calc(100dvh - 106px);
  }
  .app-footer {
    padding: 8px 18px 15px;
    font-size: 12px;
    flex-wrap: wrap;
  }
  .app-footer > span:last-child {
    margin-left: auto;
  }
  .page-heading {
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 23px;
  }
  .page-heading h1 {
    font-size: 27px;
    letter-spacing: -0.75px;
  }
  .page-heading p {
    font-size: 13px;
    line-height: 1.8;
    max-width: 35ch;
  }
  .heading-actions {
    padding-top: 0;
  }
  .btn,
  .btn-sm {
    min-height: 44px;
    font-size: 12px;
    padding: 10px 12px;
  }
  .icon-button {
    width: 44px;
    height: 44px;
  }
  select {
    min-height: 44px;
    font-size: 12px;
  }
  .stat-strip {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 20px;
  }
  .stat {
    padding: 19px 18px;
    min-height: 139px;
  }
  .stat:nth-child(2):after {
    display: none;
  }
  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .stat-label {
    font-size: 12px;
    line-height: 1.6;
  }
  .stat-caption {
    font-size: 12px;
    line-height: 1.7;
  }
  .stat-value {
    font-size: 32px;
    margin: 9px 0 6px;
  }
  .overview-grid {
    gap: 20px;
    margin-bottom: 20px;
  }
  .panel-header {
    padding: 18px 17px 14px;
    gap: 12px;
  }
  .panel-header h2 {
    font-size: 14px;
  }
  .panel-header .text-link {
    font-size: 12px;
    flex: none;
  }
  .panel-header small {
    font-size: 12px;
  }
  .panel-body {
    padding: 0 17px 18px;
  }
  .count-tag {
    font-size: 12px;
  }
  .overview-table td,
  .overview-table th {
    padding-left: 9px;
    padding-right: 9px;
  }
  .overview-table td:first-child,
  .overview-table th:first-child {
    padding-left: 17px;
  }
  .overview-table td:last-child,
  .overview-table th:last-child {
    padding-right: 12px;
  }
  .overview-table .control-name {
    font-size: 13px;
    min-width: 135px;
  }
  .control-code {
    font-size: 12px;
  }
  .badge {
    font-size: 12px;
  }
  .review-card {
    display: flex;
    padding: 20px;
  }
  .review-card h3 {
    font-size: 19px;
    max-width: none;
  }
  .review-card .description {
    font-size: 13px;
  }
  .review-finding {
    margin: 18px 0;
    font-size: 12px;
  }
  .review-card > .btn {
    width: 100%;
    margin-top: 0;
  }
  .agent-panel {
    margin-bottom: 20px;
  }
  .agent-panel .panel-header {
    align-items: flex-start;
  }
  .agent-panel .panel-header h2 {
    max-width: 195px;
  }
  .agent-caption {
    padding: 0 17px;
    font-size: 12px;
    margin-top: 3px;
    line-height: 1.8;
  }
  .agent-flow {
    display: flex;
    overflow-x: auto;
    padding: 23px 14px 25px;
  }
  .agent-node {
    flex: 0 0 88px;
    padding: 0 2px;
  }
  .agent-name {
    font-size: 12px;
  }
  .agent-state {
    font-size: 12px;
  }
  .agent-note {
    padding: 13px 17px;
    flex-wrap: wrap;
    font-size: 12px;
  }
  .agent-note .text-link {
    min-height: 30px;
    font-size: 12px;
  }
  .activity-item {
    font-size: 12px;
  }
  .activity-item small,
  .activity-time {
    font-size: 12px;
  }
  .toolbar {
    gap: 8px;
    margin: 19px 0;
  }
  .search-field {
    min-width: 100%;
    max-width: none;
  }
  .search-field input {
    height: 44px;
    font-size: 13px;
  }
  .search-field .icon {
    top: 14px;
  }
  .toolbar select {
    max-width: 160px;
    font-size: 12px;
  }
  .toolbar-count {
    font-size: 12px;
  }
  .tabs {
    gap: 23px;
    margin-bottom: 21px;
  }
  .tab {
    min-height: 44px;
    font-size: 12px;
    padding-bottom: 14px;
  }
  .full-table .owner-cell,
  .full-table .period-cell,
  .full-table .management-cell {
    display: none;
  }
  .full-table .control-name {
    font-size: 13px;
    min-width: 145px;
  }
  .full-table td {
    padding-top: 18px;
    padding-bottom: 18px;
  }
  .full-table td:first-child,
  .full-table th:first-child {
    padding-left: 17px;
  }
  .detail-breadcrumb {
    font-size: 12px;
    margin-bottom: 17px;
  }
  .detail-heading h1 {
    font-size: 23px;
    line-height: 1.5;
    text-wrap: auto;
  }
  .detail-meta {
    gap: 9px 12px;
    font-size: 12px;
  }
  .detail-heading .heading-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .detail-heading .heading-actions .btn {
    font-size: 12px;
  }
  .run-toolbar {
    padding-bottom: 20px;
  }
  .run-buttons {
    gap: 7px;
  }
  .run-buttons .btn {
    font-size: 12px;
    padding: 10px 11px;
  }
  .run-status {
    font-size: 12px;
    width: 100%;
  }
  .gate-banner {
    flex-direction: column;
    padding: 17px;
    gap: 15px;
    margin-bottom: 20px;
  }
  .gate-banner h3 {
    font-size: 13px;
  }
  .gate-banner p {
    font-size: 12px;
  }
  .gate-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .gate-actions .btn {
    flex: 1;
    white-space: normal;
  }
  .section-title {
    gap: 10px;
    align-items: flex-start;
  }
  .section-title h2 {
    font-size: 16px;
  }
  .section-title p {
    font-size: 12px;
  }
  .criterion {
    padding: 17px 14px;
    gap: 10px;
  }
  .criterion-indicator {
    width: 23px;
    height: 23px;
  }
  .criterion-text h3 {
    font-size: 13px;
  }
  .criterion-text p {
    font-size: 12px;
  }
  .criterion-text small {
    font-size: 12px;
  }
  .criterion .badge {
    font-size: 12px;
    padding-left: 6px;
    padding-right: 6px;
  }
  .sheet-side {
    display: block;
    padding: 19px;
  }
  .sheet-side h3 {
    font-size: 14px;
  }
  .detail-grid {
    gap: 20px;
  }
  .document-grid {
    grid-template-columns: 1fr;
  }
  .document {
    min-height: 175px;
    padding: 21px;
  }
  .document h3 {
    font-size: 14px;
  }
  .document p {
    font-size: 12px;
  }
  .document .text-link {
    font-size: 12px;
    min-height: 44px;
  }
  .version-comparison {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .version-box {
    font-size: 13px;
  }
  .auditor-layout {
    gap: 20px;
  }
  .audit-result-header {
    padding: 21px 19px;
  }
  .audit-result-header h2 {
    font-size: 23px;
  }
  .audit-result-header p {
    font-size: 13px;
  }
  .audit-result .criterion {
    padding: 17px 14px;
  }
  .audit-decisions {
    padding: 19px;
  }
  .audit-actions {
    gap: 8px;
  }
  .audit-actions .btn {
    font-size: 12px;
  }
  .audit-actions .btn-primary {
    font-size: 13px;
  }
  .audit-decisions p {
    font-size: 12px;
  }
  .evidence-viewer-header {
    padding: 17px;
    flex-wrap: wrap;
  }
  .evidence-viewer-header h3 {
    font-size: 13px;
  }
  .evidence-viewer-header small {
    font-size: 12px;
  }
  .evidence-context {
    padding: 14px 17px;
    font-size: 12px;
  }
  .evidence-rows-toolbar {
    padding: 12px 17px;
    font-size: 12px;
  }
  .evidence-rows-toolbar .text-link {
    font-size: 12px;
    min-height: 30px;
  }
  .evidence-table {
    max-height: 400px;
  }
  .evidence-table table {
    font-size: 12px;
  }
  .evidence-table th {
    font-size: 12px;
  }
  .evidence-text {
    padding: 19px;
    font-size: 13px;
  }
  .file-frame {
    height: 420px;
  }
  .decision-record {
    padding: 19px;
    font-size: 13px;
  }
  .decision-record p {
    font-size: 12px;
  }
  .report-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .report-type {
    padding: 22px;
  }
  .report-type h2 {
    font-size: 17px;
  }
  .report-row {
    padding: 19px;
    flex-wrap: wrap;
    gap: 14px;
  }
  .report-row h3 {
    font-size: 14px;
  }
  .report-row .btn {
    max-width: 100%;
  }
  .queue-list .queue-item {
    padding: 21px;
    flex-wrap: wrap;
  }
  .queue-item h3 {
    font-size: 14px;
  }
  .queue-item p {
    font-size: 12px;
  }
  .queue-item .btn {
    width: 100%;
  }
  dialog,
  dialog.compact {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 32px);
  }
  .dialog-header {
    padding: 18px;
  }
  .dialog-header h2 {
    font-size: 17px;
  }
  .dialog-body {
    padding: 21px 18px;
  }
  .dialog-body > p {
    font-size: 13px;
  }
  .form-input {
    font-size: 14px;
  }
  .form-label {
    font-size: 13px;
  }
  .dialog-footer {
    flex-wrap: wrap;
  }
  .dialog-footer .btn {
    flex: 1;
  }
  .toast-container {
    bottom: 17px;
    right: 17px;
  }
  .toast {
    font-size: 12px;
  }
  .version-history {
    margin-top: 25px;
  }
  .version-history h2 {
    font-size: 17px;
  }
  .version-history details {
    padding: 14px;
    font-size: 13px;
  }
}
/* Local refinement: keep the finding, its source and the auditor's decision
   on one working surface. 1366px: 248 nav + 72 gutters + 15 scrollbar +
   1031 canvas; the canvas splits into two flexible columns and a 20px gap. */
.scope-note {
  margin: -12px 0 20px;
  color: var(--muted);
  font-size: 13px;
}
.overview-grid > .review-card {
  align-self: start;
}
.review-card > .btn {
  margin-top: 0;
}
.review-heading {
  margin-bottom: 18px;
}
.review-heading > .detail-breadcrumb {
  margin-bottom: 12px;
}
.review-heading > .page-heading {
  margin-bottom: 0;
}
.review-heading h1 {
  font-size: 27px;
}
.review-heading p {
  margin-top: 5px;
}
.sheet:has(.review-workspace) > .detail-breadcrumb {
  margin-bottom: 12px;
}
.review-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  align-items: start;
  gap: 18px 20px;
}
.review-workspace .audit-result {
  overflow: visible;
}
.finding-header {
  padding: 18px 20px 15px;
  border-bottom: 1px solid var(--line);
}
.finding-header .badge {
  margin-bottom: 9px;
}
.finding-header h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.5px;
  text-wrap: balance;
}
.selected-finding {
  padding: 16px 20px;
  background: var(--surface);
  border-radius: 0;
  scroll-margin-top: 20px;
}
.selected-finding:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
.finding-criterion {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 650;
}
.finding-criterion > .icon {
  width: 16px;
  height: 16px;
}
.finding-criterion .badge {
  margin-left: auto;
}
.finding-facts {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}
.finding-facts > div + div {
  margin-top: 10px;
}
.finding-facts dt,
.finding-facts dd {
  display: inline;
  margin: 0;
}
.finding-facts dt {
  font-size: 13px;
  font-weight: 650;
}
.finding-facts dt::after {
  content: ": ";
}
.finding-facts dd {
  color: var(--muted);
}
.finding-facts > div:last-child dd {
  color: var(--accent-dark);
}
.criteria-disclosure {
  border-top: 1px solid var(--line);
}
.criteria-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.criteria-disclosure > summary > span {
  flex: 1;
}
.criteria-disclosure > summary > .icon {
  width: 16px;
  height: 16px;
}
.criteria-disclosure > summary > .icon:last-child {
  color: var(--accent-dark);
}
.criteria-disclosure[open] > summary > .icon:last-child {
  transform: rotate(180deg);
}
.criteria-disclosure > summary:hover {
  background: var(--raised);
}
.criteria-disclosure > .criteria-list {
  border-top: 1px solid var(--line);
}
.review-version {
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  color: var(--muted);
  background: var(--frame);
  font-size: 12px;
}
.selected-evidence {
  border-color: #d4b6ed;
}
.evidence-selection {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 16px;
  border-bottom: 1px solid #e6d4f6;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 600;
}
.evidence-selection .icon {
  width: 15px;
  height: 15px;
  margin-top: 3px;
}
.review-workspace #audit-evidence {
  top: 18px;
  scroll-margin-top: 18px;
}
.review-workspace .evidence-viewer-header {
  padding: 15px 16px;
  align-items: flex-start;
}
.review-workspace .evidence-viewer-header small {
  margin-top: 3px;
}
.review-workspace .evidence-context {
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
}
.review-workspace .evidence-rows-toolbar {
  padding: 11px 16px;
  font-size: 13px;
}
.review-workspace .evidence-rows-toolbar .text-link {
  font-size: 13px;
}
.review-workspace .evidence-table {
  max-height: min(470px, 53vh);
}
.review-workspace .evidence-table table {
  font-size: 13px;
}
.review-workspace .evidence-table th,
.review-workspace .evidence-table td {
  padding: 12px 9px;
}
.review-workspace .evidence-table th:first-child,
.review-workspace .evidence-table td:first-child {
  padding-left: 16px;
}
.review-workspace .evidence-table th:last-child,
.review-workspace .evidence-table td:last-child {
  padding-right: 16px;
}
.review-workspace .evidence-table .row-number,
.review-workspace .evidence-table td:last-child {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.review-decision-bar {
  position: sticky;
  bottom: 16px;
  z-index: 5;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  scroll-margin-block: 20px;
}
.decision-context {
  min-width: 0;
}
.decision-context strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
}
.decision-context p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.review-decision-bar .audit-actions {
  flex: none;
  justify-content: flex-end;
}
.review-decision-bar .audit-actions .btn-primary {
  width: auto;
  min-height: 39px;
}
.review-decision-bar .decision-record {
  padding: 0;
  background: none;
}
.review-decision-bar .decision-record strong,
.review-decision-bar .decision-record p {
  color: var(--ink);
}
.review-decision-bar:has(.decision-record) {
  background: var(--raised);
}
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
  border-radius: 8px;
}
summary::-webkit-details-marker {
  display: none;
}
.analysis-summary {
  margin-bottom: 24px;
}
.analysis-summary > summary {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 17px 20px;
  cursor: pointer;
  list-style: none;
}
.analysis-summary-main {
  flex: 1;
  min-width: 0;
}
.analysis-summary-main h2 {
  font-size: 15px;
}
.analysis-summary-main p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.analysis-counts {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.disclosure-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.disclosure-label .icon {
  width: 15px;
  height: 15px;
}
.analysis-summary[open] > summary {
  border-bottom: 1px solid var(--line);
}
.analysis-summary[open] .disclosure-label .icon {
  transform: rotate(180deg);
}
.analysis-steps {
  padding: 0 0 16px;
}
.analysis-steps .agent-flow {
  padding: 21px 20px;
}
.analysis-steps .agent-output {
  margin: 0 20px;
}
.sheet-objective,
.sheet-approval {
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.sheet-objective h3,
.sheet-approval h3 {
  font-size: 14px;
  margin-bottom: 7px;
}
.sheet-objective p,
.sheet-approval p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.sheet-approval .badge {
  margin-right: 8px;
}
.sheet-side .sheet-approval {
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
.rule-criterion .criterion-text p {
  color: var(--ink);
  font-size: 14px;
}
.result-rule {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 13px;
}
.result-finding {
  display: block;
  color: var(--ink);
  margin-top: 7px;
  font-size: 14px;
  line-height: 1.65;
}
.trace-id {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.presenter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--gap);
  align-items: start;
}
.presenter-controls {
  padding: 22px;
}
.presenter-controls > h2 {
  margin-bottom: 7px;
}
.presenter-controls > p {
  color: var(--muted);
  font-size: 14px;
}
.presenter-controls > select,
.presenter-controls > label {
  display: block;
  width: 100%;
  margin-top: 18px;
}
.presenter-controls .run-buttons {
  margin-top: 20px;
}
.presenter-controls .run-buttons .btn {
  white-space: normal;
}
.presenter-status {
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.presenter-status .badge {
  margin: 0 6px 8px 0;
}
@media (min-width: 1051px) and (max-width: 1550px) {
  .overview-table .management-cell {
    display: none;
  }
}
@media (min-width: 1600px) {
  .review-workspace {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 20px 24px;
  }
  .finding-header,
  .selected-finding {
    padding-left: 24px;
    padding-right: 24px;
  }
  .finding-header {
    padding-top: 22px;
    padding-bottom: 19px;
  }
  .selected-finding {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .finding-facts > div + div {
    margin-top: 14px;
  }
}
@media (max-width: 1180px) {
  .review-decision-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .review-decision-bar .audit-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .analysis-summary > summary {
    flex-wrap: wrap;
    gap: 8px 18px;
  }
  .analysis-summary-main {
    flex-basis: 100%;
  }
  .disclosure-label {
    margin-left: auto;
  }
}
@media (max-width: 1050px) {
  .review-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .review-workspace #audit-evidence {
    position: static;
  }
  .review-decision-bar {
    position: static;
  }
  .presenter-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .review-heading h1 {
    font-size: 25px;
  }
  .review-workspace {
    gap: 16px;
  }
  .finding-header,
  .selected-finding {
    padding-left: 18px;
    padding-right: 18px;
  }
  .finding-header h2 {
    font-size: 24px;
  }
  .finding-criterion .badge {
    margin-left: 0;
  }
  .criteria-disclosure > summary,
  .review-version {
    padding-left: 18px;
    padding-right: 18px;
  }
  .review-workspace .criterion-text h3,
  .review-workspace .criterion-text p {
    font-size: 14px;
  }
  .review-decision-bar {
    padding: 18px;
  }
  .review-decision-bar .audit-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 9px;
  }
  .review-decision-bar .audit-actions .btn {
    min-height: 44px;
    font-size: 13px;
  }
  .decision-context p {
    font-size: 13px;
  }
  .analysis-summary > summary {
    padding: 17px 18px;
    gap: 10px;
  }
  .analysis-counts,
  .disclosure-label {
    white-space: normal;
    font-size: 13px;
  }
  .disclosure-label {
    margin-left: 0;
    min-height: 30px;
  }
  .analysis-steps .agent-flow {
    padding-left: 15px;
    padding-right: 15px;
  }
  .sheet-objective,
  .sheet-approval {
    padding: 17px 18px;
  }
  .presenter-controls {
    padding: 20px 18px;
  }
  .presenter-controls .run-buttons {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
