:root {
  color-scheme: light;
  font-family: "Inter", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  background: #f1f5f2;
  color: #172c26;
  --ink: #172c26;
  --muted: #4a6259;
  --paper: #fff;
  --surface: #f6f9f7;
  --border: #d9e5de;
  --field-border: #a4b9ae;
  --green: #08664d;
  --deep: #163b30;
  --mint: #e5f4eb;
  --nav: #17382d;
  --nav-text: #d6e6df;
  --nav-muted: #a9c3b7;
  --danger: #9a2836;
  --radius: .875rem;
  --shadow: 0 2px 6px #1533280b, 0 10px 24px #15332806;
  --panel-pad: clamp(1.125rem, 1.7vw, 1.6rem);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-width: 54rem;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
  line-height: 1.55;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.28; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.85rem, 2.55vw, 2.45rem); letter-spacing: -.032em; }
h2 { font-size: 1.21rem; }
h3 { font-size: 1.03rem; }
p { overflow-wrap: anywhere; }
a { color: inherit; }
button, input, select, textarea, summary { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .62; }
:focus-visible { outline: 3px solid #298669; outline-offset: 3px; }
main:focus, h1:focus { outline: none; }
.muted { color: var(--muted); }
.small, small { color: var(--muted); font-size: .85rem; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 6;
  padding: .65rem 1rem;
  background: var(--paper);
  color: var(--green);
}

.site-header { background: var(--paper); border-bottom: 1px solid var(--border); }
.header-inner, .workspace-shell { max-width: 95rem; margin-inline: auto; padding-inline: clamp(1.2rem, 2.3vw, 2.25rem); }
.header-inner {
  min-height: 4.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  text-decoration: none;
  font-size: 1.04rem;
  letter-spacing: -.015em;
}
.brand-mark {
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: .66rem;
  background: var(--nav);
  color: #edf9f2;
  font-size: 1.3rem;
  font-weight: 800;
}
.header-actions, .button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
  min-width: 0;
}
.header-actions { justify-content: flex-end; }
.header-actions .header-user {
  display: block;
  max-width: 13rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-user[aria-current="page"] { background: var(--mint); }
.workspace-shell {
  width: 100%;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.15rem, 2.1vw, 2rem);
  padding-block: clamp(1.5rem, 2.45vw, 2.35rem) 2.5rem;
}
html[data-auth="active"] .workspace-shell:has(> .sidebar:not([hidden])) {
  grid-template-columns: clamp(10.6rem, 15vw, 13rem) minmax(0, 1fr);
}
html[data-auth="active"] .workspace-shell:has(> .sidebar[hidden]) > .workspace-content {
  width: min(100%, 78rem);
  justify-self: center;
}
.workspace-content, .workspace-shell main { min-width: 0; }
.sidebar {
  position: sticky;
  top: 1.25rem;
  padding: .7rem;
  background: var(--nav);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--nav-text);
}
.sidebar nav, .nav-group { display: grid; gap: .18rem; }
.nav-group + .nav-group, .sidebar nav > a + .nav-group {
  margin-top: .55rem;
  padding-top: .55rem;
  border-top: 1px solid #ffffff26;
}
.nav-caption {
  padding: .35rem .7rem .25rem;
  color: var(--nav-muted);
  font-size: .77rem;
  font-weight: 700;
  letter-spacing: .045em;
}
.sidebar a {
  min-width: 0;
  display: flex;
  align-items: center;
  min-height: 2.7rem;
  border-radius: .58rem;
  padding: .55rem .75rem;
  text-decoration: none;
  font-weight: 650;
  font-size: .92rem;
}
.sidebar a:hover { background: #ffffff19; color: #fff; }
.sidebar a[aria-current="page"] { background: #edf7f0; color: #184b39; }
.sidebar a:focus-visible { outline-color: #afebcc; }
.platform-context {
  position: sticky;
  top: .65rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  margin-bottom: 1.15rem;
  padding: .4rem .55rem .4rem .85rem;
  border: 1px solid var(--border);
  border-radius: .7rem;
  background: var(--paper);
}
.platform-context > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .65rem; min-width: 0; }
.platform-context span { color: var(--muted); font-size: .83rem; }
.platform-context strong { color: var(--deep); overflow-wrap: anywhere; }
.platform-context .button { min-height: 2.25rem; flex-shrink: 0; }
.workspace-content main :focus { scroll-margin-top: 5rem; }
.site-footer { padding: .75rem 1rem 1.4rem; text-align: center; font-size: .8rem; color: var(--muted); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  max-width: 100%;
  padding: .5rem .83rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  background: transparent;
  color: inherit;
  text-decoration: none;
  text-align: center;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.button-primary { background: var(--green); color: #fff; }
.button-primary:hover:not(:disabled) { background: #06513e; }
.button-secondary { background: var(--paper); color: var(--deep); border-color: var(--field-border); }
.button-secondary:hover:not(:disabled), .button-quiet:hover:not(:disabled) { background: var(--mint); }
.button-quiet { color: var(--green); }
.button-danger { color: #fff; background: var(--danger); }
.button-danger:hover:not(:disabled) { background: #7d2029; }
.button-danger-outline { color: var(--danger); border-color: #dfb9bd; }
.button-danger-outline:hover:not(:disabled) { background: #fff0f1; }
.button-full { width: 100%; }
.text-link, .entry-switch a, .table-title { color: var(--green); font-weight: 700; text-underline-offset: .18em; }
.spaced { margin-top: 1rem; }

.panel {
  min-width: 0;
  padding: var(--panel-pad);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.panel > :is(h2, h3) + p, .page-heading p { margin-top: .45rem; }
.page-heading, .section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .55rem .85rem;
}
.page-heading { margin-bottom: 1.25rem; }
.page-heading > div, .section-heading > div, .section-heading h2 { min-width: 0; }
.page-heading p { color: var(--muted); }
.section-heading { margin-bottom: .8rem; }
.section-heading .button { min-height: 2.25rem; }
.section-gap { margin-top: 1rem; }
.page-loading {
  padding: 1.15rem;
  border-radius: .64rem;
  background: var(--surface);
  color: var(--muted);
}
.empty-state {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: .42rem;
  min-height: 7rem;
  padding: 1.25rem;
  border: 1px dashed var(--field-border);
  border-radius: .7rem;
  color: var(--muted);
  background: var(--surface);
}
.empty-state h3 { color: var(--ink); }
.empty-state .button { margin-top: .3rem; }

.entry-layout {
  width: min(100%, 66rem);
  margin: clamp(1rem, 5vh, 3.2rem) auto 0;
  display: grid;
  grid-template-columns: 1.16fr 1fr;
  gap: 1.16rem;
  align-items: stretch;
}
.entry-intro {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 1rem;
  min-width: 0;
  padding: clamp(2rem, 4.3vw, 3.65rem);
  border: 1px solid #143c30;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 2px 2px, #ffffff22 1px, transparent 1.3px) 0 0 / 1.15rem 1.15rem,
    linear-gradient(135deg, #17382d, #14634c);
  color: #fff;
}
.entry-intro h2 { font-size: clamp(1.85rem, 3.1vw, 3.05rem); letter-spacing: -.034em; }
.entry-intro p { max-width: 25rem; color: #e3f3ea; }
.entry-flow { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-top: .55rem; }
.entry-flow span { color: #d9f7e7; font-size: .85rem; }
.entry-flow span:nth-child(odd) {
  padding: .48rem .62rem;
  background: #0f362bd9;
  border: 1px solid #8bcbb27a;
  border-radius: .53rem;
  color: #f5fdf8;
  font-weight: 650;
}
.entry-card { padding: clamp(1.65rem, 3vw, 2.55rem); }
.entry-card h1 { font-size: clamp(1.65rem, 2.7vw, 2.15rem); }
.entry-card > p { margin-top: .5rem; }
.entry-card .form-stack { margin-block: 1.25rem .9rem; }
.entry-switch { border-top: 1px solid var(--border); padding-top: .9rem; }
.centered-status, .admin-entry { width: min(100%, 33rem); margin: clamp(1rem, 5vh, 3.2rem) auto; }
.centered-status h1 { margin-bottom: .6rem; }
.centered-status > .chip { margin-bottom: .65rem; }
.centered-status p + p { margin-top: .45rem; }
.centered-status .button { margin-top: .95rem; }
.profile-panel { width: min(100%, 54rem); }

.form-stack {
  display: grid;
  justify-items: start;
  gap: .83rem;
  margin-top: .95rem;
}
.form-stack > :is(label, .field), .filters > label {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: .32rem;
  color: var(--ink);
  font-size: .91rem;
  font-weight: 675;
}
:is(label, .field) small { font-weight: 500; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 2.65rem;
  padding: .5rem .62rem;
  border: 1px solid var(--field-border);
  border-radius: .49rem;
  background: var(--paper);
  color: var(--ink);
  font-size: .96rem;
  font-weight: 400;
}
input::placeholder, textarea::placeholder { color: #66796f; }
select { text-overflow: ellipsis; }
textarea { resize: vertical; }
input[readonly], textarea[readonly] { background: var(--surface); }
.feedback { font-size: .9rem; overflow-wrap: anywhere; color: var(--muted); }
.feedback:empty { display: none; }
.feedback[data-tone="danger"] { color: var(--danger); }
.feedback[data-tone="warning"] { color: #73501b; }
.feedback[data-tone="success"] { color: var(--green); }
.flash-banner {
  padding: .7rem .86rem;
  border: 1px solid #b6d9c5;
  border-radius: .58rem;
  background: var(--mint);
  margin-bottom: .85rem;
}
.flash-banner[data-tone="danger"] { border-color: #dfb9bd; background: #fceef0; }
.flash-banner[data-tone="warning"] { border-color: #dcc9a4; background: #fcf5e8; }

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  align-items: start;
  gap: .9rem;
}
.platform-card { display: grid; gap: .85rem; align-content: start; border-top: 3px solid #6aab90; }
.platform-card[data-connection="missing"] { border-top-color: #bf9a55; }
.platform-card[data-connection="off"] { border-top-color: #a7b7af; }
.platform-card .section-heading { align-items: start; gap: .45rem .65rem; margin: 0; }
.platform-card h2 { font-size: 1.15rem; }
.platform-card .button-row { margin-top: .15rem; }
.platform-card .card-settings { padding-top: .5rem; border-top: 1px solid var(--border); }
.platform-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .5rem; margin-top: .4rem; }

.summary-grid, .metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}
.summary-card, .metric-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: .3rem;
  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: .68rem;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}
.summary-card:hover, .metric-card:hover { border-color: #77a997; background: #f9fcfa; }
.summary-card > span:first-child, .metric-card span { color: var(--muted); font-size: .84rem; font-weight: 650; }
.summary-card strong, .metric-card strong { color: var(--deep); font-size: 1.3rem; line-height: 1.25; }
.summary-card .indicator-value, .metric-card strong { font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.summary-card .chip { justify-self: start; }
.next-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .85rem;
  padding: .85rem 1rem;
  border: 1px solid #c0decc;
  border-radius: .68rem;
  background: var(--mint);
  color: var(--deep);
}
.next-card h2 { font-size: 1.08rem; }
.next-card p { margin-top: .25rem; color: var(--muted); font-size: .9rem; }
.next-card > :is(.button, .button-row) { flex: 0 0 auto; }

.chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 2rem;
  padding: .24rem .56rem;
  background: #e9efeb;
  color: #374f44;
  font-size: .77rem;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.chip-success { color: #11563e; background: #e1f3e8; }
.chip-warning { color: #73501b; background: #fbefd9; }
.chip-danger { color: var(--danger); background: #fce8eb; }
.definition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: .82rem 1.05rem;
  margin: 0;
}
.definition-grid > div { min-width: 0; }
.definition-grid dt { color: var(--muted); font-size: .84rem; }
.definition-grid dd { margin: .23rem 0 0; font-weight: 650; overflow-wrap: anywhere; }

.split-layout, .workspace-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(16.5rem, 1fr);
  gap: .95rem;
  align-items: start;
}
.message-layout { grid-template-columns: minmax(17rem, 1fr) minmax(0, 1.35fr); }
.compose-bot { margin-top: .35rem; }
.bot-card { display: grid; gap: .95rem; }
.bot-card .section-heading { margin: 0; align-items: start; }
.bot-card .copy-field { max-width: 100%; }
.copy-field { display: grid; gap: .36rem; min-width: 0; }
.copy-field label { font-size: .87rem; font-weight: 675; }
.copy-controls { display: flex; gap: .47rem; min-width: 0; align-items: center; }
.copy-controls input { flex: 1 1 0; min-width: 0; font-family: ui-monospace, "Cascadia Code", monospace; font-size: .85rem; }
.copy-controls button { flex: 0 0 auto; }
.webhook-status { padding: .68rem .76rem; border: 1px solid var(--border); border-radius: .56rem; background: var(--surface); }
.webhook-status p { margin-top: .36rem; }
.action-menu summary, .help-block summary, .card-settings summary, .integration-edit summary, .integration-example summary {
  color: var(--green);
  font-weight: 700;
  font-size: .88rem;
  padding-block: .36rem;
}
.action-menu .button-row { margin: .4rem 0 .1rem; }
.help-block {
  margin-top: .7rem;
  padding: .35rem .72rem;
  border: 1px solid var(--border);
  border-radius: .55rem;
  background: var(--surface);
}
.help-block p { padding-block: .17rem .48rem; }
.wizard-panel { max-width: 54rem; }
.wizard-panel .form-stack { max-width: 37rem; }
.wizard-panel h2 + p { margin-top: .58rem; }
.wizard-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
}
.wizard-progress li {
  display: flex;
  align-items: center;
  gap: .47rem;
  padding: .55rem .62rem;
  border-radius: .55rem;
  background: var(--surface);
  color: var(--muted);
  font-size: .87rem;
}
.wizard-progress li span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: #e6ebe7;
  font-size: .84rem;
}
.wizard-progress li[aria-current="step"] { background: var(--mint); font-weight: 750; color: var(--deep); }
.wizard-progress li[aria-current="step"] span { background: var(--green); color: white; }
.wizard-progress li[data-completed="true"] span { background: #dceee3; color: var(--green); }
.wizard-panel .button-row { margin-top: .95rem; }
.wizard-panel .webhook-status { margin-top: .75rem; }
.wizard-actions { border-top: 1px solid var(--border); padding-top: .85rem; }
.instructions { margin: .65rem 0 .95rem; padding-inline-start: 1.25rem; color: var(--muted); }
.instructions li + li { margin-top: .36rem; }

.source-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(14rem, 1fr);
  gap: 1rem;
  align-items: start;
}
.source-progress { margin-bottom: 1rem; }
.source-step > p { margin-top: .55rem; }
.source-step > .button-row, .source-step .wizard-actions { margin-top: 1rem; }
.source-provider {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #a5cbb9;
  border-radius: .7rem;
  background: #f3faf5;
}
.source-provider strong { color: var(--deep); }
.source-provider .small { margin-top: .15rem; }
.source-summary { background: #f7fbf8; }
.source-flow { display: grid; gap: .65rem; margin: .7rem 0 0; padding: 0; list-style: none; }
.source-flow li {
  position: relative;
  display: grid;
  gap: .12rem;
  padding: .48rem .7rem;
  border-left: 2px solid #77a78b;
  border-radius: .35rem;
  background: var(--paper);
  overflow-wrap: anywhere;
}
.source-flow li + li::before {
  content: "";
  position: absolute;
  width: 1px;
  height: .59rem;
  left: .8rem;
  top: -.64rem;
  background: #9fb8ad;
}
.source-flow span { color: var(--muted); font-size: .78rem; }
.source-flow strong { font-size: .94rem; }
.source-delivery { margin-top: .85rem; }
.source-delivery ul { margin: 0; padding: 0; list-style: none; }
.source-delivery li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem;
  padding: .53rem .65rem;
  border-bottom: 1px solid var(--border);
  font-size: .87rem;
}
.source-delivery li strong { text-align: right; font-weight: 650; color: var(--muted); }
.source-delivery li[data-complete="true"] strong { color: var(--green); }
.source-management { margin-top: .55rem; }
.loan-page { width: min(100%, 69rem); justify-self: center; }
.loan-facts { margin-block: .7rem 1rem; }
.loan-actions { margin-top: .85rem; }
.loan-inbox {
  margin-top: .72rem;
  padding: .8rem;
  border: 1px solid var(--border);
  border-radius: .62rem;
  background: #f3faf5;
}
.loan-inbox p { margin-top: .32rem; color: var(--muted); }
.loan-inbox .loan-message { color: var(--ink); }

.record-list { margin: 0; padding: 0; list-style: none; }
.record-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem .88rem;
  padding: .68rem 0;
  border-bottom: 1px solid var(--border);
}
.record-list li:last-child { border-bottom: 0; }
.record-list li strong { display: block; overflow-wrap: anywhere; }
.record-list li time, .record-list .record-source { color: var(--muted); font-size: .82rem; }
.record-list .record-source { display: block; overflow-wrap: anywhere; }
.record-list .record-status { display: grid; justify-items: end; gap: .2rem; }
.record-list li .button, .record-list .chip { justify-self: end; }

.integration-secret { margin-bottom: 1rem; border-color: #a5cbb9; background: #f5fbf7; }
.panel-stack { min-width: 0; display: grid; gap: .95rem; }
.panel > h2 + .empty-state { margin-top: .65rem; }
.integration-secret .copy-field, .integration-connect .copy-field { margin-top: .65rem; }
.integration-item { padding-block: .85rem; }
.integration-item + .integration-item { border-top: 1px solid var(--border); }
.integration-item .section-heading { margin-bottom: .3rem; align-items: start; }
.integration-item .button-row { margin-top: .5rem; }
.integration-meta { display: flex; flex-wrap: wrap; gap: .22rem .9rem; }
.integration-meta strong { font-weight: 675; color: var(--ink); }
.integration-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .4rem .8rem;
  margin-top: .55rem;
}
.integration-actions > .button { justify-self: start; min-height: 2.2rem; }
.integration-edit { min-width: 0; }
.integration-edit[open] {
  grid-column: 1 / -1;
  padding-top: .35rem;
  border-top: 1px solid var(--border);
}
.integration-example { margin-top: .65rem; }
.integration-edit .form-stack { max-width: 30rem; margin: .5rem 0 .25rem; }
.integration-code { display: block; width: 100%; max-width: 100%; margin-block: .3rem .6rem; font-family: ui-monospace, monospace; }
.integration-connect code, .integration-meta code { overflow-wrap: anywhere; }
.detail-block {
  display: grid;
  gap: .55rem;
  margin-top: .95rem;
  padding: .8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .6rem;
}
.detail-block > .button { justify-self: start; }
.expiry-note { font-size: .84rem; font-weight: 650; color: var(--deep); }
#compose > .empty-state, #recipients-list, #notification-list, #integration-list { margin-top: .62rem; }

.action-dialog {
  width: min(33rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 18px 75px #132c2452;
}
.action-dialog::backdrop { background: #0e282090; }
.action-dialog > h2 { margin-bottom: .6rem; }
.action-dialog .definition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dialog-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .48rem;
  margin-top: .85rem;
}
.form-stack > .dialog-actions { margin-top: 0; }
.message-preview {
  max-height: 12rem;
  overflow: auto;
  margin-top: .9rem;
  padding: .78rem;
  border: 1px solid var(--border);
  border-radius: .6rem;
  background: var(--surface);
  white-space: pre-wrap;
}

.route-graph { margin-top: .85rem; }
.route-canvas {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.55rem, 2.7vw, 2.35rem);
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: .72rem;
  background: radial-gradient(circle, #d5e2d9 1px, transparent 1.25px) 0 0 / .87rem .87rem, #f7faf8;
}
.route-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.route-line { fill: none; stroke: #78958a; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.route-line.is-unavailable { stroke-dasharray: 4 4; }
.route-line.is-highlighted { stroke: #09654e; stroke-width: 2.65; }
.route-line.is-dimmed { opacity: .22; }
.route-column { min-width: 0; display: grid; gap: .48rem; }
.route-column h3 { margin-bottom: .06rem; color: var(--deep); font-size: .87rem; }
.route-station {
  display: grid;
  padding: .67rem;
  margin: -.35rem 0;
  border: 1px solid #a7cabc;
  border-radius: .65rem;
  background: #e9f6ee;
}
.route-bot { color: #3a5c4f; font-size: .82rem; overflow-wrap: anywhere; }
.route-node {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding: .61rem .69rem;
  border: 1px solid #c9dcd2;
  border-radius: .58rem;
  background: var(--paper);
  color: var(--ink);
  font-size: .92rem;
  line-height: 1.4;
  text-align: left;
  overflow-wrap: anywhere;
}
.route-node > :is(strong, small) { display: block; }
.route-node small { margin-top: .18rem; font-size: .79rem; }
.route-node .chip { margin-top: .26rem; }
.route-integration {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .4rem;
}
.route-event-name > :is(strong, small) { display: block; }
.route-integration .chip { max-width: 7.75rem; margin: 0; }
.route-integration:hover, .route-integration[aria-pressed="true"], .route-node.is-highlighted { border-color: #3b8b70; background: #f4fbf6; }
.route-integration[aria-pressed="true"] { box-shadow: 0 0 0 1px #3b8b70; }
.route-person { border-inline-start: 3px solid #77a78b; }
.route-source { border-inline-start: 3px solid #6b91a2; }
.route-description { min-height: 1.35em; margin-top: .55rem; font-size: .86rem; color: var(--muted); }
.route-legend { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: .55rem; }
.route-description:empty { margin: 0; min-height: 0; }
.route-legend span::before {
  display: inline-block;
  width: 1.1rem;
  margin-right: .35rem;
  border-top: 2px solid #78958a;
  vertical-align: .22rem;
  content: "";
}
.route-legend .unavailable::before { border-top-style: dashed; }

.admin-site {
  --nav: #172e37;
  --nav-text: #e0ebed;
  --nav-muted: #a9c2cb;
}
.admin-site .header-inner, .admin-site .workspace-shell { max-width: 103rem; }
.admin-site .sidebar a[aria-current="page"] { background: #eaf4f6; color: #18414c; }
.admin-entry { border-top: 4px solid var(--nav); }
.metric-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric-card[data-attention="true"] { border-color: #d8bb80; background: #fdf8ed; }
.metric-card[data-attention="true"] strong { color: #73501b; }
.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 12rem) auto;
  gap: .68rem;
  align-items: end;
  margin-bottom: .85rem;
  padding: .8rem;
  border: 1px solid var(--border);
  border-radius: .66rem;
  background: var(--surface);
}
.record-filters { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.table-wrap {
  overflow-x: auto;
  margin-top: .68rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
}
.data-table { border-collapse: collapse; width: 100%; font-size: .88rem; }
.data-table :is(th, td) {
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  padding: .57rem .65rem;
  overflow-wrap: anywhere;
}
.data-table th { background: #edf4f0; color: #37554a; font-weight: 750; }
.data-table td > small { display: block; margin-top: .11rem; }
.data-table tbody tr:nth-child(even) { background: #f9fbfa; }
.data-table tbody tr:hover, .data-table tbody tr:focus-within { background: #eff7f2; }
.data-table .button { min-height: 2.15rem; padding-inline: .52rem; font-size: .83rem; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.table-empty { margin-top: .65rem; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: .54rem; margin-top: .8rem; }
