@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  color: #151924;
  background: #f5f6f8;
  font: 16px/1.5 "Instrument Sans", system-ui, sans-serif;
  --ink: #151924;
  --muted: #545c6b;
  --faint: #eef0f4;
  --border: #e4e7ed;
  --control-border: #bfc6d1;
  --accent: #3b51b7;
  --accent-light: #edf0ff;
  --white: #fff;
  --edge: clamp(1rem, 4vw, 4rem);
  --page-width: 92rem;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, strong { font-weight: 600; }
button, input, select { font: inherit; }
button, input, select {
  min-height: 2.625rem;
  border: 1px solid var(--control-border);
  border-radius: .55rem;
  background: var(--white);
  color: var(--ink);
}
input, select { min-width: 0; padding: .55rem .75rem; }
input::placeholder { color: var(--muted); opacity: 1; }
button {
  padding: .5rem .85rem;
  font-weight: 550;
  cursor: pointer;
}
button:hover:not(:disabled) { background: #f4f5f8; }
button:disabled { opacity: .58; cursor: wait; }
button.primary { border-color: var(--ink); background: var(--ink); color: var(--white); }
button.primary:hover:not(:disabled) { background: #30384c; border-color: #30384c; }
button.quiet { border-color: transparent; background: transparent; }
.brand { display: inline-flex; align-items: center; gap: .48rem; width: max-content; font-size: 1.63rem; font-weight: 700; letter-spacing: -.055em; line-height: 1; }
.brand small { padding: .23rem .33rem; border-radius: .26rem; background: #eceef3; color: #444b5b; font-size: .69rem; letter-spacing: 0; }
.ops-wordmark { display: block; width: 7.65rem; height: auto; }

.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100svh; background: var(--white); }
.auth-content { display: grid; grid-template-rows: auto 1fr auto; gap: 3.5rem; padding: clamp(1.5rem, 4vw, 4rem); }
.gate { width: min(100%, 25rem); align-self: center; margin-inline: auto; }
.gate h1 { font-size: clamp(2rem, 3.6vw, 3.35rem); letter-spacing: -.065em; line-height: 1.05; }
.gate p { margin-top: .85rem; color: var(--muted); font-size: .97rem; overflow-wrap: anywhere; }
.gate form { margin-top: 2rem; }
.gate label, dialog label { display: grid; gap: .42rem; margin-bottom: 1rem; font-size: .88rem; font-weight: 550; }
.gate input, dialog input, dialog select { width: 100%; }
.gate input, .gate .primary { min-height: 3.125rem; }
.gate form button { width: 100%; margin-top: .25rem; }
#enroll, .auth-cancel, #enrollment { margin-top: 1rem; }
#setup-key { display: block; margin-top: .55rem; padding: .65rem; border-radius: .4rem; background: var(--accent-light); overflow-wrap: anywhere; }
.auth-footer, .workspace-footer { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .79rem; }
.auth-art {
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  min-width: 0;
  margin: .9rem;
  border-radius: 1.3rem;
  background: radial-gradient(ellipse at 45% 45%, #f1f3ff 12%, transparent 62%), #e9ecf4;
  overflow: hidden;
}
.auth-art::before {
  position: absolute;
  z-index: -1;
  inset: -12%;
  background: repeating-linear-gradient(113deg, transparent 0 21px, rgb(104 117 162 / 15%) 22px, transparent 23px 34px);
  mask-image: linear-gradient(130deg, transparent 26%, #000 69%, transparent 88%);
  content: "";
}
.auth-device {
  display: block;
  width: min(69%, 31rem);
  height: auto;
  filter: drop-shadow(0 1.4rem 1.5rem rgb(19 38 90 / 21%));
  transform: rotate(-10deg);
}

.skip-link {
  position: fixed;
  z-index: 3;
  top: .5rem;
  left: var(--edge);
  padding: .6rem;
  background: var(--white);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }
.masthead { position: sticky; z-index: 2; top: 0; border-bottom: 1px solid var(--border); background: var(--white); }
.masthead-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 4.6rem;
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--edge);
  gap: 1.4rem;
}
.navigation { display: flex; align-items: center; gap: .24rem; padding: .24rem; border-radius: .64rem; background: #f3f4f7; }
.navigation a { display: block; padding: .48rem .78rem; border-radius: .47rem; color: #434a5a; font-size: .89rem; font-weight: 550; white-space: nowrap; }
.navigation a:hover { background: #e7eaf0; }
.navigation a[aria-current="page"] { background: var(--ink); color: var(--white); }
.staff-tools { display: flex; align-items: center; justify-content: end; gap: .45rem; white-space: nowrap; }
.environment, .currency, .period {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .32rem .58rem;
  border: 1px solid var(--border);
  border-radius: .4rem;
  color: #454d5e;
  background: #f8f9fb;
  font-size: .75rem;
  font-weight: 550;
  white-space: nowrap;
}
.environment > span { width: .42rem; height: .42rem; border-radius: 50%; background: #5970ce; }
#logout { font-size: .85rem; }

#page-content { max-width: var(--page-width); margin-inline: auto; padding: 2.55rem var(--edge) 1.3rem; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.65rem; }
.page-heading h1 { font-size: clamp(2.25rem, 4vw, 3.2rem); line-height: .99; letter-spacing: -.05em; }
#page-description { margin-top: .55rem; color: var(--muted); font-size: .9rem; }
.page-tools { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
#status { color: var(--muted); font-size: .81rem; }
#status:empty { display: none; }
#status[data-error] { color: #93283e; }
#reload { font-size: .87rem; white-space: nowrap; }
.refresh-icon { display: inline-block; margin-right: .18rem; color: var(--accent); font-size: 1.05em; }

.overview { display: grid; gap: .95rem; }
.summary-grid, .activity-grid { display: grid; gap: .95rem; }
.summary-grid { grid-template-columns: minmax(0, 2.28fr) minmax(16rem, 1fr); }
.activity-grid { grid-template-columns: minmax(0, 1.47fr) minmax(0, 1fr); }
.surface { min-width: 0; border: 1px solid var(--border); border-radius: 1rem; background: var(--white); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.panel-heading h2 { font-size: 1.08rem; letter-spacing: -.02em; }
.balance-panel, .ledger-panel, .activity-panel, .recent-panel { padding: clamp(1rem, 2.05vw, 1.7rem); }
.balance-panel .panel-heading h2 { color: var(--muted); font-size: .98rem; }
.balance, .metrics strong, .ledger-result strong, .recent-amount, .numeric { font-variant-numeric: tabular-nums; }
.balance {
  display: block;
  max-width: 100%;
  margin: .26rem 0 1.36rem;
  font-size: clamp(2.65rem, 5.8vw, 5.7rem);
  font-weight: 550;
  line-height: 1.01;
  letter-spacing: -.075em;
  overflow-wrap: anywhere;
}
.balance .cents { color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.metrics > div { min-width: 0; min-height: 5.5rem; padding: .72rem .87rem; border: 1px solid #eef0f4; border-radius: .64rem; background: #f7f8fa; }
.metrics h3 { margin-bottom: .25rem; color: var(--muted); font-size: .77rem; font-weight: 550; }
.metrics strong { display: block; font-size: clamp(1rem, 1.8vw, 1.65rem); line-height: 1.1; letter-spacing: -.045em; overflow-wrap: anywhere; }
.metrics small { display: block; margin-top: .24rem; color: var(--muted); font-size: .71rem; }
.ledger-panel { display: flex; flex-direction: column; gap: .85rem; border-color: #1c2134; background: #1c2134; color: #fff; }
.ledger-panel h2 { color: #eff2ff; }
.ledger-icon { display: flex; width: 2.35rem; height: 2.35rem; flex-direction: column; justify-content: center; gap: .18rem; padding: .45rem; border: 1px solid #4a526b; border-radius: .55rem; }
.ledger-icon i { height: 2px; background: #aebbe9; border-radius: 4px; }
.ledger-icon i:nth-child(2) { width: 75%; }
.ledger-result { flex: 1; display: grid; align-content: center; }
.ledger-result strong { display: block; font-size: clamp(1.9rem, 3.9vw, 3.55rem); line-height: 1.05; letter-spacing: -.058em; overflow-wrap: anywhere; }
.ledger-result p, .ledger-footer p { color: #c7cddd; font-size: .81rem; }
.ledger-result p { margin-top: .33rem; }
.ledger-footer { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .7rem; padding-top: .85rem; border-top: 1px solid #4a526b; }
.ledger-badge { padding: .23rem .54rem; border-radius: .35rem; background: #e4ebff; color: #2b438f; font-size: .74rem; font-weight: 650; white-space: nowrap; }
.ledger-panel[data-unbalanced] .ledger-badge { background: #ffe7da; color: #802e20; }

.activity-figure { margin-top: 1.1rem; }
.chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem; }
.chart-axis { display: flex; flex-direction: column; justify-content: space-between; align-items: end; min-width: 1.9rem; height: 9.2rem; color: var(--muted); font-size: .66rem; font-variant-numeric: tabular-nums; }
.chart-axis span { line-height: 1; }
.chart-body { position: relative; min-width: 0; }
.chart-body::before {
  position: absolute;
  inset: .3rem 0 auto;
  height: 8.55rem;
  border-block: 1px solid var(--border);
  background: linear-gradient(var(--border), var(--border)) center / 100% 1px no-repeat;
  content: "";
}
.chart-bars { position: relative; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: clamp(.18rem, .75vw, .68rem); margin: 0; padding: .3rem 0 0; list-style: none; }
.chart-bars li { min-width: 0; text-align: center; }
.bar-track { display: flex; align-items: end; height: 8.55rem; }
.chart-bar { display: block; width: 80%; max-width: 1.4rem; height: 2px; margin-inline: auto; border-radius: .23rem .23rem 0 0; background: #d0d5e3; }
.chart-bar[data-amount] { min-height: 3px; background: #8899df; }
.chart-bars li:nth-last-child(-n + 4) .chart-bar[data-amount] { background: #4c63c5; }
.chart-label { display: block; margin-top: .48rem; color: var(--muted); font-size: .65rem; white-space: nowrap; }
.chart-empty { position: absolute; top: 3.8rem; left: 0; right: 0; width: fit-content; max-width: 100%; margin: auto; padding: .22rem .55rem; background: var(--white); color: var(--muted); font-size: .82rem; text-align: center; }
figcaption { margin-top: .75rem; color: var(--muted); font-size: .72rem; }

.text-link { padding: .25rem 0 .25rem .25rem; color: var(--accent); font-size: .79rem; font-weight: 650; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.recent-list { display: grid; margin: .7rem 0 0; padding: 0; list-style: none; }
.recent-list li { display: flex; align-items: center; gap: .67rem; min-width: 0; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.recent-list li:last-child { border-bottom: 0; }
.transfer-mark { display: grid; place-items: center; width: 1.95rem; height: 1.95rem; flex: 0 0 1.95rem; border-radius: .48rem; background: var(--accent-light); color: var(--accent); }
.recent-label { flex: 1; min-width: 0; color: var(--ink); font-size: .85rem; font-weight: 600; }
.recent-label span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-label small { display: block; color: var(--muted); font-size: .71rem; font-weight: 400; }
.recent-amount { max-width: 45%; font-size: .91rem; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.recent-list .empty { min-height: 9rem; justify-content: center; color: var(--muted); font-size: .86rem; }

.table-heading { flex-wrap: wrap; padding: 1.2rem 1.45rem; }
.controls, .row-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.table-heading .controls input { width: min(15rem, 100%); }
.table-heading button, .table-heading input { font-size: .88rem; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: .88rem .7rem; text-align: left; }
th:first-child, td:first-child { padding-left: 1.45rem; }
th:last-child, td:last-child { padding-right: 1.45rem; }
th { border-block: 1px solid var(--border); background: #f7f8fa; color: var(--muted); font-size: .78rem; font-weight: 600; white-space: nowrap; }
td { border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfe; }
td:nth-child(2) { min-width: 7rem; }
tr .numeric { text-align: right; }
[data-view="customers"] th:last-child, [data-view="accounts"] th:last-child, [data-view="customers"] td:last-child, [data-view="accounts"] td:last-child { text-align: right; }
td.empty { height: 7rem; text-align: center !important; color: var(--muted); }
td small { display: block; color: var(--muted); font-size: .76rem; }
td button { min-height: 2.2rem; padding: .34rem .6rem; font-size: .79rem; white-space: nowrap; }
.row-actions { justify-content: end; }
.state { display: inline-flex; align-items: center; gap: .36rem; padding: .22rem .49rem; border-radius: .36rem; background: #f0f2f6; color: #495366; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.state::before { width: .37rem; height: .37rem; border-radius: 50%; background: currentColor; content: ""; }
.state:is([data-state="active"], [data-state="verified"]) { background: #e8f2ee; color: #1c654e; }
.state:is([data-state="restricted"], [data-state="blocked"]) { background: #fcecef; color: #922a3e; }
.section-note { margin-bottom: .75rem; color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.limit-note { margin-inline: 1.45rem; }
.workspace-footer { margin-top: 1.1rem; padding-inline: .12rem; }
dialog { width: min(29rem, calc(100% - 2rem)); padding: 1.55rem; color: var(--ink); background: var(--white); border: 1px solid var(--border); border-radius: .9rem; box-shadow: 0 1.6rem 4rem #17233d30; }
dialog::backdrop { background: rgb(16 24 43 / 40%); }
dialog h2 { margin-bottom: 1.1rem; font-size: 1.4rem; letter-spacing: -.035em; }
dialog .controls { justify-content: end; margin-top: 1.35rem; }
.form-error { color: #922a3e; margin-bottom: .65rem; }

@media (max-width: 960px) {
  .masthead-inner { grid-template-columns: 1fr 1fr; gap: .5rem 1.2rem; padding-block: .7rem; }
  .navigation { grid-row: 2; grid-column: 1 / -1; justify-self: start; max-width: 100%; }
  .summary-grid { grid-template-columns: minmax(0, 1.8fr) minmax(13rem, 1fr); }
  .activity-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  #page-content { padding-top: 1.7rem; }
  .page-heading { flex-direction: column; align-items: start; margin-bottom: 1.15rem; gap: .75rem; }
  .page-tools { flex-direction: row-reverse; }
  .summary-grid, .activity-grid { grid-template-columns: minmax(0, 1fr); }
  .balance { font-size: clamp(2.65rem, 10vw, 4.7rem); }
  .ledger-panel { min-height: 11rem; }
  .table-scroll table { min-width: 34rem; }
}
@media (max-width: 430px) {
  .brand { font-size: 1.38rem; }
  .ops-wordmark { width: 6.25rem; }
  .navigation { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .12rem; width: 100%; }
  .navigation a { display: grid; place-items: center; padding-inline: .17rem; font-size: .76rem; text-align: center; white-space: normal; }
  .metrics > div { padding-inline: .54rem; }
  .chart-label { font-size: .6rem; }
  .table-heading { padding-inline: 1rem; }
}
.beta-detail { display: grid; gap: .95rem; margin-top: .95rem; }
.beta-invite { display: grid; justify-items: start; gap: .55rem; margin-bottom: 1rem; padding: .85rem; border-radius: .6rem; background: var(--accent-light); }
.beta-invite code { max-width: 100%; overflow-wrap: anywhere; user-select: all; }
#beta-status:empty { display: none; }
