@import url("../fonts/font-faces.css");
:root {
  --bg: #f5f6f3;
  --surface: #ffffff;
  --sidebar: #edf0ea;
  --ink: #26372f;
  --muted: #5d6b61;
  --line: #dfe5dc;
  --accent: #265846;
  --accent-hover: #1c4435;
  --accent-soft: #e9f0e8;
  --positive: #297048;
  --negative: #b04437;
  --warning: #795b21;
  --warning-bg: #faf4e5;
  --focus: #2768b0;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --text-display: 2.5rem;
  --radius: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: var(--text-sm);
  line-height: 1.6;
  font-weight: 400;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
h2 {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.5;
}
h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.5;
}
strong,
b {
  font-weight: 600;
}
small {
  font-size: var(--text-xs);
}
p {
  overflow-wrap: anywhere;
}
button,
input,
select,
textarea,
a,
summary {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
button {
  font-variant-numeric: tabular-nums;
}
input,
select,
textarea {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5c8;
  background: var(--surface);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: var(--text-base);
}
select {
  padding-inline-end: 28px;
}
input[type="date"] {
  min-width: 0;
  max-width: 100%;
}
textarea {
  resize: vertical;
}
input[readonly] {
  background: var(--bg);
}
input[type="checkbox"] {
  min-height: 20px;
  width: 20px;
  height: 20px;
  padding: 0;
  accent-color: var(--accent);
  flex-shrink: 0;
}
input[type="file"] {
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: var(--text-sm);
}
input::file-selector-button {
  border: 0;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 5px;
  padding: 8px 10px;
  margin-inline-end: 10px;
}
ul {
  padding: 0;
  margin: 0;
  list-style: none;
}
fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
legend {
  font-weight: 600;
  margin-block-end: 10px;
}
pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: var(--text-xs);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--bg);
  border-radius: 8px;
  padding: 16px;
  max-height: 400px;
  overflow: auto;
}
dl,
dd {
  margin: 0;
}
dd {
  overflow-wrap: anywhere;
}
details summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
details summary::after {
  content: "+";
  margin-inline-start: auto;
  font-size: var(--text-lg);
}
details[open] summary::after {
  content: "−";
}
summary::-webkit-details-marker {
  display: none;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  padding: 12px 20px;
  background: var(--surface);
  z-index: 20;
}
.skip-link:focus {
  top: 10px;
}
.boot {
  padding: 40px;
}
.muted {
  color: var(--muted);
}
.positive {
  color: var(--positive);
}
.negative,
.danger-text {
  color: var(--negative) !important;
}
.numeric {
  font-variant-numeric: tabular-nums;
  text-align: end;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.5;
  transition:
    background-color 120ms,
    color 120ms;
  text-align: center;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.primary {
  background: var(--accent);
  color: #fff;
}
.secondary {
  border-color: #cbd5c8;
  background: var(--surface);
}
.quiet {
  padding-inline: 10px;
  color: var(--muted);
}
.text-button {
  color: var(--accent);
  min-height: 40px;
  padding: 7px 4px;
}
.icon-button {
  padding: 8px;
  width: 44px;
  flex-shrink: 0;
}
.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-block: 20px;
}
.value-link {
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  padding: 8px 0;
  min-height: 40px;
  text-align: inherit;
  overflow-wrap: anywhere;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  flex-shrink: 0;
}
.link-arrow svg {
  width: 16px;
}
.sidebar {
  width: 216px;
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  background: var(--sidebar);
  border-inline-end: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 32px 20px;
  z-index: 5;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  padding-inline: 8px;
  text-decoration: none !important;
}
.brand > span {
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: 1.4;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 400;
  margin-top: 5px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-block-start: 42px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 8px;
  min-height: 46px;
  position: relative;
}
.nav-link:hover {
  text-decoration: none;
}
.nav-link.active {
  background: #dce6d9;
  color: var(--accent);
  font-weight: 600;
}
.nav-link.active::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  width: 3px;
  height: 18px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-count {
  margin-inline-start: auto;
  font-size: var(--text-xs);
  color: var(--muted);
}
.sidebar-bottom {
  margin-top: auto;
  display: flex;
  gap: 10px;
  padding: 20px 8px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.sidebar-bottom svg {
  margin-top: 3px;
  width: 18px;
}
.sidebar-bottom strong {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
}
.sidebar-bottom span {
  font-size: var(--text-xs);
  display: block;
  margin-top: 5px;
}
.workspace {
  margin-inline-start: 216px;
  min-width: 0;
}
.topbar {
  min-height: 76px;
  padding: 16px 36px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
}
.breadcrumb {
  font-size: var(--text-xs);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 14px;
}
.breadcrumb strong {
  color: var(--ink);
  font-weight: 500;
}
.breadcrumb span {
  color: #77857a;
}
.top-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.save-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: var(--text-xs);
}
.save-status svg {
  width: 15px;
  height: 15px;
}
.top-tools .btn {
  min-height: 40px;
  font-size: var(--text-xs);
}
#main {
  padding: 24px 36px 32px;
  max-width: 1520px;
  margin-inline: auto;
  min-height: calc(100vh - 140px);
}
.demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: #eaf0e5;
  border-radius: 8px;
  color: #4f6247;
  font-size: var(--text-xs);
  margin-bottom: 26px;
}
.demo-banner strong {
  font-weight: 500;
}
.demo-banner .btn {
  font-size: var(--text-xs);
  min-height: 32px;
  padding: 4px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.page-heading p {
  color: var(--muted);
  margin-top: 8px;
}
.heading-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 0;
  margin-bottom: 24px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.section-title > span {
  font-size: var(--text-xs);
}
.section-title p {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: 5px;
}
.section-title a {
  font-size: var(--text-xs);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.32fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.dashboard-grid > .panel {
  margin: 0;
}
.total-panel {
  background: #eaf0e8;
  border-radius: var(--radius);
  padding: 28px 28px 0;
  min-width: 0;
}
.total-panel .section-title {
  margin-bottom: 12px;
}
.total-value {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 0;
  background: none;
  padding: 0;
  text-align: start;
  color: var(--ink);
  font-size: var(--text-display);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  max-width: 100%;
  word-break: break-word;
}
.total-value svg {
  width: 22px;
  color: var(--accent);
}
.total-caption {
  color: var(--muted);
  font-size: var(--text-xs);
  margin-top: 7px;
}
.hero-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-block: 26px 22px;
  gap: 24px;
}
.metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 0;
  background: none;
  min-width: 0;
  text-align: start;
  padding: 0;
  color: var(--ink);
}
.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  font-size: var(--text-xs);
  color: var(--muted);
}
.metric-label svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}
.metric strong {
  font-size: var(--text-xl);
  font-weight: 500;
  margin-top: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  max-width: 100%;
  letter-spacing: -0.025em;
}
.metric-note {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: 8px;
}
.hero-breakdown .metric strong {
  font-size: var(--text-lg);
  margin-top: 8px;
}
.balance-strip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid #cfdcc9;
  padding-block: 17px;
  font-size: var(--text-xs);
  color: var(--muted);
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  margin-inline-end: 8px;
}
.available-dot {
  background: #668d73;
}
.reserved-dot {
  background: #a9b69f;
}
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 24px;
  padding: 24px 0;
}
.metrics-row > .metric {
  padding: 0 24px;
  border-inline-end: 1px solid var(--line);
}
.metrics-row > .metric:last-child {
  border: 0;
}
.metrics-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.metrics-row strong {
  font-size: var(--text-lg);
}
.allocation-content {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(105px, 1fr);
  gap: 22px;
  align-items: center;
  padding-block: 20px 8px;
}
.allocation-panel {
  display: flex;
  flex-direction: column;
}
.allocation-panel .section-title {
  margin-bottom: 10px;
}
.donut {
  position: relative;
  max-width: 200px;
  margin: auto;
  width: 100%;
  aspect-ratio: 1;
}
.donut > svg {
  width: 100%;
  height: 100%;
}
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}
.donut-center strong {
  font-size: var(--text-xl);
  font-weight: 500;
}
.donut-center span {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: 2px;
}
.legend {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.legend button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: none;
  width: 100%;
  padding: 6px 0;
  min-height: 34px;
  color: var(--ink);
  font-size: var(--text-xs);
}
.legend strong {
  font-weight: 500;
  color: var(--muted);
}
.inline-select select {
  font-size: var(--text-xs);
  min-height: 36px;
  padding: 7px 24px 7px 10px;
  background: var(--bg);
  border-color: var(--line);
  width: auto;
}
.chart-empty {
  margin: auto;
  text-align: center;
  max-width: 260px;
  color: var(--muted);
  padding: 28px 0;
}
.chart-empty p {
  margin: 12px 0;
}
.range-filter {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 24px;
  flex-wrap: wrap;
}
.range-filter > span {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-inline-end: auto;
  align-self: center;
}
.range-filter .field {
  margin: 0;
  max-width: 170px;
}
.range-filter .field > span {
  font-size: var(--text-xs);
}
.range-filter input {
  font-size: var(--text-sm);
  min-height: 40px;
  padding: 7px 10px;
}
.range-filter .btn {
  min-height: 40px;
}
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  overscroll-behavior-inline: contain;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  table-layout: auto;
}
th {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--muted);
  text-align: start;
  white-space: nowrap;
  background: #f8f9f6;
}
th,
td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th:first-child,
td:first-child {
  padding-inline-start: 10px;
}
th:last-child,
td:last-child {
  padding-inline-end: 10px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
td {
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
td small {
  display: block;
  margin-top: 4px;
}
td.numeric {
  white-space: normal;
}
td.numeric strong {
  font-weight: 500;
}
.asset-cell {
  display: flex;
  gap: 11px;
  align-items: center;
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  padding: 0;
  text-align: start;
  min-height: 44px;
}
.asset-cell strong {
  font-weight: 500;
  display: block;
}
.asset-cell small {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: 1px;
}
.coin {
  width: 35px;
  height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: var(--text-lg);
  font-weight: 500;
  flex-shrink: 0;
}
.coin-BTC {
  background: #fbefd9;
  color: #925e11;
}
.coin-ETH {
  background: #e9ecf6;
  color: #56658f;
}
.coin-BNB {
  background: #f4efda;
  color: #786414;
}
.coin-SOL {
  background: #e8ede5;
  color: #526e4b;
}
.coin-USD {
  background: #e8efea;
  color: #3c674e;
}
.holdings-table th:nth-child(1) {
  width: 22%;
}
.full th:nth-child(1) {
  width: auto;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.two-col > .panel {
  margin-bottom: 24px;
}
.activity-list li + li {
  border-top: 1px solid var(--line);
}
.activity-list button {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  padding: 15px 0;
  color: var(--ink);
  width: 100%;
  text-align: start;
}
.activity-icon {
  background: var(--bg);
  color: var(--muted);
  border-radius: 9px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.activity-icon svg {
  width: 17px;
  height: 17px;
}
.activity-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.activity-name strong {
  font-size: var(--text-sm);
  font-weight: 500;
  display: block;
}
.activity-name small {
  font-size: var(--text-xs);
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.activity-amount {
  font-size: var(--text-xs);
  text-align: end;
  max-width: 42%;
  overflow-wrap: anywhere;
}
.pnl-chart + .pnl-chart {
  margin-top: 24px;
}
.pnl-chart h3 {
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 12px;
}
.bar-row {
  display: grid;
  grid-template-columns: 1fr 1fr 90px;
  align-items: center;
  width: 100%;
  gap: 10px;
  border: 0;
  background: none;
  color: var(--ink);
  padding: 9px 0;
  min-height: 40px;
  font-size: var(--text-xs);
  text-align: start;
}
.bar-row > span:first-child {
  overflow-wrap: anywhere;
}
.bar-row strong {
  text-align: end;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.bar-track {
  position: relative;
  min-height: 18px;
  width: 100%;
  background: #f7f8f5;
  border-radius: 4px;
}
.zero-line {
  position: absolute;
  left: 50%;
  inset-block: 0;
  width: 1px;
  background: #c9d3c5;
}
.pnl-bar {
  position: absolute;
  top: 3px;
  height: 12px;
  border-radius: 2px;
}
.pnl-bar.gain {
  left: 50%;
  background: #789a7b;
}
.pnl-bar.loss {
  right: 50%;
  background: #c77968;
}
.bar-axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: var(--text-xs);
  margin: 8px 90px 0 34%;
  gap: 12px;
}
.notice {
  background: var(--warning-bg);
  border: 1px solid #eadbb6;
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--warning);
  font-size: var(--text-xs);
  margin-bottom: 24px;
}
.notice.danger {
  color: var(--negative);
  background: #fff0ec;
  border-color: #ecd0c8;
}
.notice > summary {
  min-height: 28px;
}
.notice > summary > span {
  margin-inline-start: auto;
  text-decoration: underline;
}
.notice > summary::after {
  margin: 0;
}
.notice li {
  padding-top: 8px;
}
.notice li .btn {
  font-size: var(--text-xs);
}
.status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--bg);
  color: var(--muted);
  font-size: var(--text-xs);
}
.status.active {
  background: #eaf0e7;
  color: #3c674e;
}
.status.closed {
  background: #edf0f5;
  color: #57657c;
}
.status.deleted {
  background: #faece8;
  color: #a14537;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}
.project-tile {
  padding: 18px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--ink);
  text-align: start;
  min-width: 0;
}
.project-tile > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.project-category {
  font-size: var(--text-xs);
  color: var(--muted);
}
.project-tile h3 {
  margin-block: 9px 16px;
  font-size: var(--text-base);
  overflow-wrap: anywhere;
}
.project-tile-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--text-xs);
  color: var(--muted);
  flex-wrap: wrap;
}
.project-tile-footer strong {
  font-weight: 500;
  color: var(--ink);
  margin-inline-start: 6px;
}
.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
  align-items: end;
}
.filters .field {
  margin: 0;
}
.filters input,
.filters select {
  font-size: var(--text-sm);
}
.search-input {
  position: relative;
}
.search-input svg {
  position: absolute;
  inset-inline-start: 11px;
  top: 13px;
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.search-input input {
  padding-inline-start: 36px;
}
.filter-actions {
  display: flex;
  gap: 12px;
}
.row-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.entry-table td:nth-child(2) {
  max-width: 260px;
}
.entry-table td:nth-child(4) {
  max-width: 240px;
}
.deleted-row {
  background: #faf8f5;
  color: var(--muted);
}
.fiat-panel dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.fiat-panel dt {
  font-size: var(--text-xs);
  color: var(--muted);
}
.fiat-panel dd {
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
  font-weight: 500;
}
.settings-form {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.settings-form .field {
  margin: 0;
  max-width: 200px;
}
.settings-form .btn {
  align-self: flex-end;
}
.data-facts {
  margin-block: 20px;
}
.data-facts > div,
.detail-definition > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.data-facts dt,
.detail-definition dt {
  color: var(--muted);
  font-size: var(--text-xs);
}
.audit-list li {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-block: 8px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.audit-list li > span {
  color: var(--muted);
  font-size: var(--text-xs);
}
.audit-list strong {
  flex: 1;
  overflow-wrap: anywhere;
}
.rules-panel dl > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  margin-top: 20px;
}
.rules-panel dt {
  font-weight: 500;
}
.rules-panel dd {
  color: var(--muted);
  max-width: 75ch;
}
.page-footer {
  max-width: 1520px;
  margin: auto;
  padding: 0 36px 28px;
  color: var(--muted);
  font-size: var(--text-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.page-footer a {
  display: flex;
  align-items: center;
  gap: 6px;
}
.page-footer svg {
  width: 14px;
  height: 14px;
}
.empty-state {
  text-align: center;
  padding: 38px 16px;
  color: var(--muted);
}
.empty-state > svg {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  color: #81927f;
}
.empty-state h3 {
  font-size: var(--text-base);
  color: var(--ink);
}
.empty-state p {
  margin: 8px auto 18px;
  max-width: 40ch;
}
.empty-state .btn {
  margin: auto;
}
dialog {
  border: 0;
  border-radius: 18px;
  box-shadow: 0 20px 80px #102c2430;
  width: min(720px, calc(100vw - 40px));
  max-width: 100%;
  padding: 28px;
  color: var(--ink);
  background: var(--surface);
  max-height: calc(100dvh - 48px);
  overscroll-behavior: contain;
  overflow-y: auto;
}
dialog.wide {
  width: min(1020px, calc(100vw - 40px));
}
dialog::backdrop {
  background: #1c302a70;
  backdrop-filter: blur(2px);
}
.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.dialog-head h2 {
  font-size: var(--text-lg);
}
.dialog-head p {
  color: var(--muted);
  font-size: var(--text-xs);
  margin-top: 7px;
}
.dialog-head .icon-button {
  margin-top: -8px;
  margin-inline-end: -8px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.dialog-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.form-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  flex-wrap: wrap;
  padding-bottom: 12px;
}
.form-tabs .btn {
  padding-inline: 12px;
  font-size: var(--text-xs);
}
.form-tabs .selected {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  min-width: 0;
}
.field > span {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.money-inputs {
  grid-template-columns: 0.8fr 1fr 1.2fr;
}
.money-group {
  padding-block: 18px;
  border-top: 1px solid var(--line);
}
.money-group legend {
  padding-top: 14px;
  margin-bottom: 0;
  font-size: var(--text-sm);
}
.money-group .field {
  margin-bottom: 8px;
}
.field-help {
  font-size: var(--text-xs);
  color: var(--muted);
  margin: 2px 0 16px;
  max-width: 75ch;
}
.field-help .btn {
  font-size: var(--text-xs);
  min-height: 30px;
  padding: 2px 4px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-size: var(--text-sm);
  cursor: pointer;
}
.form-section {
  border-top: 1px solid var(--line);
  margin-bottom: 18px;
  padding-top: 5px;
}
.form-section > summary {
  font-weight: 500;
  margin-bottom: 10px;
}
.form-section > summary span {
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: 400;
}
.release-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.snapshot-fields {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 8px;
}
.snapshot-fields legend {
  padding-top: 12px;
}
.snapshot-row {
  padding-block: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.snapshot-row > .check-label {
  margin-bottom: 12px;
}
.snapshot-row .field-help {
  margin-bottom: 4px;
}
.snapshot-row > .check-label:last-child {
  font-size: var(--text-xs);
  margin: 0;
}
.calculation-preview {
  display: block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}
.form-error {
  padding: 14px 16px;
  color: var(--negative);
  background: #fff0ec;
  border-radius: 8px;
  line-height: 1.7;
  margin-top: 16px;
  overflow-wrap: anywhere;
  font-size: var(--text-sm);
}
.detail-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.detail-meta > span:not(.status) {
  font-size: var(--text-xs);
  color: var(--muted);
}
.detail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-block: 24px;
}
.detail-stats > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.detail-stats span,
.detail-stats small {
  font-size: var(--text-xs);
  color: var(--muted);
}
.detail-stats strong {
  font-size: var(--text-lg);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.detail-amount {
  font-size: var(--text-lg);
  font-weight: 500;
  margin-bottom: 24px;
  overflow-wrap: anywhere;
}
.note-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--bg);
  padding: 16px;
  border-radius: 8px;
  margin-block: 20px;
}
.settlement-list {
  margin-block: 16px 24px;
}
.settlement-list li {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-block: 12px;
  overflow-wrap: anywhere;
}
.settlement-list span,
.settlement-list small {
  color: var(--muted);
  font-size: var(--text-xs);
}
.settlement-list .btn {
  text-align: start;
  justify-content: flex-start;
  padding: 0;
  min-height: 32px;
}
.mapping-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 16px;
}
.mapping-grid select {
  font-size: var(--text-sm);
}
.import-summary {
  background: var(--accent-soft);
  padding: 16px;
  border-radius: 8px;
  margin-block: 24px 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.import-summary span {
  font-size: var(--text-xs);
  color: var(--muted);
}
.import-preview {
  max-height: 360px;
  margin-block: 20px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 12px 20px;
  max-width: min(560px, calc(100vw - 32px));
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms;
  font-size: var(--text-sm);
  width: max-content;
}
#toast.visible {
  opacity: 1;
}
@media (hover: hover) {
  .primary:hover {
    background: var(--accent-hover);
  }
  .secondary:hover,
  .quiet:hover,
  .nav-link:not(.active):hover {
    background: var(--accent-soft);
  }
  .text-button:hover,
  .value-link:hover {
    text-decoration: underline;
  }
  .metric:hover .metric-label {
    color: var(--accent);
  }
  .project-tile:hover h3,
  .activity-list button:hover strong {
    color: var(--accent);
  }
}
@media (min-width: 1700px) {
  #main {
    padding-inline: 48px;
  }
  .dashboard-grid {
    grid-template-columns: 1.5fr 1fr;
  }
}
@media (max-width: 1180px) {
  .sidebar {
    width: 190px;
    padding-inline: 14px;
  }
  .workspace {
    margin-inline-start: 190px;
  }
  #main {
    padding-inline: 24px;
  }
  .topbar {
    padding-inline: 24px;
  }
  .dashboard-grid {
    grid-template-columns: 1.15fr 1fr;
    gap: 18px;
  }
  .allocation-content {
    gap: 10px;
  }
  .panel {
    padding: 20px;
  }
  .total-panel {
    padding: 24px 24px 0;
  }
  .metrics-row > .metric {
    padding-inline: 18px;
  }
  .two-col {
    gap: 18px;
  }
  .activity-list button {
    gap: 9px;
  }
  .activity-icon {
    display: none;
  }
  .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .top-tools {
    gap: 4px;
  }
  .bar-row {
    grid-template-columns: 1fr 0.7fr 85px;
  }
  .full {
    font-size: var(--text-xs);
  }
  .full th,
  .full td {
    padding-inline: 8px;
  }
}
@media (max-width: 960px) {
  .sidebar {
    width: 164px;
    padding-inline: 10px;
  }
  .brand {
    padding-inline: 4px;
  }
  .brand > span {
    font-size: var(--text-lg);
  }
  .brand small {
    font-size: var(--text-xs);
  }
  .nav-link {
    padding-inline: 10px;
    gap: 8px;
  }
  .nav-count {
    display: none;
  }
  .workspace {
    margin-inline-start: 164px;
  }
  .breadcrumb {
    display: none;
  }
  .topbar {
    justify-content: flex-end;
  }
  .sidebar-bottom {
    padding-inline: 4px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .allocation-content {
    grid-template-columns: 180px 1fr;
    gap: 40px;
    max-width: 470px;
    margin: auto;
    width: 100%;
    padding: 0;
  }
  .allocation-panel .section-title {
    margin-bottom: 8px;
  }
  .metrics-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 0;
  }
  .metrics-row > .metric:nth-child(2) {
    border: 0;
  }
  .metrics-row.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .metrics-row.three > .metric:nth-child(2) {
    border-inline-end: 1px solid var(--line);
  }
  .two-col {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .two-col > .panel {
    margin-bottom: 24px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .heading-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 50%;
  }
  .heading-actions .btn {
    padding-inline: 12px;
  }
  .holdings-table {
    font-size: var(--text-xs);
  }
  .holdings-table th,
  .holdings-table td {
    padding-inline: 7px;
  }
  .asset-cell {
    gap: 7px;
  }
  .coin {
    width: 30px;
    height: 30px;
  }
  .bar-row {
    grid-template-columns: 1fr 1fr 100px;
  }
  .bar-axis {
    margin-inline-start: 34%;
    margin-inline-end: 100px;
  }
  .fiat-panel dl {
    gap: 24px;
  }
}
@media (max-width: 700px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 16px 16px 0;
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    padding: 0;
  }
  .brand img {
    width: 34px;
    height: 34px;
  }
  .brand > span {
    font-size: var(--text-lg);
    display: flex;
    align-items: baseline;
    gap: 10px;
  }
  .brand small {
    display: inline;
    font-size: var(--text-xs);
    margin: 0;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(2.8rem, 1fr));
    margin-top: 16px;
    gap: 2px;
  }
  .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 1px;
    font-size: var(--text-xs);
    border-radius: 7px 7px 0 0;
    min-height: 57px;
  }
  .nav-link.active::before {
    inset-inline: 15%;
    top: auto;
    bottom: 0;
    width: 70%;
    height: 2px;
  }
  .nav-link svg {
    width: 18px;
    height: 18px;
  }
  .nav-link span {
    white-space: normal;
    text-align: center;
  }
  .sidebar-bottom {
    display: none;
  }
  .workspace {
    margin: 0;
  }
  .topbar {
    position: absolute;
    inset-inline-end: 12px;
    top: 12px;
    min-height: 40px;
    border: 0;
    background: none;
    padding: 0;
  }
  .top-tools {
    gap: 0;
  }
  .top-tools .save-status,
  .top-tools .quiet:first-of-type {
    display: none;
  }
  .top-tools .btn {
    padding: 6px;
    font-size: var(--text-xs);
  }
  .top-tools .btn svg {
    width: 16px;
  }
  .brand small {
    display: none;
  }
  #main {
    padding: 16px 16px 24px;
    min-height: calc(100vh - 200px);
  }
  .demo-banner {
    margin-bottom: 22px;
    padding: 8px 10px;
    gap: 10px;
  }
  .demo-banner > span {
    max-width: 63%;
    line-height: 1.6;
  }
  .page-heading {
    gap: 12px;
    margin-bottom: 22px;
    align-items: center;
    flex-wrap: wrap;
  }
  .page-heading p {
    font-size: var(--text-xs);
    margin-top: 6px;
  }
  .heading-actions {
    max-width: none;
    gap: 8px;
  }
  .heading-actions .btn {
    padding-inline: 12px;
  }
  .page-heading > div:first-child {
    flex: 1;
    min-width: 160px;
  }
  h1 {
    font-size: var(--text-xl);
  }
  .dashboard-grid {
    gap: 16px;
    margin-bottom: 16px;
  }
  .total-panel {
    padding: 20px 20px 0;
  }
  .total-value {
    font-size: var(--text-display);
    gap: 8px;
  }
  .total-caption {
    margin-top: 4px;
  }
  .total-panel .section-title {
    gap: 6px;
  }
  .total-panel .section-title > span {
    font-size: var(--text-xs);
  }
  .hero-breakdown {
    margin-block: 22px 18px;
    gap: 20px;
  }
  .hero-breakdown .metric-note {
    font-size: var(--text-xs);
  }
  .balance-strip {
    padding-block: 14px;
  }
  .metrics-row {
    margin-bottom: 16px;
    padding-block: 20px;
    gap: 20px 0;
  }
  .metrics-row > .metric {
    padding-inline: 16px;
  }
  .metrics-row.three {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .metrics-row.three > .metric {
    border: 0 !important;
    padding-block: 14px;
    border-bottom: 1px solid var(--line) !important;
  }
  .metrics-row.three > .metric:first-child {
    padding-top: 0;
  }
  .metrics-row.three > .metric:last-child {
    padding-bottom: 0;
    border: 0 !important;
  }
  .metrics-row.three strong {
    margin-top: 7px;
  }
  .metrics-row strong {
    font-size: var(--text-lg);
  }
  .metric-note {
    margin-top: 7px;
  }
  .panel {
    padding: 18px;
    margin-bottom: 16px;
    border-radius: 12px;
  }
  .section-title {
    gap: 10px;
    margin-bottom: 16px;
  }
  .section-title h2 {
    font-size: var(--text-base);
  }
  .section-title p {
    font-size: var(--text-xs);
  }
  .allocation-content {
    grid-template-columns: minmax(120px, 160px) 1fr;
    gap: 24px;
    padding: 0;
    max-width: 360px;
  }
  .donut {
    max-width: 160px;
  }
  .two-col > .panel {
    margin-bottom: 16px;
  }
  .range-filter {
    gap: 8px;
    margin-bottom: 16px;
    justify-content: flex-start;
  }
  .range-filter > span {
    flex-basis: 100%;
  }
  .range-filter .field {
    flex: 1;
    max-width: none;
    min-width: 100px;
  }
  .range-filter input {
    font-size: var(--text-sm);
    padding: 7px;
  }
  .range-filter .btn {
    padding-inline: 10px;
  }
  .range-filter .field > span {
    font-size: var(--text-xs);
  }
  .notice {
    margin-bottom: 16px;
    padding: 10px 12px;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .search-field {
    grid-column: 1/-1;
  }
  .filters .filter-actions {
    grid-column: 1/-1;
  }
  .filters .field {
    margin: 0;
  }
  .filter-actions .btn {
    flex: 1;
  }
  .table-wrap {
    overflow: visible;
  }
  table,
  thead,
  tbody,
  tr,
  td {
    display: block;
  }
  thead {
    display: none;
  }
  tr {
    border-bottom: 1px solid var(--line);
    padding-block: 14px;
  }
  tr:last-child {
    border: 0;
  }
  td {
    border: 0;
    padding: 6px 0 !important;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    max-width: none !important;
    text-align: end;
    font-size: var(--text-sm);
    overflow-wrap: anywhere;
    align-items: flex-start;
  }
  td::before {
    content: attr(data-label);
    font-size: var(--text-xs);
    color: var(--muted);
    flex-shrink: 0;
    max-width: 38%;
    text-align: start;
    align-self: center;
  }
  td[data-label="资产"]::before {
    display: none;
  }
  td[data-label="资产"] {
    justify-content: flex-start;
    padding-bottom: 10px !important;
  }
  td[data-label="资产"] .asset-cell {
    width: 100%;
    text-align: start;
  }
  td small {
    margin: 0;
    font-size: var(--text-xs);
  }
  td[data-label="当前价格"],
  td[data-label="可用 / 占用"],
  td[data-label="结算 / 浮动盈亏"],
  td[data-label="项目 / 内容"],
  td[data-label="日期 / 方向"],
  td[data-label="对应 USD"],
  td[data-label="来源 / 状态"] {
    display: grid;
    grid-template-columns: minmax(70px, 0.8fr) minmax(0, 1.2fr);
    gap: 4px 12px;
  }
  td[data-label="当前价格"]::before,
  td[data-label="可用 / 占用"]::before,
  td[data-label="结算 / 浮动盈亏"]::before,
  td[data-label="项目 / 内容"]::before,
  td[data-label="日期 / 方向"]::before,
  td[data-label="对应 USD"]::before,
  td[data-label="来源 / 状态"]::before {
    grid-column: 1;
    max-width: none;
    grid-row: 1/3;
  }
  td[data-label="当前价格"] small,
  td[data-label="可用 / 占用"] small,
  td[data-label="结算 / 浮动盈亏"] small,
  td[data-label="项目 / 内容"] small,
  td[data-label="日期 / 方向"] small,
  td[data-label="对应 USD"] small,
  td[data-label="来源 / 状态"] small {
    grid-column: 2;
  }
  td .value-link {
    padding: 0;
    min-height: 32px;
    max-width: 100%;
    text-align: end;
  }
  td .asset-cell .coin {
    width: 34px;
    height: 34px;
  }
  td .status {
    justify-self: end;
  }
  td.numeric {
    white-space: normal;
  }
  .holdings-table td {
    font-size: var(--text-sm);
  }
  .holdings-table .numeric:nth-child(2) {
    font-weight: 500;
  }
  td[data-label="操作"] {
    align-items: center;
  }
  .row-actions {
    justify-content: flex-end;
  }
  .fiat-panel dl {
    gap: 12px;
    font-size: var(--text-sm);
  }
  .settings-form {
    gap: 16px;
  }
  .settings-form > .check-label {
    flex-basis: 100%;
  }
  .settings-form .field {
    flex: 1;
  }
  .rules-panel dl > div {
    display: block;
    margin-top: 20px;
  }
  .rules-panel dd {
    margin-top: 8px;
  }
  .audit-list {
    font-size: var(--text-xs);
  }
  .audit-list li {
    gap: 6px 12px;
  }
  .audit-list li > span {
    flex-basis: 100%;
  }
  .data-facts > div,
  .detail-definition > div {
    grid-template-columns: 100px 1fr;
  }
  .data-facts dd {
    font-size: var(--text-sm);
  }
  .page-footer {
    padding: 0 16px 24px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    font-size: var(--text-xs);
  }
  .page-footer a {
    font-size: var(--text-xs);
  }
  .bar-row {
    grid-template-columns: 1fr 0.9fr 85px;
    gap: 8px;
  }
  .bar-axis {
    margin-inline-start: 34%;
    margin-inline-end: 85px;
    font-size: var(--text-xs);
  }
  .activity-amount {
    max-width: 40%;
  }
  .activity-list button {
    gap: 8px;
  }
  .activity-name strong {
    font-size: var(--text-sm);
  }
  dialog,
  dialog.wide {
    width: calc(100vw - 24px);
    padding: 20px;
    max-height: calc(100dvh - 24px);
    border-radius: 14px;
  }
  .dialog-head h2 {
    font-size: var(--text-lg);
  }
  .form-grid {
    gap: 0 12px;
  }
  .money-inputs {
    grid-template-columns: 1fr 1fr;
  }
  .money-inputs .field:last-child {
    grid-column: 1/-1;
  }
  .release-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
  }
  .form-tabs {
    gap: 0;
    justify-content: space-between;
  }
  .form-tabs .btn {
    padding: 9px 6px;
  }
  .form-section > summary span {
    max-width: 75%;
  }
  .detail-stats {
    gap: 20px 12px;
  }
  .detail-stats strong {
    font-size: var(--text-base);
  }
  .mapping-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
  }
  .import-preview {
    overflow: auto;
  }
  .import-preview table {
    display: table;
    font-size: var(--text-xs);
  }
  .import-preview thead {
    display: table-header-group;
  }
  .import-preview tbody {
    display: table-row-group;
  }
  .import-preview tr {
    display: table-row;
  }
  .import-preview td,
  .import-preview th {
    display: table-cell;
    font-size: var(--text-xs);
    padding: 8px !important;
    text-align: start;
    max-width: 140px !important;
  }
  .import-preview td::before {
    display: none;
  }
  .import-summary strong {
    font-size: var(--text-sm);
  }
  .dialog-actions {
    position: relative;
  }
  .button-row {
    gap: 10px;
  }
  .button-row .btn {
    font-size: var(--text-xs);
  }
}
@media (max-width: 360px) {
  .sidebar {
    padding-inline: 10px;
  }
  .nav-link {
    font-size: var(--text-xs);
  }
  .nav-link svg {
    width: 16px;
  }
  #main {
    padding-inline: 12px;
  }
  .page-heading .heading-actions {
    width: 100%;
  }
  .page-heading .heading-actions > .primary {
    flex: 1;
  }
  .total-value {
    font-size: var(--text-xl);
  }
  .hero-breakdown {
    gap: 12px;
  }
  .hero-breakdown .metric strong {
    font-size: var(--text-base);
  }
  .balance-strip {
    flex-direction: column;
    gap: 6px;
  }
  .panel {
    padding: 14px;
  }
  .allocation-content {
    gap: 12px;
    grid-template-columns: 140px 1fr;
  }
  .legend .dot {
    margin-inline-end: 5px;
  }
  .metrics-row > .metric {
    padding-inline: 12px;
  }
  .metrics-row strong {
    font-size: var(--text-base);
  }
  .form-grid,
  .mapping-grid {
    grid-template-columns: 1fr;
  }
  .money-inputs {
    grid-template-columns: 1fr 1fr;
  }
  .range-filter {
    flex-wrap: wrap;
  }
  .range-filter .field {
    min-width: 110px;
  }
  .form-tabs .btn {
    font-size: var(--text-xs);
    padding-inline: 4px;
  }
  .bar-row {
    grid-template-columns: 1fr 0.7fr 78px;
  }
  .page-footer {
    padding-inline: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  select:focus-visible,
  summary:focus-visible {
    outline-color: Highlight;
  }
  .pnl-bar,
  .dot {
    forced-color-adjust: none;
  }
  .primary,
  .nav-link.active {
    border: 1px solid ButtonText;
  }
}

.balance-strip button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  min-height: 32px;
  text-align: start;
}
/* User-entered names and address labels must reflow even inside flex-based dialogs. */
.dialog-head > div {
  min-width: 0;
}
.dialog-head h2,
.detail-meta > span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.nav-mobile {
  display: none;
}
@media (max-width: 700px) {
  .nav-label {
    display: none;
  }
  .nav-mobile {
    display: block;
  }
}
