:root {
  color-scheme: light;
  --primary: #155d92;
  --primary-strong: #0b4670;
  --primary-bright: #2a86c9;
  --primary-soft: #e6f0f8;
  --primary-pale: #f2f7fb;
  --ink: #152431;
  --ink-secondary: #54687a;
  --ink-muted: #8a98a5;
  --border: #d9e3ea;
  --border-light: #e7eef3;
  --page: #eef2f6;
  --surface: #ffffff;
  --success: #1f7a5c;
  --success-soft: #e7f4ef;
  --warning: #c66b17;
  --warning-soft: #f7ecdd;
  --error: #c1372e;
  --error-soft: #f6ded9;
  --shadow: 0 4px 14px rgb(16 42 67 / 7%);
  --din: "DIN Alternate", "D-DIN", "Bahnschrift", -apple-system, BlinkMacSystemFont, sans-serif;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #dfe5e9;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
tr[data-route]:focus-visible {
  outline: 3px solid rgb(42 134 201 / 30%);
  outline-offset: 1px;
}

button svg,
a svg {
  pointer-events: none;
}

.browser-stage {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 12px;
}

.mini-program {
  position: relative;
  width: min(430px, 100vw);
  height: min(932px, calc(100dvh - 24px));
  overflow: hidden;
  background: var(--page);
  box-shadow: 0 18px 60px rgb(16 42 67 / 24%), 0 0 0 1px rgb(16 42 67 / 9%);
}

#app {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

#app::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.page {
  min-height: 100%;
  background: var(--page);
}

.page--tab {
  padding-bottom: 108px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.icon--sm {
  width: 16px;
  height: 16px;
}

.icon-tap {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
}

.hero {
  min-height: 178px;
  padding: 44px 18px 17px;
  background: linear-gradient(150deg, #0c4a79 0%, #155d92 55%, #1a6aa8 100%);
  color: #fff;
}

.hero__safe {
  display: flex;
  height: 42px;
  align-items: center;
}

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

.hero__copy {
  min-width: 0;
  flex: 1;
}

.hero__eyebrow {
  overflow: hidden;
  color: rgb(255 255 255 / 72%);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero h1 {
  margin: 4px 0 0;
  overflow: hidden;
  font-size: 19px;
  font-weight: 750;
  line-height: 1.32;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero p {
  margin: 4px 0 0;
  overflow: hidden;
  color: rgb(255 255 255 / 84%);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero__actions {
  display: flex;
  flex: none;
  gap: 10px;
}

.hero__icon {
  display: flex;
  width: 43px;
  height: 43px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 8px;
  background: rgb(255 255 255 / 15%);
  color: #fff;
}

.hero__icon .icon {
  width: 22px;
  height: 22px;
}

.hero--detail {
  min-height: 161px;
}

.hero__back {
  width: 34px;
  margin-left: -9px;
  color: #fff;
}

.sub-head {
  padding: 48px 18px 12px;
  background: var(--page);
}

.sub-head__back {
  width: 34px;
  height: 40px;
  margin-left: -9px;
  color: #263c4b;
}

.sub-head h1 {
  margin: 5px 0 0;
  font-size: 20px;
  font-weight: 750;
  line-height: 1.35;
}

.sub-head p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabbar {
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  height: 108px;
  padding: 10px 30px max(13px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-light);
  background: rgb(255 255 255 / 97%);
  box-shadow: 0 -3px 10px rgb(21 54 78 / 5%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tabbar__item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding-top: 4px;
  color: #98a7b2;
  font-size: 11px;
  font-weight: 600;
}

.tabbar__item .icon {
  width: 23px;
  height: 23px;
}

.tabbar__item.is-active {
  color: var(--primary);
}

.control-bar {
  margin: 15px 18px 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 4px rgb(16 42 67 / 5%);
}

.control-bar__row {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 5px;
}

.segmented {
  display: grid;
  overflow: hidden;
  padding: 3px;
  border-radius: 8px;
  background: #edf1f4;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmented button {
  min-width: 46px;
  height: 32px;
  border-radius: 6px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
}

.segmented button.is-active {
  background: #fff;
  box-shadow: 0 1px 4px rgb(16 42 67 / 8%);
  color: var(--primary);
}

.segmented--compact {
  flex: none;
}

.date-control {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #283b49;
  font-family: var(--din);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.date-control .icon {
  display: none;
}

.date-control span {
  max-width: 190px;
}

.date-control input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

.scope-select,
.filter-select {
  position: relative;
  display: flex;
  height: 38px;
  flex: none;
  align-items: center;
  border-radius: 8px;
  background: var(--primary-pale);
  color: var(--primary);
}

.scope-select {
  width: 92px;
}

.scope-select select,
.filter-select select {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 28px 0 10px;
  outline: 0;
  appearance: none;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.scope-select .icon,
.filter-select .icon {
  position: absolute;
  right: 7px;
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.freshness {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  padding: 7px 18px 4px;
  color: var(--ink-muted);
  font-size: 10.5px;
}

.freshness__dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #17906a;
  box-shadow: 0 0 0 3px rgb(23 144 106 / 10%);
}

.freshness button {
  display: inline-flex;
  height: 28px;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.freshness button .icon {
  width: 15px;
  height: 15px;
}

.freshness button.is-spinning .icon {
  animation: spin 400ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.content-stack {
  display: grid;
  gap: 14px;
  padding: 0 18px 24px;
}

.card,
.home-kpis,
.compare-card,
.face-card,
.cycle-card,
.process-row,
.report-card,
.sample-ledger,
.ready-card,
.flat-metrics {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card {
  overflow: hidden;
}

.card-head {
  display: flex;
  min-height: 45px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-light);
}

.card-head__title {
  min-width: 0;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.card-head__meta {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-link {
  display: inline-flex;
  min-height: 34px;
  flex: none;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.card-link .icon {
  width: 15px;
  height: 15px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 0 14px;
  border-top: 1px solid var(--border-light);
  color: var(--ink-muted);
  font-size: 9.5px;
}

.tag {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border: 0;
  border-radius: 999px;
  background: #edf1f4;
  color: var(--ink-secondary);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.2;
}

.tag--primary { background: var(--primary-soft); color: var(--primary); }
.tag--success { background: var(--success-soft); color: var(--success); }
.tag--warning { background: var(--warning-soft); color: var(--warning); }
.tag--error { background: var(--error-soft); color: var(--error); }
.text-primary { color: var(--primary) !important; }
.text-warning { color: var(--warning) !important; }
.text-error { color: var(--error) !important; }

.home-kpis {
  display: grid;
  overflow: hidden;
  padding: 0;
  text-align: left;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-kpi {
  min-height: 84px;
  padding: 17px 14px;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.home-kpi:nth-child(2n) { border-right: 0; }
.home-kpi:nth-last-child(-n + 2) { border-bottom: 0; }

.home-kpi small {
  display: block;
  color: var(--ink-muted);
  font-size: 10.5px;
}

.home-kpi strong {
  display: block;
  margin-top: 7px;
  font-family: var(--din);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1.05;
}

.home-kpi--primary {
  background: var(--primary-pale);
}

.home-kpi--primary strong {
  color: #1873ad;
}

.rank-row {
  display: grid;
  width: 100%;
  min-height: 60px;
  grid-template-columns: 24px minmax(0, 1fr) auto 17px;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-top: 1px solid var(--border-light);
  text-align: left;
}

.rank-row:first-child { border-top: 0; }

.rank-no {
  color: #7a98ad;
  font-family: var(--din);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.rank-copy,
.rank-copy strong,
.rank-copy small {
  display: block;
  min-width: 0;
}

.rank-copy strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy small {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 9px;
}

.rank-value {
  font-family: var(--din);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.rank-row > .icon {
  width: 15px;
  color: #a4b1bb;
}

.sample-ledger {
  display: grid;
  overflow: hidden;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sample-ledger > div {
  padding: 12px 8px;
  border-left: 1px solid var(--border-light);
  text-align: center;
}

.sample-ledger > div:first-child { border-left: 0; }

.sample-ledger span,
.sample-ledger strong {
  display: block;
}

.sample-ledger span { color: var(--ink-muted); font-size: 9.5px; }
.sample-ledger strong { margin-top: 4px; font-family: var(--din); font-size: 14px; }

.sample-ledger--compact {
  border: 0;
  border-radius: 8px;
  background: var(--primary-pale);
  box-shadow: none;
}

.data-state {
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
  color: var(--ink-muted);
  text-align: center;
}

.data-state .icon {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
}

.data-state strong { color: var(--ink); font-size: 14px; }
.data-state p { margin: 6px 0 0; font-size: 11px; line-height: 1.5; }

.list-end,
.count-line {
  color: var(--ink-muted);
  font-size: 10.5px;
  text-align: center;
}

.count-line {
  display: flex;
  justify-content: space-between;
  text-align: left;
}

.progress-table {
  overflow-x: auto;
  margin-top: 4px;
  background: #fff;
  scrollbar-width: thin;
}

.progress-table table {
  width: 690px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 10.5px;
}

.progress-table th,
.progress-table td {
  min-height: 50px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-light);
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.progress-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f8fa;
  color: var(--ink-muted);
  font-size: 9.5px;
}

.progress-table th:first-child,
.progress-table td:first-child {
  position: sticky;
  left: 0;
  width: 142px;
  background: #fff;
  box-shadow: 1px 0 var(--border-light);
  text-align: left;
}

.progress-table th:first-child { z-index: 3; background: #f5f8fa; }
.progress-table td span,
.progress-table td strong { display: block; }
.progress-table td span { color: var(--ink-muted); font-size: 8.5px; }
.progress-table td strong { margin-top: 2px; color: var(--ink); font-size: 11px; }
.progress-table .primary-cell { color: var(--primary); font-weight: 700; }

.viewseg {
  display: grid;
  margin: 12px 18px 0;
  padding: 3px;
  border-radius: 8px;
  background: #e8edf1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.viewseg--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.viewseg button {
  height: 36px;
  border-radius: 6px;
  color: #70818f;
  font-size: 12px;
  font-weight: 700;
}

.viewseg button.is-active {
  background: #fff;
  box-shadow: 0 1px 4px rgb(16 42 67 / 7%);
  color: var(--primary);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 12px 18px 2px;
}

.filter-select {
  width: auto;
  max-width: 155px;
  border: 1px solid #c9deeb;
  background: var(--primary-soft);
}

.filter-chip {
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-secondary);
  font-size: 10.5px;
  font-weight: 700;
}

.filter-chip .icon { width: 15px; height: 15px; }

.compare-card {
  display: block;
  width: 100%;
  padding: 13px;
  text-align: left;
}

.compare-card__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 8px;
}

.compare-card__head > span,
.compare-card__head strong,
.compare-card__head small { display: block; min-width: 0; }
.compare-card__head > span > strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.compare-card__head small { margin-top: 3px; color: var(--ink-muted); font-size: 9.5px; }
.compare-card__head em { color: var(--primary); font-family: var(--din); font-size: 17px; font-style: normal; font-weight: 750; text-align: right; }
.compare-card__head em small { color: var(--ink-muted); font-family: inherit; font-size: 9px; font-weight: 500; }
.compare-card__head .icon { width: 15px; color: #a7b2ba; }
.compare-standard { display: block; margin: 10px 0 8px; padding-top: 8px; border-top: 1px solid var(--border-light); color: var(--ink-secondary); font-size: 10px; }

.face-stack { padding-top: 1px; }

.face-card {
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  text-align: left;
}

.face-card__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px 11px;
}

.face-card__icon {
  display: flex;
  width: 43px;
  height: 43px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}

.face-card__icon .icon { width: 25px; height: 25px; }

.face-card__identity {
  min-width: 0;
  flex: 1;
}

.face-card__identity small,
.face-card__identity strong,
.face-card__identity em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.face-card__identity small { color: var(--ink-muted); font-size: 9px; }
.face-card__identity strong { margin-top: 2px; font-size: 13px; }
.face-card__identity em { display: flex; align-items: center; gap: 3px; margin-top: 4px; color: var(--ink-secondary); font-size: 9px; font-style: normal; }
.face-card__identity em .icon { width: 11px; height: 11px; }
.face-card__tags { display: flex; flex: none; flex-direction: column; align-items: flex-end; gap: 5px; }
.face-divider { display: block; margin: 0 14px; padding-top: 5px; border-top: 1px solid var(--border-light); color: var(--ink-muted); font-size: 8.5px; }

.face-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.face-metrics > span {
  min-width: 0;
  padding: 7px 14px 10px;
  border-left: 1px solid var(--border-light);
}

.face-metrics > span:first-child { border-left: 0; }
.face-metrics small,
.face-metrics strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.face-metrics small { color: var(--ink-muted); font-size: 8.5px; }
.face-metrics strong { margin-top: 4px; font-family: var(--din); font-size: 13px; }

.face-card__foot {
  display: flex;
  height: 39px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: var(--primary-pale);
  color: var(--primary);
  font-size: 10.5px;
  font-weight: 700;
}

.face-card__foot .icon { width: 15px; height: 15px; }

.feature-card {
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(120deg, #0d4e80, #1a6aa8);
  box-shadow: 0 8px 20px rgb(21 93 146 / 20%);
  color: #fff;
}

.feature-card > small { color: rgb(255 255 255 / 75%); font-size: 10px; }
.feature-card > strong { display: block; margin-top: 4px; font-family: var(--din); font-size: 34px; line-height: 1.1; }
.feature-card > div { display: flex; gap: 18px; margin-top: 17px; padding-top: 10px; border-top: 1px solid rgb(255 255 255 / 20%); color: rgb(255 255 255 / 78%); font-size: 9.5px; }
.feature-card b { margin-left: 3px; color: #fff; }

.cycle-kpis {
  display: grid;
  padding: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cycle-kpis > span {
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--primary-pale);
}

.cycle-kpis small,
.cycle-kpis strong,
.cycle-kpis em { display: block; }
.cycle-kpis small { color: var(--ink-muted); font-size: 9px; }
.cycle-kpis strong { margin-top: 4px; font-family: var(--din); font-size: 20px; }
.cycle-kpis em { margin-top: 2px; color: var(--success); font-size: 8.5px; font-style: normal; }

.trend-chart { padding: 12px 14px 8px; }
.trend-chart svg { display: block; width: 100%; height: 132px; overflow: visible; }
.trend-chart svg path { stroke: var(--border-light); stroke-width: 1; }
.trend-chart polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }
.trend-chart .trend-actual { stroke: var(--primary); }
.trend-chart .trend-standard { stroke: #aebac6; stroke-dasharray: 3 4; stroke-width: 1.5; }
.trend-chart circle { fill: #fff; stroke: var(--primary); stroke-width: 2; }
.trend-labels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); color: var(--ink-muted); font-size: 7.5px; text-align: center; }
.trend-legend { display: flex; gap: 18px; margin-top: 10px; color: var(--ink-secondary); font-size: 8.5px; }
.trend-legend span { display: flex; align-items: center; gap: 5px; }
.trend-legend i { width: 13px; height: 2px; background: var(--primary); }
.trend-legend span:last-child i { height: 1px; background: #aebac6; }

.cycle-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 4px;
  border-top: 1px solid var(--border-light);
}

.cycle-preview-head > span strong,
.cycle-preview-head > span small { display: block; }
.cycle-preview-head strong { font-size: 11px; }
.cycle-preview-head small { margin-top: 2px; color: var(--ink-muted); font-size: 8px; }

.cycle-preview-row,
.entry-row {
  display: grid;
  width: 100%;
  min-height: 54px;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-top: 1px solid var(--border-light);
  text-align: left;
}

.cycle-preview-row { grid-template-columns: minmax(0, 1fr) 50px 50px 14px; }
.cycle-preview-row span,
.cycle-preview-row strong,
.cycle-preview-row small { display: block; min-width: 0; }
.cycle-preview-row strong { overflow: hidden; font-family: var(--din); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.cycle-preview-row small { margin-bottom: 2px; color: var(--ink-muted); font-size: 8px; }
.cycle-preview-row .icon { width: 14px; color: #9daab4; }

.entry-row { grid-template-columns: minmax(0, 1fr) 16px; }
.entry-row span,
.entry-row strong,
.entry-row small { display: block; }
.entry-row strong { font-size: 11px; }
.entry-row small { margin-top: 3px; color: var(--ink-muted); font-size: 8.5px; }
.entry-row .icon { width: 15px; color: #a1adb5; }

.period-basis {
  padding: 7px 18px 0;
  color: var(--ink-muted);
  font-size: 9.5px;
}

.cycle-card {
  display: block;
  width: 100%;
  overflow: hidden;
  text-align: left;
}

.cycle-card__head {
  display: flex;
  min-height: 47px;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
}

.cycle-card__head > strong { min-width: 0; flex: 1; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.cycle-card__head > .icon { width: 15px; color: #9facb5; }
.cycle-result { display: flex; align-items: center; justify-content: space-between; margin: 0 14px; padding: 7px 9px; border-radius: 8px; background: var(--success-soft); color: var(--success); font-size: 9px; }
.cycle-result em { font-style: normal; }
.cycle-times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px 14px; color: var(--ink-muted); font-size: 8.5px; }
.cycle-times b { margin-left: 4px; color: var(--ink-secondary); font-weight: 600; }
.cycle-stats { display: grid; background: var(--primary-pale); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cycle-stats > span { min-height: 56px; padding: 9px 12px; border-left: 1px solid var(--border-light); border-top: 1px solid var(--border-light); text-align: center; }
.cycle-stats > span:nth-child(odd) { border-left: 0; }
.cycle-stats small,
.cycle-stats strong { display: block; }
.cycle-stats small { color: var(--ink-muted); font-size: 8.5px; }
.cycle-stats strong { margin-top: 3px; font-family: var(--din); font-size: 12px; }

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

.flat-metrics > span { min-height: 72px; padding: 13px; border-left: 1px solid var(--border-light); border-top: 1px solid var(--border-light); }
.flat-metrics > span:nth-child(odd) { border-left: 0; }
.flat-metrics > span:nth-child(-n + 2) { border-top: 0; }
.flat-metrics small,
.flat-metrics strong { display: block; }
.flat-metrics small { color: var(--ink-muted); font-size: 9px; }
.flat-metrics strong { margin-top: 7px; font-family: var(--din); font-size: 20px; }

.timeline { padding: 7px 14px 15px; }

.transition-row {
  margin: 4px 0 6px 28px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #edf2f5;
  color: var(--ink-secondary);
}

.transition-row span,
.transition-row small { display: block; }
.transition-row span { font-size: 9.5px; font-weight: 700; }
.transition-row small { margin-top: 2px; font-size: 7.5px; }

.timeline-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
}

.timeline-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.timeline-rail::after {
  position: absolute;
  top: 18px;
  bottom: -13px;
  width: 1px;
  background: #c8d7e1;
  content: "";
}

.timeline-item:last-child .timeline-rail::after { display: none; }
.timeline-rail i { position: relative; z-index: 1; width: 9px; height: 9px; margin-top: 13px; border: 2px solid var(--primary-bright); border-radius: 50%; background: #fff; }
.timeline-copy { padding: 9px 0 16px; }
.timeline-copy > small { display: block; margin-top: 3px; color: var(--ink-muted); font-size: 8px; }
.timeline-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.timeline-head strong { font-size: 11px; }
.timeline-metrics { display: grid; margin-top: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.timeline-metrics b { color: var(--ink-secondary); font-family: var(--din); font-size: 9px; font-weight: 650; }

.anomaly-card .card-head .tag { margin-left: auto; }
.anomaly-card .card-head .tag .icon { width: 12px; height: 12px; margin-left: 4px; }
.evidence-item { margin: 12px 14px; padding: 11px; border: 1px solid #f0d6d2; border-radius: 8px; background: #fffafa; }
.evidence-item > strong { color: var(--error); font-size: 11px; }
.evidence-item p { display: grid; margin: 7px 0 0; color: var(--ink-secondary); font-size: 8.5px; line-height: 1.45; grid-template-columns: 62px minmax(0, 1fr); }
.evidence-item p span { color: var(--ink-muted); }

.rock-tabs {
  display: grid;
  margin: 10px 18px 0;
  border-bottom: 1px solid var(--border);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rock-tabs button { height: 38px; color: var(--ink-secondary); font-size: 11px; font-weight: 700; }
.rock-tabs button.is-active { border-bottom: 2px solid var(--primary-bright); color: var(--primary); }

.process-row {
  display: grid;
  width: 100%;
  min-height: 92px;
  grid-template-columns: minmax(0, 1fr) 93px 15px;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  text-align: left;
}

.process-row__copy,
.process-row__copy > span,
.process-row__copy strong,
.process-row__copy small { display: block; min-width: 0; }
.process-row__copy > span { display: flex; align-items: center; gap: 6px; }
.process-row__copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.process-row__copy small { margin-top: 5px; color: var(--ink-muted); font-size: 8.5px; line-height: 1.4; }
.process-row__value { text-align: right; }
.process-row__value strong,
.process-row__value small,
.process-row__value em { display: block; }
.process-row__value strong { color: var(--warning); font-family: var(--din); font-size: 17px; }
.process-row__value small { color: var(--ink-muted); font-size: 8.5px; }
.process-row__value em { margin-top: 4px; color: var(--ink-secondary); font-size: 8px; font-style: normal; }
.process-row > .icon { width: 15px; color: #a1adb5; }

.report-period {
  padding: 12px 18px 2px;
}

.report-period label {
  position: relative;
  display: flex;
  height: 41px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-secondary);
}

.report-period select { min-width: 0; flex: 1; height: 100%; appearance: none; text-align: center; font-size: 11px; font-weight: 700; outline: 0; }
.report-period .icon { width: 16px; height: 16px; color: var(--ink-muted); }

.report-scope {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
}

.report-scope > button:not(.report-sort) {
  height: 31px;
  padding: 0 11px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-secondary);
  font-size: 10px;
  font-weight: 700;
}

.report-scope > button.is-active { border-color: #b7d5e6; background: var(--primary-soft); color: var(--primary); }
.report-sort { display: inline-flex; height: 33px; align-items: center; gap: 5px; margin-left: auto; padding: 0 10px; border: 1px solid var(--border-light); border-radius: 8px; background: #fff; color: var(--ink-secondary); font-size: 9.5px; font-weight: 700; }
.report-sort .icon { width: 14px; height: 14px; }

.report-face-select {
  position: relative;
  display: flex;
  min-height: 45px;
  align-items: center;
  gap: 10px;
  margin: 0 18px 10px;
  padding: 0 13px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #fff;
  font-size: 10px;
}

.report-face-select span { color: var(--ink-muted); }
.report-face-select select { min-width: 0; flex: 1; height: 43px; appearance: none; outline: 0; font-size: 10px; font-weight: 700; }
.report-face-select .icon { width: 15px; height: 15px; }

.report-card {
  overflow: hidden;
  padding: 13px;
}

.report-card__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.report-file {
  display: flex;
  width: 45px;
  height: 52px;
  flex: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  border-radius: 8px;
  background: #f1f6f9;
  color: var(--error);
}

.report-file .icon { width: 22px; height: 22px; }
.report-file small { font-size: 8px; font-weight: 700; }
.report-card__identity { min-width: 0; flex: 1; }
.report-card__identity > strong { display: -webkit-box; overflow: hidden; font-size: 12px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.report-card__identity > span { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

.report-facts {
  display: grid;
  margin-top: 11px;
  border-top: 1px solid var(--border-light);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-facts > span { min-width: 0; padding: 10px 0 7px; }
.report-facts > span:nth-child(2) { padding-left: 13px; border-left: 1px solid var(--border-light); }
.report-facts__wide { border-top: 1px solid var(--border-light); grid-column: span 2; }
.report-facts small,
.report-facts strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-facts small { color: var(--ink-muted); font-size: 8.5px; }
.report-facts strong { margin-top: 4px; font-family: var(--din); font-size: 10px; }

.report-banner {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--primary-pale);
  color: var(--primary);
  font-size: 8.5px;
  line-height: 1.4;
}

.report-banner--warning { background: var(--warning-soft); color: var(--warning); }
.report-banner .icon { width: 15px; height: 15px; }

.report-actions {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-action {
  display: inline-flex;
  height: 39px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.report-action .icon { width: 14px; height: 14px; }
.report-action--warning { border-color: #ebd1b4; background: #fff8ef; color: var(--warning); }
.report-action:disabled { color: #a8b3bb; opacity: .62; }

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--ink-muted);
  font-size: 8.5px;
  line-height: 1.5;
}

.security-note .icon { width: 15px; height: 15px; }

.report-access { padding-top: 8px; }
.ready-card { display: flex; min-height: 78px; align-items: center; gap: 12px; padding: 14px; }
.ready-icon { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 8px; background: var(--success-soft); color: var(--success); }
.ready-icon .icon { width: 25px; height: 25px; }
.ready-card strong { flex: 1; font-size: 14px; }
.open-report,
.return-report { display: flex; height: 49px; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.open-report { background: var(--primary); color: #fff; }
.return-report { border: 1px solid var(--border); background: #fff; color: var(--primary); }
.open-report .icon { width: 18px; height: 18px; }

.selection-page {
  min-height: 100%;
  background: var(--page);
}

.selection-safe { height: 78px; }
.selection-content { padding: 15px 18px 28px; }
.selection-content h1 { margin: 0 0 12px; font-size: 21px; line-height: 1.3; }

.selection-search {
  display: flex;
  height: 49px;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--ink-muted);
}

.selection-search .icon { width: 19px; height: 19px; }
.selection-search input { min-width: 0; flex: 1; height: 100%; outline: 0; font-size: 12px; }
.selection-count { margin: 12px 0 8px; color: var(--ink-muted); font-size: 10px; }

.organization-row {
  display: flex;
  width: calc(100% - min(calc(var(--depth) * 14px), 56px));
  min-height: 45px;
  align-items: center;
  gap: 8px;
  margin-left: min(calc(var(--depth) * 14px), 56px);
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}

.organization-row--project {
  min-height: 88px;
  margin-top: 5px;
  margin-bottom: 5px;
  border: 1px solid #8cb9d5;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.organization-row__icon {
  display: flex;
  width: 28px;
  height: 28px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #fff;
  color: var(--primary);
}

.organization-row--project .organization-row__icon { width: 42px; height: 42px; background: var(--primary-soft); }
.organization-row__icon .icon { width: 18px; height: 18px; }
.organization-row__copy { min-width: 0; flex: 1; }
.organization-row__copy strong,
.organization-row__copy small { display: block; min-width: 0; }
.organization-row__copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.organization-row__copy small { margin-top: 4px; color: var(--ink-muted); font-size: 8.5px; line-height: 1.45; }
.organization-type { color: var(--ink-muted); font-size: 9px; }
.organization-row > .icon { width: 14px; height: 14px; color: var(--ink-secondary); }
.organization-check { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: 11px; }

.project-list { display: grid; gap: 12px; margin-top: 15px; }
.project-card { display: flex; min-height: 88px; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--border-light); border-radius: 12px; background: #fff; box-shadow: var(--shadow); text-align: left; }
.project-card.is-current { border-color: #74aad0; }
.project-card__icon { display: flex; width: 50px; height: 50px; align-items: center; justify-content: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.project-card__icon .icon { width: 25px; height: 25px; }
.project-card__copy { min-width: 0; flex: 1; }
.project-card__copy strong,
.project-card__copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-card__copy strong { font-size: 12px; }
.project-card__copy small { margin-top: 6px; color: var(--ink-muted); font-size: 9px; }
.project-card > .icon { width: 17px; color: #9ba9b4; }
.selection-logout { display: flex; width: 100%; height: 54px; align-items: center; justify-content: center; gap: 7px; margin-top: 20px; border-radius: 10px; background: #fff; color: var(--ink-secondary); font-size: 12px; font-weight: 700; }

.settings-content { padding: 0 18px 30px; }
.section-label { margin: 18px 3px 7px; color: var(--ink-muted); font-size: 10px; font-weight: 700; }
.settings-card { overflow: hidden; border: 1px solid var(--border-light); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.settings-profile,
.settings-row { display: flex; min-height: 69px; align-items: center; gap: 11px; padding: 13px; }
.settings-icon { display: flex; width: 38px; height: 38px; flex: none; align-items: center; justify-content: center; border-radius: 8px; background: var(--primary-soft); color: var(--primary); }
.settings-icon .icon { width: 20px; height: 20px; }
.settings-profile > span:last-child,
.settings-row > span:nth-child(2) { min-width: 0; flex: 1; }
.settings-profile strong,
.settings-profile small,
.settings-row strong,
.settings-row small { display: block; }
.settings-profile strong,
.settings-row strong { font-size: 12px; }
.settings-profile small,
.settings-row small { margin-top: 4px; color: var(--ink-muted); font-size: 9px; }
.settings-data { display: flex; min-height: 39px; align-items: center; justify-content: space-between; margin: 0 13px; border-top: 1px solid var(--border-light); color: var(--ink-secondary); font-size: 10px; }
.settings-data strong { max-width: 65%; color: var(--ink); text-align: right; }
.settings-row { width: 100%; border-top: 1px solid var(--border-light); text-align: left; }
.settings-row:first-child { border-top: 0; }
.settings-row em { padding: 4px 7px; border-radius: 999px; background: var(--page); color: var(--ink-muted); font-size: 8.5px; font-style: normal; }
.settings-support { padding: 12px; }
.settings-contact { display: flex; width: 100%; height: 47px; align-items: center; justify-content: center; gap: 7px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; }
.settings-logout { display: flex; width: 100%; height: 52px; align-items: center; justify-content: center; gap: 7px; border: 1px solid #efcbc7; border-radius: 10px; background: #fff; color: var(--error); font-size: 12px; font-weight: 700; }

.login-page { min-height: 100%; background: #fff; }
.login-hero { position: relative; height: 375px; overflow: hidden; background: linear-gradient(145deg, #0c4a79, #176ca6); color: #fff; }
.login-grid { position: absolute; right: -40px; bottom: -66px; left: -40px; height: 220px; opacity: .18; transform: perspective(260px) rotateX(55deg); transform-origin: bottom; background-image: linear-gradient(rgb(255 255 255 / 70%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 70%) 1px, transparent 1px); background-size: 42px 36px; }
.login-hero::after { position: absolute; top: -105px; right: -100px; width: 270px; height: 270px; border: 1px solid rgb(255 255 255 / 14%); transform: rotate(45deg); content: ""; }
.login-brand { position: absolute; right: 28px; bottom: 49px; left: 28px; }
.login-logo { display: grid; width: 64px; height: 64px; place-items: center; border: 1px solid rgb(255 255 255 / 72%); border-radius: 17px; background: rgb(255 255 255 / 12%); }
.login-logo::before,
.login-logo::after { position: absolute; width: 31px; height: 27px; border: 2px solid #fff; border-bottom: 0; border-radius: 17px 17px 0 0; content: ""; }
.login-logo::after { width: 18px; height: 19px; margin-top: 8px; }
.login-brand h1 { margin: 18px 0 0; font-size: 22px; line-height: 1.25; }
.login-brand p { margin: 6px 0 0; color: rgb(255 255 255 / 72%); font-size: 11px; }
.login-panel { padding: 31px 28px 30px; }
.login-form h2 { display: inline-block; margin: 0 0 17px; padding-bottom: 8px; border-bottom: 3px solid var(--primary-bright); color: var(--primary); font-size: 14px; }
.login-field { display: flex; height: 59px; align-items: center; gap: 12px; margin-bottom: 16px; padding: 0 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--primary-pale); color: #9aabb7; }
.login-field .icon { width: 19px; height: 19px; }
.login-field input { min-width: 0; flex: 1; height: 100%; outline: 0; font-size: 12px; }
.login-field button { display: flex; width: 34px; height: 42px; align-items: center; justify-content: center; }
.form-error { display: flex; align-items: flex-start; gap: 7px; margin: -4px 0 12px; padding: 8px 10px; border-radius: 8px; background: var(--error-soft); color: var(--error); font-size: 9.5px; line-height: 1.45; }
.form-error .icon { width: 15px; height: 15px; }
.primary-submit { width: 100%; height: 59px; border-radius: 12px; background: linear-gradient(110deg, var(--primary-strong), #2180bd); box-shadow: 0 9px 20px rgb(21 93 146 / 23%); color: #fff; font-size: 15px; font-weight: 750; }
.login-help { display: flex; justify-content: flex-end; gap: 6px; margin-top: 19px; color: var(--ink-muted); font-size: 9.5px; }
.login-help button { color: var(--primary); font-weight: 700; }
.preview-divider { display: flex; align-items: center; gap: 10px; margin: 35px 0 14px; color: var(--ink-muted); font-size: 9px; }
.preview-divider::before,
.preview-divider::after { height: 1px; flex: 1; background: var(--border-light); content: ""; }
.preview-entry { display: flex; width: 100%; height: 55px; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--primary); font-size: 12px; font-weight: 700; }
.preview-entry .icon { width: 19px; height: 19px; }

#modal-root {
  position: absolute;
  z-index: 50;
  inset: 0;
  pointer-events: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgb(17 33 45 / 46%);
  pointer-events: auto;
}

.modal {
  width: 100%;
  max-height: calc(100% - 36px);
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 60px rgb(0 0 0 / 23%);
}

.modal--sheet {
  align-self: flex-end;
  margin: 0 -18px -18px;
  border-radius: 14px 14px 0 0;
}

.modal > header {
  display: flex;
  height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px 0 17px;
  border-bottom: 1px solid var(--border-light);
}

.modal h2 { margin: 0; font-size: 15px; }
.modal-body { max-height: calc(100% - 54px); overflow-y: auto; padding: 17px; }
.confirm-copy { margin: 0; color: var(--ink-secondary); font-size: 11px; line-height: 1.6; }
.confirm-actions { display: grid; gap: 8px; margin-top: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.confirm-actions button { height: 43px; border: 1px solid var(--border); border-radius: 8px; font-size: 11px; font-weight: 700; }
.confirm-actions button.danger { border-color: var(--error); background: var(--error); color: #fff; }
.confirm-actions button.primary { border-color: var(--primary); background: var(--primary); color: #fff; grid-column: span 2; }

.document-preview { color: var(--ink-secondary); }
.document-brand { color: var(--primary); font-size: 9px; font-weight: 700; }
.document-preview h3 { margin: 9px 0 4px; color: var(--ink); font-size: 17px; line-height: 1.4; }
.document-preview > p { margin: 0; color: var(--ink-muted); font-size: 10px; }
.document-preview dl { display: grid; overflow: hidden; margin: 18px 0; border: 1px solid var(--border-light); border-radius: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.document-preview dl div { padding: 10px; border-left: 1px solid var(--border-light); border-top: 1px solid var(--border-light); }
.document-preview dl div:nth-child(odd) { border-left: 0; }
.document-preview dl div:nth-child(-n + 2) { border-top: 0; }
.document-preview dt { color: var(--ink-muted); font-size: 8px; }
.document-preview dd { margin: 4px 0 0; color: var(--ink); font-size: 9px; font-weight: 700; }
.document-preview section { padding-top: 13px; border-top: 1px solid var(--border-light); }
.document-preview h4 { margin: 0; color: var(--ink); font-size: 12px; }
.document-preview section p { margin: 6px 0 13px; font-size: 9.5px; line-height: 1.6; }
.share-sheet { display: grid; gap: 9px; }
.share-sheet button { display: flex; height: 48px; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--border-light); border-radius: 8px; color: var(--primary); font-size: 11px; font-weight: 700; }
.share-sheet p { margin: 4px 0 0; color: var(--ink-muted); font-size: 9px; line-height: 1.5; text-align: center; }

#toast-root {
  position: absolute;
  z-index: 80;
  right: 18px;
  bottom: 26px;
  left: 18px;
  display: grid;
  justify-items: center;
  gap: 7px;
  pointer-events: none;
}

.toast {
  max-width: 88%;
  padding: 9px 13px;
  border-radius: 8px;
  background: rgb(18 35 48 / 92%);
  box-shadow: 0 8px 22px rgb(0 0 0 / 18%);
  color: #fff;
  font-size: 10px;
  line-height: 1.45;
  animation: toast-in 150ms ease-out;
}

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

noscript {
  display: block;
  margin: 20px;
  padding: 14px;
  background: #fff;
}

@media (max-width: 520px) {
  body { background: var(--page); }
  .browser-stage { display: block; padding: 0; }
  .mini-program { width: 100%; height: 100dvh; max-height: none; box-shadow: none; }
}

@media (max-height: 700px) and (min-width: 521px) {
  .mini-program { width: min(390px, 100vw); }
}

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