:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #222e2b;
  background: #f5f7f6;
  font-synthesis: none;
  --green: #176c57;
  --line: #e4eae7;
  --muted: #72807b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button,
input,
select {
  border-radius: 7px;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #78b6a6;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.8px;
  margin-bottom: 10px;
}
h2 {
  font-size: 17px;
  margin: 0;
}
h3 {
  font-size: 17px;
}
p {
  line-height: 1.7;
}
.muted {
  color: var(--muted);
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.block {
  display: block;
  margin-top: 6px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.layout {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 32px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: 2px;
}
.brand-mark {
  display: grid;
  place-items: center;
  border-radius: 10px;
  width: 33px;
  height: 36px;
  background: var(--green);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 25px;
  font-style: italic;
}
.workspace-label {
  font-size: 11px;
  color: var(--muted);
  margin: 14px 0 40px 44px;
  letter-spacing: 2px;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.nav-item {
  text-align: left;
  background: transparent;
  border: 0;
  padding: 14px 16px;
  color: #6a7772;
  display: flex;
  gap: 15px;
  align-items: center;
  font-size: 14px;
}
.nav-item > span {
  font-size: 22px;
  line-height: 1;
}
.nav-item.active {
  background: #e8f2ed;
  color: var(--green);
  font-weight: 650;
}
.nav-item:hover {
  background: #f0f5f2;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
  color: var(--muted);
  font-size: 12px;
}
.sidebar-bottom button {
  display: block;
  background: transparent;
  border: 0;
  margin-top: 20px;
  padding: 0;
  color: var(--muted);
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #51a58d;
  border-radius: 50%;
  margin-right: 6px;
}
.main {
  padding: 0 40px;
  max-width: 1700px;
  width: 100%;
  margin: auto;
}
.topbar {
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.book-picker select {
  border: 0;
  background: transparent;
  font-size: 13px;
  padding: 8px;
  color: #45564e;
  max-width: 200px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0 22px;
  gap: 16px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 650;
  color: var(--green);
  margin-bottom: 12px;
}
.page-heading p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.secondary {
  border: 1px solid #d8e2dc;
  background: #fff;
  color: #4f645b;
  padding: 10px 14px;
  font-size: 12px;
  white-space: nowrap;
}
.primary {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
  padding: 11px 18px;
  font-size: 13px;
}
.text-button {
  border: 0;
  background: none;
  color: var(--green);
  font-size: 12px;
  padding: 8px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.metric {
  padding: 23px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.metric > div {
  font-size: 12px;
  color: #5e7167;
  display: flex;
  justify-content: space-between;
}
.metric > div > span {
  font-size: 10px;
  color: #97a29c;
}
.metric strong {
  display: block;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1px;
  margin: 22px 0 12px;
  font-variant-numeric: tabular-nums;
}
.metric strong small {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}
.metric > small {
  font-size: 10px;
  color: var(--muted);
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 13px;
}
.broker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.broker-card {
  padding: 22px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
  border-radius: 12px;
  color: inherit;
}
.broker-card:hover {
  border-color: #80b3a3;
}
.broker-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.broker-title h3 {
  margin: 0;
  font-size: 15px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #edf4f0;
  color: #4b8069;
  border-radius: 9px;
  font-size: 15px;
}
.arrow {
  margin-left: auto;
  color: #8b9e93;
}
.broker-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.broker-values > div > small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 10px;
}
.broker-values b {
  font-size: 19px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.broker-values b small {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  gap: 12px;
}
.panel-heading p {
  color: var(--muted);
  font-size: 11px;
  margin: 8px 0 0;
}
.pill {
  font-size: 10px;
  background: #f0f4f1;
  color: #6b7f72;
  border: 1px solid #e2eae5;
  padding: 5px 9px;
  border-radius: 5px;
  letter-spacing: 0;
  font-weight: 400;
  white-space: nowrap;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  font-weight: 450;
  color: #7a8981;
  background: #f8faf9;
  font-size: 11px;
  white-space: nowrap;
  padding: 13px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
td {
  padding: 16px 24px;
  border-bottom: 1px solid #eff2f0;
  line-height: 1.5;
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  font-weight: 550;
}
.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.numeric small {
  font-size: 10px;
  color: var(--muted);
}
.account-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.account-tree nav {
  max-height: 68vh;
  overflow: auto;
  padding: 0 8px 12px;
}
.tree-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 10px;
}
.account-row {
  display: flex;
  align-items: center;
}
.account-children {
  padding-left: 16px;
}
.account-toggle,
.account-toggle-space {
  flex: 0 0 32px;
  width: 32px;
  height: 40px;
}
.account-toggle {
  border: 0;
  background: transparent;
  color: #587065;
  font-size: 17px;
}
.account-toggle:hover {
  background: #f2f6f3;
}
.account-node {
  display: flex;
  align-items: center;
  text-align: left;
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: #587065;
  padding: 12px 8px;
  border-radius: 6px;
}
.account-node.selected {
  background: #e8f2ed;
  color: #176c57;
  font-weight: 600;
}
.account-node:hover {
  background: #f2f6f3;
}
.breadcrumb {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
  line-height: 1.6;
}
.account-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 24px 18px;
  font-size: 12px;
}
.account-toolbar label,
.check-label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.account-footnote {
  font-size: 11px;
  color: var(--muted);
  padding: 20px 24px;
  margin: 0;
}
.notice {
  font-size: 12px;
  background: #fff6e2;
  padding: 14px 20px;
  border-radius: 8px;
  margin: 0 0 20px;
  line-height: 1.7;
}
.account-detail .notice {
  margin: 0 20px 20px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 22px;
  align-items: end;
}
.filters label {
  display: grid;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
}
.filters input,
.filters select {
  border: 1px solid #dfe6e1;
  padding: 10px;
  background: #fff;
  color: #41574a;
  font-size: 12px;
  max-width: 240px;
  width: 100%;
}
.filters .search-field {
  flex: 1;
  min-width: 200px;
}
.filters .search-field input {
  max-width: none;
}
.filters select {
  max-width: 210px;
}
.filters .check-label {
  display: flex;
  align-self: center;
  font-size: 11px;
}
.filters input[type="checkbox"] {
  width: auto;
  accent-color: var(--green);
}
.table-meta {
  display: flex;
  justify-content: space-between;
  padding: 12px 24px 18px;
  font-size: 12px;
  color: #546b5b;
  gap: 16px;
}
.table-meta span {
  font-size: 11px;
  color: var(--muted);
}
.transaction-link {
  border: 0;
  background: none;
  color: #2f5645;
  text-align: left;
  padding: 0;
  line-height: 1.7;
  font-size: 12px;
  min-width: 200px;
}
.transaction-link:hover {
  text-decoration: underline;
}
.transaction-table td {
  vertical-align: top;
}
.date {
  white-space: nowrap;
  font-size: 11px;
  color: #728278;
}
.tag {
  background: #f1f5f2;
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 10px;
  white-space: nowrap;
  color: #64816e;
}
.positive {
  color: #246c52;
}
.negative {
  color: #775956;
}
.pagination {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.pagination button + button {
  margin-left: 8px;
}
.empty {
  padding: 55px 25px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.error {
  color: #a54939;
}
.login {
  max-width: 500px;
  padding: 60px 24px;
  margin: 4vh auto;
}
.login-card {
  margin: 60px 0 30px;
}
.login-card h1 {
  font-size: 29px;
}
.login-card > p {
  color: var(--muted);
  font-size: 14px;
}
.login-card form {
  display: grid;
  gap: 14px;
  margin-top: 32px;
}
.login-card label {
  font-size: 13px;
}
.login-card input {
  padding: 15px;
  border: 1px solid #cfdcd4;
  background: #fff;
}
.login-card button {
  padding: 15px;
  display: flex;
  justify-content: space-between;
}
.login-card .error {
  font-size: 12px;
  min-height: 20px;
  margin: 0;
}
.login-note {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 20px;
}
.login footer {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
  text-align: center;
}
dialog {
  width: min(950px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  max-height: 88vh;
  color: #263d30;
  box-shadow: 0 24px 80px #17362930;
}
dialog::backdrop {
  background: #162d2560;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
dialog > h3 {
  font-size: 16px;
  line-height: 1.7;
  font-weight: 500;
}
.detail-meta {
  display: flex;
  gap: 22px;
  font-size: 12px;
  color: var(--muted);
}
.tx-id {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.direction {
  padding: 5px 8px;
  border-radius: 5px;
}
.debit {
  background: #eaf4ee;
  color: #38755b;
}
.credit {
  background: #f4efe7;
  color: #8f724d;
}
dialog td,
dialog th {
  padding: 14px 12px;
}
dialog .account-footnote {
  padding: 18px 0 0;
}
.startup {
  padding: 20vh 30px;
  text-align: center;
  color: var(--muted);
}
@media (min-width: 1450px) {
  .main {
    padding: 0 56px;
  }
}
@media (max-width: 1100px) {
  .main {
    padding: 0 24px;
  }
  .layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .sidebar {
    padding: 28px 14px;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .account-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  td,
  th {
    padding: 14px 18px;
  }
  .metric strong {
    margin: 16px 0 10px;
  }
}
@media (max-width: 760px) {
  .layout {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    padding: 18px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    font-size: 16px;
  }
  .brand-mark {
    width: 27px;
    height: 29px;
    font-size: 22px;
  }
  .workspace-label {
    display: none;
  }
  .sidebar nav {
    display: flex;
    margin-top: 18px;
    gap: 8px;
  }
  .nav-item {
    flex: 1;
    justify-content: center;
    padding: 11px 5px;
    font-size: 12px;
    gap: 8px;
  }
  .nav-item > span {
    font-size: 18px;
  }
  .sidebar-bottom {
    position: absolute;
    right: 20px;
    top: 24px;
    padding: 0;
    font-size: 10px;
  }
  .sidebar-bottom button {
    display: inline;
    margin: 0 0 0 12px;
    font-size: 10px;
  }
  .main {
    padding: 0 16px;
  }
  .topbar {
    height: 55px;
  }
  .page-heading {
    padding: 25px 0 20px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading p {
    font-size: 11px;
    max-width: 230px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .metric-grid {
    gap: 10px;
  }
  .metric {
    padding: 17px 14px;
  }
  .metric strong {
    font-size: 24px;
  }
  .metric > small {
    font-size: 9px;
  }
  .metric strong small {
    font-size: 9px;
  }
  .broker-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .broker-card {
    padding: 18px;
  }
  .broker-title {
    margin-bottom: 18px;
  }
  .section-title {
    margin-top: 24px;
  }
  .panel-heading {
    padding: 18px;
  }
  .holdings table {
    min-width: 820px;
  }
  .account-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .account-tree,
  .account-detail {
    width: 100%;
  }
  .account-tree nav {
    max-height: 235px;
  }
  .account-toolbar {
    padding: 0 18px 18px;
  }
  .account-detail table {
    min-width: 400px;
  }
  .filters {
    padding: 16px;
    gap: 12px;
  }
  .filters label {
    flex: 1 1 42%;
    min-width: 0;
  }
  .filters label.search-field {
    flex-basis: 100%;
  }
  .filters select {
    max-width: 100%;
  }
  .filters .check-label {
    flex-basis: 100%;
  }
  .filters .primary,
  .filters .secondary {
    flex: 1;
  }
  .table-meta {
    padding: 12px 16px;
    display: block;
    line-height: 2;
  }
  .table-meta span {
    display: block;
  }
  .transaction-table {
    min-width: 770px;
  }
  .pagination {
    padding: 16px;
  }
  dialog {
    padding: 18px;
  }
  dialog table {
    min-width: 690px;
  }
  .dialog-heading {
    margin-bottom: 20px;
  }
  h2 {
    font-size: 15px;
  }
}
