:root {
  --ink: #19223b;
  --muted: #647089;
  --line: #dce2ee;
  --blue: #2856bd;
  --nav: #131d37;
  --paper: #f3f5f9;
  --card: #fff;
  --violet: #6b58b6;
  --green: #18745e;
  --radius: 14px;
  color-scheme: light;
  font-family: Inter, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}
button,
a {
  cursor: pointer;
}
a {
  color: var(--blue);
  text-decoration: none;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #608bf0;
  outline-offset: 3px;
}
button {
  border: 0;
  background: none;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  font-weight: 650;
}
svg.icon {
  width: 19px;
  height: 19px;
  flex: none;
  stroke-width: 1.65;
}
.skip {
  position: fixed;
  top: -100px;
  left: 10px;
  border-radius: 8px;
  background: white;
  padding: 12px;
  z-index: 90;
}
.skip:focus {
  top: 8px;
}
.shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  background: var(--nav);
  background-image: linear-gradient(150deg, #1c294b, #141e38 49%, #111a32);
  color: #b8c2dc;
  display: flex;
  flex-flow: column;
  padding: 30px 18px 18px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: white;
  line-height: 1.35;
}
.brand small {
  display: block;
  font-size: 10px;
  font-weight: 560;
  letter-spacing: 0.15em;
  color: #a6b6d8;
  margin-top: 3px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  background: linear-gradient(145deg, #97bbff, #5479eb 60%, #5d62ca);
  border: 1px solid #99b4f0;
  border-radius: 11px;
  position: relative;
  flex: none;
  overflow: hidden;
}
.brand-mark:before,
.brand-mark:after {
  content: '';
  display: block;
  position: absolute;
  inset: 6px 16px;
  background: white;
  border-radius: 50%;
  transform: rotate(35deg);
}
.brand-mark:after {
  transform: rotate(112deg);
  inset: 8px 17px;
}
.sidebar .brand {
  margin: 0 5px 38px;
}
.sidebar nav { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.sidebar .brand, .sidebar .side-foot { flex-shrink: 0; }
.identity-invite, .identity-share { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.identity-invite .field { min-width: 135px; }
.identity-share .field { flex: 1 1 240px; min-width: 0; }
.identity-share .helper { flex-basis: 100%; }
.identity-note { margin: 14px 0 0; }
.signing-side { min-width: 0; }
.signing-side [data-person-choice]:not(:empty) { margin-top: 10px; }
.signing-side small { display: block; margin-top: 6px; }
#contact-notes { min-width: 0; scroll-margin-top: 65px; }
.contact-notes-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.contact-notes-preview { display: block; max-width: 20em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#contact-notes textarea { width: 100%; min-height: 120px; resize: vertical; }
#contact-notes .actions { margin-top: 12px; flex-wrap: wrap; }
.contact-notes-conflict { margin: 14px 0; padding: 12px; border: 1px solid #d5b475; border-radius: 8px; }
.contact-notes-conflict h3 { margin: 10px 0 4px; font-size: 14px; }
.nav-label {
  color: #94a2c3;
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 600;
  padding: 0 12px;
  margin: 0 0 9px;
}
.nav-list {
  display: grid;
  gap: 4px;
  margin-bottom: 27px;
}
.nav-link {
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  color: #bfcae1;
  padding: 11px 13px;
  line-height: 1.4;
  font-size: 14px;
}
.nav-link:hover {
  background: #233250;
  color: white;
}
.nav-link.active {
  background: #2e426b;
  color: #fff;
  font-weight: 600;
}
.nav-link.active:before {
  content: '';
  position: absolute;
  left: 0;
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: #94b3ff;
}
.side-foot {
  margin-top: auto;
  padding: 18px 4px 1px;
  border-top: 1px solid #35415b;
  display: flex;
  align-items: center;
  gap: 9px;
}
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 650;
  background: #e6edfd;
  color: #385a9e;
}
.side-foot strong,
.side-foot small {
  display: block;
}
.side-foot strong {
  font-size: 13px;
  color: #eff4ff;
}
.side-foot small {
  font-size: 11px;
  color: #a9b6d4;
  margin-top: 4px;
}
.side-foot button {
  color: #bfcae1;
  padding: 6px;
  margin-left: auto;
  display: grid;
  place-items: center;
}
.side-foot button:hover {
  color: white;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 65px;
  border-bottom: 1px solid var(--line);
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 3.2vw, 50px);
  gap: 14px;
}
.crumb,
.context,
.row,
.actions,
.chips,
.celltitle {
  display: flex;
  align-items: center;
}
.crumb,
.context,
.actions,
.chips {
  gap: 10px;
}
.crumb,
.context {
  font-size: 12px;
  color: var(--muted);
}
.crumb strong {
  font-weight: 600;
  color: var(--ink);
}
.crumb .icon,
.context .icon {
  width: 15px;
  height: 15px;
}
.context span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.context .environment {
  color: #336b60;
  background: #eaf5f1;
  border-radius: 30px;
  padding: 5px 10px;
}
.context .environment:before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #35846f;
}
.nav-toggle {
  display: none;
}
.content {
  width: 100%;
  max-width: 1600px;
  margin: auto;
  padding: clamp(18px, 3.2vw, 46px);
  padding-top: 28px;
}
.heading,
.cardhead,
.row.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.heading {
  margin: 0 0 24px;
}
.heading h1 {
  font-size: clamp(23px, 2.4vw, 33px);
  line-height: 1.3;
  letter-spacing: -0.035em;
}
.heading p,
.cardhead p,
.helper,
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.heading p {
  margin-top: 7px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 37px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 14px;
  background: #fff;
  color: #38445d;
  font-weight: 560;
  line-height: 1.35;
  font-size: 13px;
  white-space: nowrap;
}
.btn:hover {
  border-color: #a9b8d5;
  background: #f7f9fd;
}
.btn .icon {
  width: 16px;
  height: 16px;
}
.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
.primary:hover {
  background: #21479c;
  border-color: #21479c;
}
.subtle {
  color: var(--blue);
  background: #edf2fe;
  border-color: transparent;
}
.danger {
  color: #a14142;
}
.textbtn {
  color: var(--blue);
  font-size: 13px;
  font-weight: 580;
  padding: 5px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.textbtn .icon {
  width: 14px;
  height: 14px;
}
.row {
  gap: 10px;
}
.actions,
.chips {
  flex-wrap: wrap;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 28px clamp(21px, 3vw, 39px);
  min-height: 163px;
  border-radius: var(--radius);
  background: linear-gradient(110deg, #203560 0%, #233f7b 52%, #3557a1);
  color: #fff;
}
.hero h1 {
  font-size: clamp(24px, 2.5vw, 35px);
  letter-spacing: 0.01em;
}
.hero p {
  color: #d5e2ff;
  font-size: 13px;
  line-height: 1.65;
  margin: 8px 0 18px;
}
.hero .btn {
  border-color: #b8cff8;
  background: #eff5ff;
  color: #203f79;
}
.hero .btn:hover {
  background: white;
}
.orbital {
  position: absolute;
  z-index: -1;
  right: 5%;
  top: 50%;
  transform: translateY(-50%) rotate(-18deg);
  width: clamp(170px, 25vw, 340px);
  aspect-ratio: 1.85;
  border-radius: 50%;
  border: 1px solid #adc9ff70;
  box-shadow:
    0 0 0 20px #b1d1ff0c,
    0 0 0 21px #a6c3ff32,
    0 0 0 42px #aecbff06,
    0 0 0 43px #adc9ff29;
}
.orbital:before {
  content: '';
  position: absolute;
  left: 27%;
  top: 0;
  width: 50%;
  aspect-ratio: 1;
  border: 1px solid #d5e4ff9c;
  border-radius: 50%;
  background:
    repeating-radial-gradient(ellipse at 0% 90%, transparent 0 6px, #cbe0ff52 7px 7.6px, transparent 8px),
    radial-gradient(circle at 22% 20%, #c7dfff77, #4375c694 50%, #203865bb 75%);
  box-shadow: inset -10px -8px 25px #19366677;
}
.orbital:after {
  content: '';
  position: absolute;
  right: 5%;
  top: 10%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e4edff;
  box-shadow:
    -100px -24px 0 -1px #b4d1ff,
    -200px 96px 0 -1px white,
    20px 54px 0 -2px white;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
  margin: 0 0 20px;
}
.metric,
.card {
  border: 1px solid var(--line);
  background: white;
  border-radius: var(--radius);
}
.metric {
  padding: 17px 19px;
}
.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: #5e6b82;
  font-size: 13px;
}
.metric-mark,
.item-icon {
  display: grid;
  place-items: center;
  border-radius: 9px;
  width: 32px;
  height: 32px;
  color: #3c62ae;
  background: #edf2ff;
  flex: none;
}
.metric:nth-child(2) .metric-mark {
  background: #f3eefa;
  color: #8366ad;
}
.metric:nth-child(3) .metric-mark {
  background: #fbf1e6;
  color: #97691e;
}
.metric:nth-child(4) .metric-mark {
  background: #eaf4ee;
  color: #397859;
}
.metric strong {
  font-size: 31px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.board {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(235px, 0.85fr);
  gap: 18px;
  align-items: start;
}
.stack {
  display: grid;
  gap: 18px;
}
.card {
  padding: 21px;
  min-width: 0;
}
.cardhead {
  margin: 0 0 16px;
}
.cardhead h2,
.card h2 {
  font-size: 17px;
  letter-spacing: -0.02em;
}
.card h3 {
  font-size: 15px;
}
.cardhead p {
  margin-top: 4px;
}
.steps {
  list-style: none;
  counter-reset: steps;
  margin: 0;
  padding: 0;
}
.steps li {
  counter-increment: steps;
  position: relative;
  padding: 0 0 19px 38px;
  min-height: 41px;
}
.steps li:last-child {
  padding-bottom: 0;
}
.steps li:before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ecf1fb;
  color: #345898;
  font-size: 12px;
  font-weight: 650;
}
.steps li:not(:last-child):after {
  content: '';
  position: absolute;
  top: 26px;
  bottom: 2px;
  left: 11px;
  width: 1px;
  background: var(--line);
}
.steps strong {
  font-size: 14px;
}
.steps p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 3px;
}
.tablebox {
  overflow-x: auto;
  max-width: 100%;
}
.inventory-summary,
.inventory-pager {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.inventory-summary { margin: 0 0 16px; }
.inventory-summary strong { color: var(--ink); font-weight: 550; }
.inventory-pager { justify-content: flex-end; margin-top: 16px; }
.inventory-works { list-style: none; padding: 0; margin: 0; }
.inventory-works li {
  display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) 7rem 7rem auto;
  gap: 8px 18px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 13px;
}
.inventory-works a { color: var(--blue); }
.inventory-work-name a { font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.inventory-work-name small { display: block; margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; }
.inventory-count { color: var(--muted); }
.inventory-detail-link { justify-self: end; text-decoration: underline; text-underline-offset: 3px; }
.status.partial { color: #865618; background: #fbf1db; }
.inventory-scope-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 12px; }
.inventory-scope-heading h3 { margin: 0; }
.inventory-scope-heading span { color: var(--muted); font-size: 13px; }
.inventory-scope tbody th { font-weight: 500; background: transparent; color: var(--ink); }
.inventory-scope thead th,.inventory-scope tbody td,.inventory-scope tbody th { white-space: normal; }
.inventory-reasons { padding: 12px 14px; margin-top: 12px; border-left: 3px solid #deac7c; background: #fcf8f3; overflow-wrap: anywhere; }
.inventory-reasons h4 { margin: 0 0 4px; font-size: 13px; }
.inventory-reason-list { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.inventory-reason-list li + li { margin-top: 4px; }
.inventory-scope tbody tr:last-child th { border-bottom: 0; }
@media (max-width: 620px) {
  .inventory-works li { grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
  .inventory-work-name { grid-column: 1; grid-row: 1; }
  .inventory-works li > span:not(.inventory-count) { grid-column: 2; grid-row: 1; justify-self: end; }
  .inventory-scope th,.inventory-scope td { padding: 8px 4px; }
}
.inventory-sources { margin-top: 10px; font-size: 13px; overflow-wrap: anywhere; }
.inventory-source-scope { font-weight: 600; margin-bottom: 6px; }
.inventory-source-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
  align-items: start; gap: 10px; padding: 0; margin: 0; list-style: none;
}
.inventory-source-card { min-width: 0; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.inventory-source-card h4 { margin: 0 0 9px; font-size: 15px; }
.inventory-source-card dl { display: grid; gap: 5px; margin: 0; }
.inventory-source-card dl > div { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 6px; align-items: baseline; }
.inventory-source-card dt { color: var(--muted); }
.inventory-source-card dd { margin: 0; }
.inventory-source-owner { padding-bottom: 8px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.inventory-source-owner dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.inventory-source-owner dd > a { min-width: 0; }
.inventory-sources a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.inventory-sources summary { cursor: pointer; color: var(--blue); width: fit-content; padding: 8px 0; }
tr.transaction-focus > td { background: #eef3ff; }
tr.transaction-focus:focus { outline: 2px solid var(--blue); outline-offset: -2px; }
.result-count { margin-bottom: 12px; }
.review-opinion { max-width: 720px; margin-top: 16px; }
.party-filters { align-items: end; gap: 10px; }
.party-filters .field { min-width: 160px; }
.party-application { border-top: 1px solid var(--line); }
.party-application summary { display: grid; grid-template-columns: 12px minmax(12ch, 1fr) 6em 6em 11em; align-items: center; gap: 10px; padding: 14px 3px; cursor: pointer; }
.party-application summary::-webkit-details-marker { display: none; }
.party-application summary::before { content: '›'; color: var(--muted); font-size: 18px; text-align: center; }
.party-application[open] > summary::before { transform: rotate(90deg); }
.party-application summary strong, .party-facts dd { overflow-wrap: anywhere; }
.party-application summary small { color: var(--muted); }
.party-application summary .status { justify-self: start; }
.party-application-body { border-left: 2px solid var(--line); padding: 1px 16px 10px; margin: 0 0 14px 7px; }
.party-facts dd { white-space: pre-wrap; }
.party-decision, .party-submission { max-width: 850px; }
@media (max-width: 700px) {
  .party-application summary { grid-template-columns: 12px minmax(0, 1fr) auto; gap: 4px 8px; }
  .party-application summary strong { grid-column: 2; }
  .party-application summary .status { grid-row: 1; grid-column: 3; justify-self: end; }
  .party-application summary > span:not(.status) { grid-column: 2; font-size: 12px; }
  .party-application summary small { grid-column: 3; text-align: right; }
}
.ledger-query { align-items: end; }
.work-filter { min-width: 0; }
.work-search { position: relative; }
.work-search input[role=combobox] { padding-right: 40px; }
.work-clear {
  position: absolute;
  right: 3px;
  top: 2px;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.work-clear[hidden] { display: none; }
.work-clear .icon { width: 16px; height: 16px; }
.work-popup {
  position: absolute;
  z-index: 12;
  inset: calc(100% + 4px) 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 8px 22px #19223b1f;
}
.work-popup ul {
  max-height: min(270px, 36vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  margin: 0;
  padding: 0;
}
.work-feedback { padding: 8px 12px; color: var(--muted); font-size: 12px; font-weight: 450; }
.work-popup li { display: grid; gap: 3px; padding: 8px 12px; cursor: pointer; overflow-wrap: anywhere; }
.work-popup li:hover, .work-popup li[aria-selected=true] { background: #edf2fd; color: var(--blue); }
.work-popup li small { color: var(--muted); font-size: 12px; font-weight: 450; }
.work-pages { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px; }
.work-pages button { background: none; color: var(--blue); padding: 4px; }
.work-pages button:disabled { color: var(--muted); }
#ledger-results td small { display: block; color: var(--muted); font-size: 12px; }
.ledger-original { min-width: 80px; }
.ledger-original summary { cursor: pointer; color: var(--blue); }
.ledger-original[open] { min-width: min(300px,75vw); }
.ledger-fields { display: grid; gap: 8px; margin: 12px 0; }
.ledger-fields dt { color: var(--muted); font-size: 12px; }
.ledger-fields dd { margin: 2px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ledger-fingerprint { white-space: normal; overflow-wrap: anywhere; }
.contract-work { min-width: 0; border-top: 1px solid var(--line); }
.contract-work summary { padding: 12px 0; cursor: pointer; line-height: 1.7; overflow-wrap: anywhere; }
.contract-work summary::marker { color: var(--blue); }
.contract-work summary span { margin-right: 8px; font-size: 13px; color: var(--muted); }
.contract-work summary small { display: inline-block; margin-left: 8px; color: var(--muted); }
.contract-work-link { margin: 0 0 8px; font-size: 13px; }
.contract-work[open] { padding-bottom: 12px; }
.contract-work td small { display: block; color: var(--muted); font-size: 12px; }
#ledger-pages input { width: 5em; min-height: 32px; }
.status.historical { background: #fff1d2; color: #784b00; }
.review-records { list-style: none; margin: 0; padding: 0; }
.review-records li { display: grid; grid-template-columns: 155px minmax(0,1fr); align-items: baseline; gap: 4px 18px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.review-records li:first-child { border-top: 0; padding-top: 0; }
.review-records li:last-child { padding-bottom: 0; }
.review-records time, .event-actor { color: var(--muted); font-size: 12px; }
.review-records time { font-variant-numeric: tabular-nums; }
.review-records .event-actor { margin-left: 10px; }
.review-records p { margin: 4px 0 0; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.verification-facts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit,minmax(min(100%,185px),1fr)); margin: 0; }
.verification-facts dt, .verification-versions small { display: block; color: var(--muted); font-size: 12px; }
.verification-facts dd { margin: 5px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.verification-intro { margin-bottom: 16px; }
.verification-version, .verification-saved { margin-top: 14px; }
.verification-saved { font-size: 13px; color: #15705a; }
.verification-form, .verification-section, .verification-message { display: grid; gap: 14px; }
.verification-form fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.verification-form legend { padding: 0 6px; font-size: 14px; font-weight: 600; }
.verification-file, .verification-versions li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; }
.verification-file + .verification-file, .verification-versions li + li { border-top: 1px solid var(--line); }
.verification-file input[type=file] { max-width: 100%; font-size: 12px; }
.verification-file .field { min-width: 0; max-width: 100%; }
.verification-file a { white-space: normal; overflow-wrap: anywhere; }
.verification-versions { list-style: none; margin: 0; padding: 0; }
.verification-versions small { margin-top: 5px; }
.verification-section + .verification-section { margin-top: 22px; }
.verification-message .btn { justify-self: start; }
@media (max-width: 600px) {
  .review-records li { grid-template-columns: minmax(0,1fr); }
}
.audit-changes td:nth-child(2), .audit-changes td:nth-child(3), .audit-changes td:last-child {
  min-width: 140px;
  max-width: 400px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.system-layout { display: grid; grid-template-columns: minmax(190px, 0.7fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.role-list { display: grid; gap: 5px; }
.role-item { display: grid; gap: 4px; padding: 11px; border: 1px solid transparent; border-radius: 7px; text-align: left; }
.role-item small { color: var(--muted); font-size: 12px; }
.role-item.selected { color: #294f9e; background: #f0f4fe; border-color: #cfdaf3; }
.role-item:hover { background: #f3f6fb; }
.system-fields, .permission-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.section-title, .system-default { margin: 18px 0 10px; }
.permission-group { min-width: 0; display: grid; align-content: start; gap: 7px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.permission-group legend { font-size: 13px; font-weight: 600; padding: 0 5px; }
.system-form { display: grid; gap: 14px; max-width: 440px; }
.system-form .btn { justify-self: start; }
.system-error { display: grid; gap: 8px; justify-items: start; margin-top: 12px; }
@media (max-width: 720px) {
  .system-layout, .system-fields, .permission-grid { grid-template-columns: minmax(0, 1fr); }
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
th {
  color: #69748a;
  font-size: 12px;
  font-weight: 550;
  background: #f5f7fb;
}
th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid #e7eaf1;
  white-space: nowrap;
}
td {
  line-height: 1.55;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fafbfe;
}
.numeric {
  font-variant-numeric: tabular-nums;
}
.celltitle {
  gap: 8px;
  font-weight: 570;
}
.celltitle button {
  padding: 0;
  text-align: left;
  color: var(--blue);
}
.status,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  padding: 3px 7px;
  background: #edf0f5;
  color: #53617a;
}
.status:before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.status.review,
.status.reserved {
  color: #86591b;
  background: #fff3de;
}
.status.approved,
.status.signed,
.status.available {
  color: #15705a;
  background: #e5f4ed;
}
.status.draft {
  color: #3b5d9e;
  background: #edf2fc;
}
.status.rejected,
.status.failed,
.status.blocked {
  color: #984b46;
  background: #fcece9;
}
.tag {
  background: #edf1fc;
  color: #526794;
  font-weight: 500;
}
.empty {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  padding: 29px 12px;
}
.empty > .icon {
  width: 29px;
  height: 29px;
  color: #95a4c1;
}
.empty strong {
  color: #49566d;
  font-size: 14px;
}
.empty p {
  font-size: 12px;
  line-height: 1.55;
}
.empty .btn {
  margin-top: 4px;
}
.filters,
.formgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.field,
.field-title {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #39465d;
  font-size: 13px;
  font-weight: 580;
}
.field input:not([type='checkbox']),
.field select,
.field textarea,
.filter-input {
  border: 1px solid #cbd4e4;
  border-radius: 7px;
  padding: 9px 11px;
  min-height: 39px;
  background: white;
  color: var(--ink);
  width: 100%;
  min-width: 0;
  line-height: 1.4;
  font-weight: 450;
}
.field textarea {
  resize: vertical;
}
.field input:disabled {
  background: #f4f5f7;
  color: #858b98;
}
.wide {
  grid-column: 1/-1;
}
.span2 {
  grid-column: span 2;
}
.inlinecheck,
.checkopt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 450;
}
.inlinecheck input,
.checkopt input {
  accent-color: var(--blue);
}
.block-actions {
  margin-top: 16px;
}
.banner,
.err {
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.65;
}
.banner {
  background: #eff4fd;
  border: 1px solid #d8e4fa;
  color: #405a88;
}
.err {
  background: #fff1ed;
  border: 1px solid #f0cbc2;
  color: #913f33;
}
.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.searchbar input {
  max-width: 290px;
}
.searchbar select {
  padding: 9px;
  border: 1px solid #cbd4e4;
  border-radius: 7px;
  background: #fff;
}
.pill-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.pill-tabs button {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--muted);
}
.pill-tabs button.on {
  background: #e5edfc;
  color: #294f9e;
  font-weight: 650;
}
.group {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcff;
  margin-top: 12px;
}
.group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}
.group header h3 {
  font-size: 14px;
}
.multipick {
  position: relative;
}
.multipick summary {
  list-style: none;
  background: white;
  border: 1px solid #cbd4e4;
  border-radius: 7px;
  min-height: 39px;
  padding: 9px 27px 9px 10px;
  font-size: 13px;
  font-weight: 450;
  cursor: pointer;
  overflow-wrap: anywhere;
  position: relative;
}
.multipick summary::-webkit-details-marker {
  display: none;
}
.multipick summary:after {
  content: '⌄';
  position: absolute;
  right: 9px;
  color: #72819a;
}
.multipick .options {
  position: absolute;
  left: 0;
  top: 100%;
  width: max(100%, 180px);
  max-width: calc(100vw - 90px);
  min-width: 0;
  z-index: 6;
  display: grid;
  gap: 1px;
  max-height: 220px;
  overflow: auto;
  padding: 7px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px #23355020;
}
.checkopt {
  padding: 6px 5px;
}
.checkopt:hover {
  background: #f1f5fd;
}
.keyvals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  margin: 14px 0;
}
.keyvals dt {
  font-size: 12px;
  color: var(--muted);
}
.keyvals dd {
  font-size: 14px;
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}
.preview-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}
.split {
  display: flex;
  align-items: center;
  gap: 8px;
}
.amount {
  font-variant-numeric: tabular-nums;
}
.loading {
  padding: 36px;
  color: var(--muted);
}
#notify {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 50;
  max-width: min(88vw, 530px);
  pointer-events: none;
}
#notify:not(:empty) {
  border-radius: 9px;
  padding: 12px 17px;
  background: #202d49;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 7px 24px #17243a33;
}
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(275px, 1fr) minmax(350px, 1fr);
  background: white;
}
.login-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100%;
  padding: clamp(32px, 6vw, 85px);
  background: linear-gradient(155deg, #1c3058, #233f77 60%, #4259a3);
  color: white;
  display: flex;
  flex-flow: column;
  justify-content: space-between;
}
.login-art .orbital {
  width: 64%;
  right: 3%;
  top: 50%;
  opacity: 0.9;
}
.login-art h1 {
  font-size: clamp(26px, 3.4vw, 52px);
  letter-spacing: -0.04em;
}
.login-art p {
  font-size: 14px;
  line-height: 1.7;
  color: #dae5ff;
  margin-top: 11px;
}
.login-inner {
  align-self: center;
  justify-self: center;
  width: min(390px, 82%);
  padding: 32px 0;
}
.login-inner h2 {
  font-size: 28px;
  margin-bottom: 7px;
}
.login-inner form {
  display: grid;
  gap: 16px;
  margin: 27px 0 17px;
}
.login-inner .btn {
  width: 100%;
  font-size: 14px;
  padding: 11px;
}
.resource-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.resource-tabs a {
  display: inline-flex;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--muted);
  font-size: 13px;
}
.resource-tabs a.on {
  color: var(--blue);
  border-color: #aebfe3;
  background: #e8efff;
  font-weight: 600;
}
.resource-frame {
  width: 100%;
  min-height: 480px;
  height: calc(100dvh - 220px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.login-inner .err:empty {
  display: none;
}
@media (min-width: 1550px) {
  .shell {
    grid-template-columns: 250px minmax(0, 1fr);
  }
  .sidebar {
    padding-left: 22px;
    padding-right: 22px;
  }
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 194px minmax(0, 1fr);
  }
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .board {
    grid-template-columns: minmax(0, 1.65fr) minmax(210px, 0.9fr);
  }
  .content {
    padding: 22px;
  }
  .card {
    padding: 16px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 13px;
  }
  .metric-mark {
    width: 25px;
    height: 25px;
  }
  .metric-mark .icon {
    width: 15px;
    height: 15px;
  }
}
@media (max-width: 880px) {
  .board {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters,
  .formgrid,
  .keyvals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .orbital {
    opacity: 0.65;
  }
  .topbar {
    padding: 0 20px;
  }
  .context > span:first-child {
    display: none;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    transform: translateX(-102%);
    z-index: 31;
    width: 226px;
    transition: transform 0.16s;
  }
  .shell.menu-open .sidebar {
    transform: none;
  }
  .scrim {
    display: none;
  }
  .shell.menu-open .scrim {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: block;
    background: #18223877;
  }
  .nav-toggle {
    display: grid;
    place-items: center;
    padding: 5px;
  }
  .topbar {
    height: 55px;
    padding: 0 15px;
  }
  .content {
    padding: 16px 12px 24px;
  }
  .heading {
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }
  .hero {
    padding: 20px;
    min-height: 150px;
  }
  .hero .orbital {
    right: -45px;
    opacity: 0.42;
  }
  .metrics {
    gap: 8px;
    margin-bottom: 12px;
  }
  .board,
  .stack {
    gap: 12px;
  }
  .card {
    padding: 14px;
  }
  .login {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .login-art {
    min-height: 140px;
    gap: 15px;
    padding: 23px;
  }
  .login-art h1 {
    font-size: 22px;
  }
  .login-art p {
    display: none;
  }
  .login-art .orbital {
    width: 150px;
    right: 12%;
  }
  .login-inner {
    width: min(410px, 88%);
    padding: 30px 0 45px;
  }
  .filters,
  .formgrid,
  .keyvals {
    gap: 10px;
  }
  .hero p {
    max-width: 74%;
  }
  .group {
    padding: 12px;
  }
  .context {
    gap: 4px;
  }
}
@media (max-width: 440px) {
  .filters,
  .formgrid,
  .keyvals {
    grid-template-columns: 1fr;
  }
  .span2 {
    grid-column: auto;
  }
  .btn {
    padding: 7px 10px;
  }
  .content {
    padding: 12px 9px 21px;
  }
  .card {
    padding: 12px;
  }
  .hero {
    padding: 17px;
  }
  .crumb {
    gap: 5px;
  }
  .metrics .metric {
    padding: 10px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
