:root {
  --bg: #f5f6f8;
  --panel: #fff;
  --ink: #192330;
  --muted: #7a8391;
  --line: #e5e9ed;
  --brand: #ef6947;
  --green: #159773;
  --nav: #151c28;
  --radius: 14px;
  color-scheme: light;
  font:
    14px/1.55 Inter,
    "PingFang SC",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #eea087;
  outline-offset: 3px;
}
.skip {
  position: fixed;
  top: -100px;
  z-index: 999;
  background: white;
  padding: 15px;
}
.skip:focus {
  top: 10px;
}
#sidebar {
  width: 244px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--nav);
  color: #b8c0cc;
  padding: 25px 17px 16px;
  display: flex;
  flex-direction: column;
  z-index: 50;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-size: 22px;
  font-weight: 750;
  padding: 0 7px 26px;
}
.brand small {
  font-size: 8px;
  color: #8b95a6;
  letter-spacing: 0.18em;
  display: block;
  margin-top: 0;
}
.brand-mark {
  width: 37px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--brand);
  font-size: 24px;
  font-style: italic;
}
.workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  background: #202a39;
  border: 1px solid #303b4b;
  border-radius: 11px;
  font-size: 12px;
  margin-bottom: 20px;
}
.workspace > div {
  flex: 1;
}
.workspace small {
  display: block;
  color: #8e98a7;
  font-size: 10px;
}
.workspace-dot,
.pulse {
  display: inline-block;
  background: #6ad9b4;
  border-radius: 50%;
  height: 7px;
  width: 7px;
}
.workspace-dot {
  height: 10px;
  width: 10px;
}
nav {
  overflow: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: #3a4657 transparent;
  padding-right: 3px;
}
nav .nav-heading {
  font-size: 10px;
  color: #6f7d90;
  letter-spacing: 0.1em;
  margin: 18px 12px 7px;
}
nav .nav-heading:first-child {
  margin-top: 0;
}
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  margin-bottom: 3px;
  transition: background 0.15s;
}
nav a:hover {
  background: #232e3e;
  color: white;
}
nav a.active {
  background: #382d2c;
  color: #ff9879;
  box-shadow: inset 3px 0 var(--brand);
}
.nav-icon {
  width: 17px;
  text-align: center;
  font-size: 16px;
}
.side-footer {
  border-top: 1px solid #2a3444;
  padding: 15px 10px 0;
  font-size: 11px;
}
.side-footer small {
  display: block;
  color: #737f91;
  font-size: 10px;
  margin-top: 5px;
}
.side-footer .muted {
  float: right;
}
main {
  margin-left: 244px;
  min-height: 100vh;
}
header {
  height: 74px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 34px;
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 20;
}
#breadcrumb {
  font-weight: 650;
}
.header-spacer {
  flex: 1;
}
.mode-tag {
  color: #927145;
  background: #faf4e7;
  font-size: 10px;
  border: 1px solid #ede0c9;
  padding: 5px 9px;
  border-radius: 5px;
}
.icon-button {
  border: 0;
  background: transparent;
  padding: 6px;
  color: var(--muted);
  font-size: 18px;
}
.account-button {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--ink);
}
#menuButton {
  display: none;
}
#connectionBanner:empty {
  display: none;
}
#connectionBanner {
  padding: 10px 34px;
  background: #fff7e9;
  border-bottom: 1px solid #f3e3c5;
  color: #8b6735;
  font-size: 12px;
}
#content {
  padding: 30px 34px 45px;
  max-width: 1720px;
  margin: 0 auto;
  min-height: calc(100vh - 150px);
}
.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.eyebrow {
  color: var(--brand);
  letter-spacing: 0.14em;
  font-size: 10px;
  font-weight: 750;
  margin-bottom: 7px;
}
h1 {
  font-size: 27px;
  letter-spacing: -0.035em;
  margin: 0 0 5px;
  line-height: 1.4;
}
h2 {
  font-size: 18px;
  margin: 0 0 16px;
}
h3 {
  font-size: 14px;
  margin: 0 0 5px;
}
p {
  margin: 0 0 12px;
}
.muted,
.page-head p {
  color: var(--muted);
}
.page-head p {
  margin: 0;
  font-size: 12px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 14px;
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.button:hover {
  filter: brightness(0.97);
  border-color: #bac1ca;
}
.button.primary {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
.button.dark {
  background: var(--nav);
  color: white;
  border-color: var(--nav);
}
.button.small {
  font-size: 11px;
  padding: 5px 9px;
}
.button.danger {
  color: #cb4a52;
  border-color: #f2cdd0;
}
.grid {
  display: grid;
  gap: 17px;
}
.kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}
.kpi,
.panel,
.product {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 20px;
}
.kpi .label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
.kpi .value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 16px 0 6px;
}
.kpi small {
  font-size: 10px;
  color: var(--muted);
}
.kpi .label i {
  font-style: normal;
  color: var(--brand);
  background: #fff1eb;
  border-radius: 7px;
  padding: 1px 6px;
}
.dashboard-grid {
  grid-template-columns: 1.8fr 1fr;
}
.panel {
  min-width: 0;
  margin-bottom: 18px;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.panel-title h2 {
  margin: 0;
  font-size: 15px;
}
.panel-title small {
  color: var(--muted);
  font-size: 10px;
}
.hero {
  position: relative;
  overflow: hidden;
  background: #202c3c;
  color: white;
  border-radius: var(--radius);
  padding: 25px 27px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.hero .hero-copy {
  flex: 1;
}
.hero h2 {
  font-size: 20px;
  margin: 0 0 8px;
}
.hero p {
  color: #b8c5d3;
  font-size: 12px;
  max-width: 620px;
}
.hero .button {
  color: white;
  background: #354357;
  border-color: #4e5f75;
}
.hero-mark {
  font-size: 72px;
  font-weight: 800;
  color: #e99a83;
  line-height: 1;
  transform: rotate(-12deg);
  padding: 10px 28px;
}
.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.quick {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 17px 14px;
  background: var(--panel);
  transition: transform 0.15s;
}
.quick:hover {
  transform: translateY(-2px);
  border-color: #efb5a5;
}
.quick i {
  font-style: normal;
  color: var(--brand);
  font-size: 23px;
}
.quick b {
  display: block;
  margin: 9px 0 4px;
  font-size: 12px;
}
.quick small {
  color: var(--muted);
  font-size: 10px;
}
.flow-row {
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}
.flow-row:last-child {
  border: 0;
}
.flow-row > div {
  flex: 1;
}
.flow-row small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.flow-row strong {
  font-size: 12px;
}
.step {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child {
  border: 0;
}
.step-index {
  width: 25px;
  height: 25px;
  background: #fff1eb;
  color: var(--brand);
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 11px;
  flex-shrink: 0;
}
.step small {
  color: var(--muted);
  font-size: 11px;
  display: block;
}
.step b {
  font-size: 12px;
}
.notice {
  background: #fff9ed;
  border: 1px solid #f1e2c5;
  color: #94713b;
  font-size: 12px;
  border-radius: 9px;
  padding: 12px 15px;
  margin: 0 0 18px;
}
.notice.info {
  background: #edf5fb;
  border-color: #d7e6f1;
  color: #4e718e;
}
.notice.success {
  background: #edf8f2;
  border-color: #cae6d7;
  color: #267551;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 15px;
}
.filters input,
.filters select {
  max-width: 240px;
}
.filters .grow {
  flex: 1;
  max-width: none;
}
.input,
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  background: var(--panel);
  color: var(--ink);
  min-width: 0;
}
textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}
input::placeholder,
textarea::placeholder {
  color: #a3aab4;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
  font-size: 12px;
}
th,
td {
  padding: 13px 15px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: #fafbfc;
}
td small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
tr:last-child td {
  border-bottom: 0;
}
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  color: var(--muted);
  font-size: 11px;
}
.badge {
  display: inline-block;
  border-radius: 5px;
  padding: 3px 7px;
  color: #707d90;
  background: #f0f2f5;
  font-size: 10px;
}
.badge.ok {
  color: #298462;
  background: #eaf6ef;
}
.badge.warn {
  color: #a37c32;
  background: #fbf3de;
}
.badge.bad {
  color: #bb5360;
  background: #faedef;
}
.badge.info {
  color: #4d7bba;
  background: #edf3fb;
}
.products,
.cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.product {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.product .top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.product h3 {
  font-size: 17px;
}
.product p {
  font-size: 12px;
  color: var(--muted);
  flex: 1;
  white-space: pre-wrap;
}
.product .price {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.03em;
}
.product .price small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.product .meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 9px 0;
  border-top: 1px dashed var(--line);
}
.product .button {
  margin-top: 5px;
}
.bank-card {
  padding: 22px;
  border-radius: 17px;
  min-height: 184px;
  background: #233953;
  color: white;
  position: relative;
  overflow: hidden;
}
.bank-card:after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border: 1px solid #ffffff20;
  border-radius: 50%;
  right: -65px;
  top: -60px;
  box-shadow: 0 0 0 30px #ffffff06;
}
.bank-card.coral {
  background: #b95f49;
}
.bank-card.sage {
  background: #37665f;
}
.bank-card .top {
  display: flex;
  justify-content: space-between;
}
.bank-card .number {
  font:
    19px ui-monospace,
    monospace;
  letter-spacing: 0.08em;
  margin: 40px 0 22px;
}
.bank-card .bottom {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}
.card-container .actions {
  margin: 10px 0 8px;
}
.card-container > small {
  display: block;
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 5px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 20px;
}
.tabs a,
.tabs button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 7px 13px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.tabs .active {
  background: #fff0ea;
  color: var(--brand);
  font-weight: 650;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 15px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
}
.field small {
  color: var(--muted);
  font-size: 11px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
}
.field input[type="checkbox"] {
  width: auto;
  align-self: start;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.field.full {
  grid-column: 1/-1;
}
.summary {
  background: #f7f8fa;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin: 15px 0;
  font-size: 12px;
}
.summary p {
  display: flex;
  justify-content: space-between;
  margin: 0 0 8px;
  gap: 20px;
}
.summary p:last-child {
  margin-bottom: 0;
}
.summary strong {
  font-size: 16px;
}
.empty {
  padding: 43px 24px;
  text-align: center;
  color: var(--muted);
}
.empty .empty-mark {
  font-size: 27px;
  color: #b8c3cf;
  margin-bottom: 10px;
}
.empty b {
  font-size: 13px;
  color: #68778a;
  display: block;
  margin-bottom: 5px;
}
.empty small {
  font-size: 11px;
}
.timeline {
  border-left: 2px solid var(--line);
  margin: 10px 8px;
  padding-left: 19px;
}
.timeline > div {
  position: relative;
  margin: 0 0 22px;
  font-size: 12px;
}
.timeline > div:before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--brand);
  border-radius: 50%;
  position: absolute;
  left: -24px;
  top: 6px;
}
.timeline small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
details {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  margin: 10px 0;
}
summary {
  font-weight: 650;
  cursor: pointer;
}
details p {
  white-space: pre-wrap;
  font-size: 12px;
  margin: 14px 0 0;
  color: var(--muted);
}
.progress-track {
  height: 6px;
  background: #e5e9ee;
  border-radius: 9px;
  overflow: hidden;
  margin: 10px 0;
}
.progress-track > div {
  height: 100%;
  background: var(--brand);
}
.code,
pre {
  font:
    11px/1.8 ui-monospace,
    monospace;
  background: #f4f6f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.auth-wrap {
  max-width: 480px;
  margin: 24px auto;
}
.auth-wrap .brand {
  color: var(--ink);
  justify-content: center;
}
dialog {
  width: min(720px, calc(100% - 30px));
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 25px 100px #11182730;
  color: var(--ink);
  background: var(--panel);
}
dialog::backdrop {
  background: #121b2a88;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 20px 24px;
}
.dialog-head h2 {
  margin: 0;
  font-size: 18px;
}
#dialogBody {
  padding: 23px 24px;
}
#dialogError {
  padding: 0 24px;
  color: #c94752;
  font-size: 12px;
  white-space: pre-wrap;
}
.dialog-foot {
  padding: 18px 24px;
  display: flex;
  justify-content: end;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
}
#toasts {
  position: fixed;
  right: 24px;
  bottom: 25px;
  z-index: 1000;
  display: grid;
  gap: 10px;
  max-width: calc(100% - 40px);
}
.toast {
  padding: 13px 18px;
  background: #1c293a;
  color: white;
  border-radius: 9px;
  box-shadow: 0 10px 35px #14233533;
  font-size: 12px;
}
.toast.error {
  border-left: 4px solid #f47c7c;
}
.balance-chart {
  min-height: 130px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 10px 0 20px;
}
.balance-chart .bar {
  flex: 1;
  background: #ef9278;
  border-radius: 4px 4px 0 0;
  min-height: 3px;
  position: relative;
}
.balance-chart small {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  white-space: nowrap;
  color: var(--muted);
}
footer {
  padding: 18px 34px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}
.stats-line {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 15px;
}
.stats-line strong {
  color: var(--ink);
}
body.dark {
  --bg: #151c27;
  --panel: #1d2736;
  --ink: #e3e8ef;
  --muted: #98a4b6;
  --line: #344052;
}
body.dark .summary,
body.dark pre,
body.dark .code,
body.dark th {
  background: #202b3b;
}
body.dark .notice {
  background: #392e20;
}
body.dark .notice.info {
  background: #203145;
}
body.dark .hero {
  background: #28354a;
}
@media (min-width: 1600px) {
  .products,
  .cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1200px) {
  .products,
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  #sidebar {
    transform: translateX(-100%);
    transition: 0.2s;
  }
  #sidebar.open {
    transform: none;
  }
  #shade.open {
    position: fixed;
    inset: 0;
    background: #11182766;
    z-index: 45;
  }
  main {
    margin: 0;
  }
  header {
    padding: 0 17px;
    height: 64px;
    gap: 10px;
  }
  #menuButton {
    display: block;
  }
  .mode-tag {
    display: none;
  }
  #content {
    padding: 23px 17px;
  }
  .page-head {
    align-items: start;
    flex-direction: column;
  }
  .page-head h1 {
    font-size: 24px;
  }
  .kpis {
    gap: 10px;
  }
  .kpi {
    padding: 15px;
  }
  .kpi .value {
    font-size: 25px;
  }
  .hero {
    padding: 22px;
  }
  .hero-mark {
    display: none;
  }
  .products,
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .mini-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .filters input,
  .filters select {
    max-width: 100%;
    flex: 1;
  }
  .button {
    padding: 9px 12px;
  }
  footer {
    padding: 18px;
    display: block;
  }
  footer span {
    display: block;
    margin-top: 7px;
  }
  #connectionBanner {
    padding: 10px 17px;
  }
  .table-footer {
    gap: 10px;
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
