:root {
  color-scheme: light;
  --font-sans: "Noto Sans CJK SC", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-mono: "Noto Sans Mono CJK SC", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --brand: #c00000;
  --brand-strong: #990d13;
  --brand-soft: #fbeeee;
  --ink: #18212b;
  --text: #3d4854;
  --muted: #5f6b79;
  --canvas: #f5f6f8;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --surface-muted: #f0f2f5;
  --line: #dde2e8;
  --line-strong: #c7ced7;
  --nav: #1d252e;
  --nav-raised: #29333e;
  --nav-text: #b9c2cc;
  --nav-muted: #9aa6b3;
  --info: #2463a8;
  --info-soft: #eef5fd;
  --success: #167a4b;
  --success-soft: #edf8f2;
  --warning: #8f4e0d;
  --warning-soft: #fff5e8;
  --danger: #b42318;
  --danger-soft: #fdf0ee;
  --neutral-soft: #f0f2f5;
  --focus: #c00000;
  --radius: 8px;
  --radius-control: 7px;
  --shadow-float: 0 18px 48px rgba(24, 33, 43, 0.18), 0 2px 8px rgba(24, 33, 43, 0.08);
  --topbar-height: 64px;
  --rail-width: 236px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body:has(dialog[open]) {
  overflow: hidden;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
h4 {
  margin: 0;
}

svg {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

::selection {
  background: #f3c7c9;
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 9px 13px;
  border-radius: var(--radius-control);
  background: var(--ink);
  color: #fff;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100dvh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--rail-width);
  flex-direction: column;
  overflow: hidden;
  background: var(--nav);
  color: var(--nav-text);
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  height: var(--topbar-height);
  padding: 7px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-seal {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.63);
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.04em;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.16);
}

.brand-title {
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.brand-caption {
  margin-top: 3px;
  color: var(--nav-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.sidebar__identity {
  margin: 16px 14px 8px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.identity-role {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 650;
}

.identity-role::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  content: "";
}

.identity-org {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 5px;
  color: var(--nav-text);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.identity-code {
  margin-top: 7px;
  color: var(--nav-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px 20px;
  scrollbar-color: #4a5663 transparent;
  scrollbar-width: thin;
}

.nav-group + .nav-group {
  margin-top: 17px;
}

.nav-group__label {
  padding: 0 10px 6px;
  color: #95a0ac;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.11em;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  margin: 2px 0;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--nav-text);
  font-size: 13px;
  transition: background-color 160ms ease, color 160ms ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}

.nav-link[aria-current="page"] {
  background: var(--nav-raised);
  color: #fff;
  font-weight: 600;
}

.nav-link[aria-current="page"]::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
  content: "";
}

.nav-link svg {
  width: 17px;
  height: 17px;
  color: #909caa;
}

.nav-link[aria-current="page"] svg {
  color: #fff;
}

.sidebar__footer {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.environment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--nav-muted);
  font-size: 11px;
}

.environment-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.environment-dot::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e0a43a;
  content: "";
}

.sidebar__deck-link {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: #c3ccd5;
  font-size: 11px;
  font-weight: 600;
}

.sidebar__deck-link:hover {
  color: #fff;
}

.sidebar__deck-link svg {
  width: 14px;
  height: 14px;
  color: #8e9aa6;
}

.sidebar__deck-link svg:last-child {
  margin-left: auto;
}

.workspace {
  min-width: 0;
  min-height: 100dvh;
  margin-left: var(--rail-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}

.topbar__left,
.topbar__right {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.icon-button.mobile-menu-button {
  display: none;
}

.icon-button.navigation-close {
  display: none;
  margin-left: auto;
  color: var(--nav-text);
}

.navigation-close:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.breadcrumb {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.breadcrumb strong {
  overflow: hidden;
  max-width: 220px;
  color: var(--ink);
  font-weight: 600;
  text-overflow: ellipsis;
}

.breadcrumb__sep {
  color: #a7b0bb;
}

.period-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 5px 10px 5px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.period-chip:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.period-chip__code {
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.period-chip__body {
  display: grid;
  gap: 1px;
}

.period-chip__title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.period-chip__meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid #ead49c;
  border-radius: 999px;
  background: #fff9e8;
  color: #70490d;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.demo-badge::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b9770d;
  content: "";
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--muted);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.icon-button:hover {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--ink);
}

.icon-button--bordered {
  border-color: var(--line);
  background: var(--surface);
}

.notification-button {
  position: relative;
}

.notification-count {
  position: absolute;
  top: 1px;
  right: 0;
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.identity-button {
  display: flex;
  max-width: 250px;
  min-width: 0;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  text-align: left;
}

.identity-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.identity-button__avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.identity-button__body {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 0 1 auto;
}

.identity-button__title {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-button__meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.page {
  width: min(100%, 1560px);
  margin: 0 auto;
  padding: 27px 30px 42px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.page-head h1 {
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.page-meta strong {
  color: var(--text);
  font-weight: 600;
}

.meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #a9b2bd;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink);
}

.button svg {
  width: 16px;
  height: 16px;
}

.button--primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.button--primary:hover {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
  color: #fff;
}

.button--quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.button--quiet:hover {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--ink);
}

.button--small {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}

.button--danger {
  border-color: #e5b4af;
  background: var(--surface);
  color: var(--danger);
}

.button--danger:hover {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.button[disabled],
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.48;
}

.period-spine {
  --spine-columns: 4;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--spine-columns), minmax(0, 1fr));
  margin-bottom: 18px;
  padding: 16px 18px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.spine-step {
  position: relative;
  min-width: 0;
  padding-right: 16px;
}

.spine-step:not(:last-child)::after {
  position: absolute;
  top: 10px;
  right: 0;
  left: 26px;
  height: 1px;
  background: var(--line);
  content: "";
}

.spine-step--complete:not(:last-child)::after,
.spine-step--active:not(:last-child)::after {
  background: #aeb8c3;
}

.spine-step__top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr);
  column-gap: 8px;
}

.spine-step__dot {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
}

.spine-step__dot svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.1;
}

.spine-step--complete .spine-step__dot {
  border-color: #a9d2bf;
  background: var(--success-soft);
  color: var(--success);
}

.spine-step--active .spine-step__dot {
  border: 2px solid var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.spine-step--blocked .spine-step__dot {
  border-color: #e5b4af;
  background: var(--danger-soft);
  color: var(--danger);
}

.spine-step__title {
  grid-column: 1 / -1;
  grid-row: 2;
  overflow: hidden;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spine-step--complete .spine-step__title,
.spine-step--active .spine-step__title {
  color: var(--ink);
}

.spine-step__meta {
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spine-step--active .spine-step__meta {
  color: var(--brand);
}

.ledger-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric {
  position: relative;
  min-width: 0;
  padding: 17px 20px 16px;
}

.metric:not(:last-child)::after {
  position: absolute;
  top: 17px;
  right: 0;
  bottom: 17px;
  width: 1px;
  background: var(--line);
  content: "";
}

.metric__label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.metric__value {
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 23px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric__value small {
  margin-left: 3px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

.metric__note {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  align-items: start;
  gap: 20px;
}

.content-grid--balanced {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack {
  display: grid;
  align-content: start;
  gap: 20px;
  min-width: 0;
}

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel__header {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.panel__heading {
  min-width: 0;
}

.panel__title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.005em;
}

.panel__meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.panel__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.panel__body {
  padding: 16px;
}

.panel__body--flush {
  padding: 0;
}

.panel__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
}

.panel__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 600;
}

.panel__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.panel__link svg {
  width: 13px;
  height: 13px;
}

.status {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--neutral-soft);
  color: #586474;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.status::before {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status--active {
  background: var(--info-soft);
  color: var(--info);
}

.status--success {
  background: var(--success-soft);
  color: var(--success);
}

.status--warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.status--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.status--brand {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.status--neutral {
  background: var(--neutral-soft);
  color: #5f6b79;
}

.status--large {
  padding: 3px 8px;
  font-size: 12px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  scrollbar-color: #bcc4cd transparent;
  scrollbar-width: thin;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
  font-size: 12px;
}

.data-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.015em;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 10px 13px;
  border-bottom: 1px solid #edf0f3;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background-color 140ms ease;
}

.data-table tbody tr:hover {
  background: #fcfcfd;
}

.data-table .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.data-table .cell-strong {
  color: var(--ink);
  font-weight: 600;
}

.data-table .cell-muted {
  color: var(--muted);
}

.data-table .cell-mono {
  font-family: var(--font-mono);
  font-size: 11px;
}

.data-table .cell-actions {
  text-align: right;
  white-space: nowrap;
}

.change-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.change-count {
  white-space: nowrap;
}

.change-count--add {
  color: var(--success);
}

.change-count--edit {
  color: var(--warning);
}

.change-count--remove {
  color: var(--danger);
}

.diff-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.diff-count {
  padding: 10px 11px;
  background: var(--surface-soft);
}

.diff-count__value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1.1;
}

.diff-count__value--success {
  color: var(--success);
}

.diff-count__value--warning {
  color: var(--warning);
}

.diff-count__value--danger {
  color: var(--danger);
}

.diff-count__label {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.rule-diff-download {
  width: 100%;
  margin-top: 14px;
}

.data-table .cell-wrap {
  min-width: 180px;
  max-width: 330px;
  line-height: 1.45;
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.table-toolbar__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.field {
  position: relative;
  display: flex;
  align-items: center;
}

.field svg {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: #8b96a2;
  pointer-events: none;
}

.field input,
.select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.field input {
  width: 220px;
  padding: 6px 10px 6px 31px;
}

.select {
  padding: 6px 28px 6px 9px;
}

.field input::placeholder {
  color: var(--muted);
}

.field input:hover,
.select:hover {
  border-color: var(--line-strong);
}

.field input:focus,
.select:focus {
  border-color: var(--brand);
  outline: 2px solid rgba(192, 0, 0, 0.12);
  outline-offset: 0;
}

.text-link,
.action-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.text-link {
  padding: 0;
}

.action-link {
  padding: 4px 5px;
  border-radius: 4px;
}

.action-link:hover,
.text-link:hover {
  background: var(--brand-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.action-link svg,
.text-link svg {
  width: 13px;
  height: 13px;
}

.action-link--muted {
  color: var(--muted);
}

.demo-action-tag {
  display: inline-flex;
  min-height: 15px;
  align-items: center;
  margin-left: 1px;
  padding: 0 4px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0.65;
  white-space: nowrap;
}

.action-link .demo-action-tag {
  padding: 0 3px;
  font-size: 8px;
}

.next-action {
  padding: 17px 17px 16px;
}

.next-action__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.next-action__title {
  margin-top: 9px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.35;
}

.next-action__description {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.next-action__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.deadline-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 0 17px 16px;
  padding: 11px 12px;
  border-radius: 6px;
  background: var(--surface-soft);
}

.deadline-box__label {
  color: var(--muted);
  font-size: 11px;
}

.deadline-box__value {
  margin-top: 1px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.deadline-box__days {
  color: var(--warning);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 650;
  line-height: 1;
  text-align: right;
}

.deadline-box__days small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
}

.activity-list {
  margin: 0;
  padding: 4px 16px 8px;
  list-style: none;
}

.state-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.65;
  list-style: none;
}

.state-flow li {
  white-space: nowrap;
}

.state-flow li:not(:last-child)::after {
  margin: 0 5px;
  color: var(--muted);
  font-family: var(--font-sans);
  content: "→";
}

.state-flow__branch {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.state-flow__branch strong {
  display: inline-block;
  margin-right: 7px;
  color: var(--danger);
}

.activity-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 0;
}

.activity-item > div {
  min-width: 0;
  flex: 1 1 auto;
}

.activity-item:not(:last-child)::before {
  position: absolute;
  top: 27px;
  bottom: -2px;
  left: 5px;
  width: 1px;
  background: var(--line);
  content: "";
}

.activity-item__dot {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  margin-top: 3px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #8c98a5;
  box-shadow: 0 0 0 1px var(--line-strong);
}

.activity-item--success .activity-item__dot {
  background: var(--success);
}

.activity-item--active .activity-item__dot {
  background: var(--info);
}

.activity-item--warning .activity-item__dot {
  background: var(--warning);
}

.activity-item__title {
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.activity-item__meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.bar-list {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 5px 12px;
}

.bar-row__label {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.bar-row__label small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
}

.bar-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f3;
}

.bar-row .bar-track {
  grid-column: 1 / -1;
  grid-row: 2;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.bar-fill--info {
  background: var(--info);
}

.bar-fill--success {
  background: var(--success);
}

.bar-fill--warning {
  background: #c77620;
}

.bar-fill--danger {
  background: var(--danger);
}

.bar-row__value {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  min-width: 48px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
  line-height: 1.45;
}

.progress-rows {
  display: grid;
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 5px 14px;
  padding: 12px 16px;
  border-bottom: 1px solid #edf0f3;
}

.progress-row:last-child {
  border-bottom: 0;
}

.progress-row__name {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.progress-row__name small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
}

.progress-row .bar-track {
  grid-column: 1 / -1;
  grid-row: 2;
}

.progress-row__value {
  grid-row: 1;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
  line-height: 1.45;
}

.progress-row__value--rate {
  grid-column: 2;
}

.progress-row__value--state {
  grid-column: 3;
}

.tabs {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  min-height: 30px;
  padding: 5px 11px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line);
}

.tab-panel[hidden] {
  display: none;
}

.precheck-rules__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.precheck-rules__bar .tabs {
  min-width: 0;
}

.precheck-rules__toggle {
  min-width: 72px;
}

.precheck-rules__chevron {
  display: inline-flex;
}

.precheck-rules__chevron svg {
  width: 14px;
  height: 14px;
  transition: transform 160ms ease;
}

.precheck-rules.is-collapsed .precheck-rules__chevron svg {
  transform: rotate(-90deg);
}

.precheck-rules.is-collapsed .panel__header {
  border-bottom: 0;
}

.precheck-rules__body[hidden] {
  display: none;
}

.precheck-rules__legend {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.rule-key {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.rule-key--brand {
  background: var(--brand);
}

.rule-key--warning {
  margin-left: 6px;
  background: var(--warning);
}

.precheck-rules__hint {
  color: var(--muted);
  font-size: 11px;
}

.check-rule-table {
  min-width: 980px;
}

.enum-rule-table {
  min-width: 980px;
}

.check-rule-table td,
.enum-rule-table td {
  vertical-align: top;
}

.rule-field {
  display: grid;
  min-width: 176px;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1px 7px;
  align-items: start;
}

.rule-field__column {
  grid-row: 1 / span 2;
  min-width: 22px;
  margin-top: 1px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--neutral-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
}

.rule-field strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.rule-field small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.rule-value-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.rule-value-list span {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.55;
  white-space: nowrap;
}

.precheck-rules__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.precheck-rules__note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.quality-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--line);
}

.quality-summary__item {
  padding: 13px 16px;
  background: var(--surface);
}

.quality-summary__label {
  color: var(--muted);
  font-size: 11px;
}

.quality-summary__value {
  margin-top: 2px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
}

.notice svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--info);
}

.notice strong {
  color: var(--ink);
  font-weight: 650;
}

.notice--warning {
  border-color: #ead8b7;
  background: var(--warning-soft);
}

.notice--warning svg {
  color: var(--warning);
}

.notice--danger {
  border-color: #eac7c3;
  background: var(--danger-soft);
}

.notice--danger svg {
  color: var(--danger);
}

.upload-zone {
  display: grid;
  place-items: center;
  min-height: 186px;
  padding: 26px;
  border: 1px dashed #bfc8d1;
  border-radius: var(--radius);
  background: var(--surface-soft);
  text-align: center;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.upload-zone:hover,
.upload-zone.is-dragging {
  border-color: var(--brand);
  background: #fffafa;
}

.upload-zone__icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0 auto 11px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand);
}

.upload-zone__icon svg {
  width: 21px;
  height: 21px;
}

.upload-zone__title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.upload-zone__hint {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.upload-zone__button {
  margin-top: 12px;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.receipt {
  display: none;
  margin-top: 15px;
  padding: 14px;
  border: 1px solid #cfe3d8;
  border-radius: var(--radius);
  background: #f7fbf8;
}

.receipt.is-visible {
  display: block;
}

.receipt__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.receipt__title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.receipt__title svg {
  color: var(--success);
}

.receipt__filename {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  word-break: break-all;
}

.receipt-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
}

.receipt-grid__item {
  padding-top: 8px;
  border-top: 1px solid #dfeae4;
}

.receipt-grid__label {
  color: var(--muted);
  font-size: 11px;
}

.receipt-grid__value {
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.upload-step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
}

.upload-step__index {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.upload-step--active .upload-step__index {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.upload-step--complete .upload-step__index {
  border-color: #a9d2bf;
  background: var(--success-soft);
  color: var(--success);
}

.upload-step__title {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.upload-step__meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.definition-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.definition-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #edf0f3;
  font-size: 12px;
}

.definition-row:last-child {
  border-bottom: 0;
}

.definition-row dt {
  color: var(--muted);
}

.definition-row dd {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.metric-inline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #edf0f3;
}

.metric-inline:last-child {
  border-bottom: 0;
}

.metric-inline__label {
  color: var(--muted);
  font-size: 11px;
}

.metric-inline__value {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}

.empty-state {
  display: grid;
  min-height: 170px;
  padding: 28px;
  place-items: center;
  text-align: center;
}

.empty-state__icon {
  display: grid;
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
}

.empty-state__title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.empty-state__text {
  max-width: 360px;
  margin: 4px auto 0;
  color: var(--muted);
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.modal {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-float);
}

.modal::backdrop {
  background: rgba(19, 26, 34, 0.52);
}

.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.modal__header h2 {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.modal__header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
}

.role-modal {
  width: min(640px, calc(100vw - 32px));
}

.role-options {
  padding: 8px 10px;
}

.role-option {
  display: grid;
  width: 100%;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}

.role-option:hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.role-option[aria-current="true"] {
  border-color: #e1b8bb;
  background: var(--brand-soft);
}

.role-option__mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
}

.role-option__name {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.role-option__org {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.role-option__scope {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}

.confirm-body {
  padding: 18px 20px;
}

.confirm-body p {
  color: var(--text);
  font-size: 12px;
  line-height: 1.65;
}

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  padding: 12px 13px;
  border: 1px solid #38434f;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 30px rgba(24, 33, 43, 0.22);
  font-size: 12px;
  line-height: 1.5;
  pointer-events: auto;
  animation: toast-in 180ms ease-out;
}

.toast svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: #f4b8b8;
}

.toast strong {
  display: block;
  margin-bottom: 1px;
  font-size: 12px;
  font-weight: 650;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-scrim {
  display: none;
}

.noscript {
  position: fixed;
  inset: 20px;
  z-index: 200;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.login-shell {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, 0.88fr);
  background: var(--canvas);
}

.login-aside {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 28px;
  padding: 30px 38px 26px;
  background: var(--nav);
  color: var(--nav-text);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.login-intro {
  width: min(100%, 560px);
  margin: auto 0;
}

.login-intro h1 {
  color: #fff;
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.login-intro p {
  max-width: 52ch;
  margin-top: 14px;
  color: #c7cfd8;
  font-size: 14px;
  line-height: 1.7;
}

.login-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.login-role {
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #d7dee5;
  font-size: 11px;
  font-weight: 600;
}

.login-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 28px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.login-context > div {
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.035);
}

.login-context dt {
  color: #95a0ac;
  font-size: 11px;
}

.login-context dd {
  margin: 3px 0 0;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.login-aside__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #95a0ac;
  font-size: 11px;
}

.login-main {
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-card {
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.login-card__head h2 {
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.login-card__head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.login-label {
  display: block;
  margin: 24px 0 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.login-password {
  position: relative;
}

.login-password input {
  width: 100%;
  height: 44px;
  padding: 9px 46px 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}

.login-password input:hover {
  border-color: var(--line-strong);
}

.login-password input:focus {
  border-color: var(--brand);
  outline: 2px solid rgba(192, 0, 0, 0.12);
  outline-offset: 0;
}

.login-password input[aria-invalid="true"] {
  border-color: var(--danger);
}

.login-password__toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
}

.login-password__toggle:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.login-password__toggle svg {
  width: 16px;
  height: 16px;
}

.login-error {
  margin-top: 7px;
  color: var(--danger);
  font-size: 12px;
}

.login-submit {
  width: 100%;
  min-height: 42px;
  margin-top: 16px;
}

.login-submit svg {
  width: 15px;
  height: 15px;
}

.login-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.login-deck-link {
  display: block;
  width: fit-content;
  margin: 10px auto 0;
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(192, 0, 0, 0.32);
  text-underline-offset: 3px;
}

.login-deck-link:hover {
  color: var(--brand-strong);
  text-decoration-color: currentColor;
}

.modal__footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.inline-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
}

.account-subject {
  min-width: 150px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.tab-body {
  padding: 16px;
}

.subsection,
.side-block {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.tab-panel > .notice {
  margin: 14px 14px 0;
}

.version-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.version-chip strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 650;
}

.upload-type-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
  margin-bottom: 14px;
}

.upload-type-row .form-field {
  width: min(280px, 100%);
}

.upload-type-row .muted {
  flex: 1 1 260px;
  padding-bottom: 7px;
  font-size: 11px;
  line-height: 1.5;
}

.form-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.record-modal {
  width: min(980px, calc(100vw - 32px));
}

.record-content {
  padding: 18px 20px 20px;
}

.record-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.record-summary__eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.record-summary__title {
  margin-top: 3px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.record-summary__meta {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
}

.record-summary__states {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.record-tabs {
  width: fit-content;
  margin: 16px 0 0;
}

.record-tab-panel {
  padding-top: 16px;
}

.record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 22px;
}

.record-section + .record-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.record-section h3,
.form-section h3 {
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.record-section .notice {
  margin-top: 14px;
}

.record-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.record-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #edf0f3;
  color: var(--text);
  font-size: 12px;
}

.record-list li:last-child {
  border-bottom: 0;
}

.record-list svg {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--success);
}

.record-table-wrap {
  margin-top: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.record-form {
  display: grid;
  gap: 20px;
}

.form-section + .form-section {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.form-section__head {
  margin-bottom: 12px;
}

.form-section__head h3 {
  margin-bottom: 2px;
}

.form-section__head p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 16px;
}

.form-field {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.form-field--wide {
  grid-column: 1 / -1;
}

.form-field input,
.form-field select {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--brand);
  outline: 2px solid rgba(192, 0, 0, 0.12);
  outline-offset: 0;
}

.form-field input[readonly] {
  background: var(--surface-soft);
  color: var(--muted);
}

.form-field small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
}

.form-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
}

.form-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 12px;
}

.form-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

@media (max-width: 1280px) {
  .page {
    padding-right: 22px;
    padding-left: 22px;
  }

  .content-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.72fr);
  }
}

@media (max-width: 1120px) {
  .sidebar {
    width: 252px;
    transform: translateX(-100%);
    transition: transform 200ms ease;
  }

  .nav-open .sidebar {
    transform: translateX(0);
  }

  .nav-open .nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    border: 0;
    background: rgba(19, 26, 34, 0.48);
  }

  .workspace {
    margin-left: 0;
  }

  .icon-button.mobile-menu-button {
    display: inline-grid;
  }

  .icon-button.navigation-close {
    display: inline-grid;
  }

  .content-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.7fr);
    gap: 16px;
  }

  .metric {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (max-width: 960px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-aside {
    gap: 20px;
    padding: 22px 20px 24px;
  }

  .login-intro {
    margin: 18px 0 0;
  }

  .login-intro h1 {
    font-size: 28px;
  }

  .login-aside__footer {
    display: none;
  }

  .login-main {
    place-items: start center;
    padding: 24px 16px 40px;
  }
}

@media (max-width: 920px) {
  .topbar {
    padding: 0 16px;
  }

  .breadcrumb {
    display: none;
  }

  .period-chip__meta,
  .identity-button__body {
    display: none;
  }

  .identity-button {
    padding-right: 6px;
  }

  .content-grid,
  .content-grid--balanced {
    grid-template-columns: minmax(0, 1fr);
  }

  .ledger-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric:nth-child(2)::after {
    display: none;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .period-spine {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 18px;
  }

  .spine-step:nth-child(2n)::after {
    display: none;
  }

  .spine-step:nth-child(-n + 2) {
    padding-bottom: 2px;
  }

  .quality-summary {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    overflow-x: auto;
  }

  .receipt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 58px;
    padding: 0 12px;
  }

  .topbar__right {
    gap: 5px;
  }

  .demo-badge {
    display: none;
  }

  .period-chip {
    padding-right: 8px;
  }

  .period-chip__body {
    display: none;
  }

  .page {
    padding: 20px 14px 34px;
  }

  .page-head {
    display: grid;
    gap: 14px;
  }

  .page-actions {
    justify-content: flex-start;
  }

  .page-head h1 {
    font-size: 21px;
  }

  .quality-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
  }

  .quality-summary__item:last-child {
    grid-column: 1 / -1;
  }

  .ledger-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .metric {
    padding: 13px 15px;
  }

  .metric:not(:last-child)::after {
    top: auto;
    right: 15px;
    bottom: 0;
    left: 15px;
    width: auto;
    height: 1px;
  }

  .metric:nth-child(2)::after {
    display: block;
  }

  .metric__value {
    font-size: 21px;
  }

  .period-spine {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
    row-gap: 15px;
  }

  .spine-step {
    padding-right: 0;
  }

  .spine-step__top {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .spine-step__title {
    margin-top: 0;
  }

  .spine-step::after {
    display: none;
  }

  .spine-step__meta {
    margin-top: 3px;
  }

  .panel__header {
    align-items: flex-start;
  }

  .precheck-rules__bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
  }

  .precheck-rules__bar .tabs {
    width: 100%;
  }

  .precheck-rules__legend {
    display: none;
  }

  .check-rule-table th:first-child,
  .check-rule-table td:first-child,
  .enum-rule-table th:first-child,
  .enum-rule-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--surface);
    box-shadow: 1px 0 0 var(--line);
  }

  .check-rule-table thead th:first-child,
  .enum-rule-table thead th:first-child {
    z-index: 4;
    background: var(--surface-soft);
  }

  .panel__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .progress-row {
    gap: 5px 10px;
    padding: 12px 14px;
  }

  .bar-row {
    gap: 5px 10px;
  }

  .table-toolbar {
    align-items: stretch;
  }

  .field,
  .field input {
    width: 100%;
  }

  .modal {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .modal__header,
  .modal__footer {
    padding-right: 14px;
    padding-left: 14px;
  }

  .record-content {
    padding: 14px;
  }

  .record-summary {
    flex-direction: column;
    gap: 10px;
  }

  .record-summary__states {
    justify-content: flex-start;
  }

  .record-grid,
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-field--wide {
    grid-column: auto;
  }

  .record-tabs {
    width: 100%;
  }

  .upload-type-row .muted {
    padding-bottom: 0;
  }

  [id^="panel-user-"] .data-table,
  [id^="panel-product-"] .data-table {
    min-width: 860px;
  }

  .role-option {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .role-option__scope {
    display: none;
  }

  .toast-region {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }
}

@media (max-width: 480px) {
  .identity-button__avatar {
    width: 28px;
    height: 28px;
  }

  .topbar__left {
    gap: 4px;
  }

  .receipt-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-card {
    padding: 22px;
  }

  .login-intro h1 {
    font-size: 25px;
  }

  .login-context dd {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
