@font-face {
  font-family: ConsoleMono;
  src: local("SFMono-Regular"), local("Menlo"), local("Consolas");
  font-display: swap;
}
:root {
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1c2927;
  background: #f4f5f0;
  font-synthesis: none;
  --green: #183f35;
  --muted: #65716b;
  --line: #dde3db;
  --lime: #dcf3ac;
}
* {
  box-sizing: border-box;
}
.channel-url {
  max-width: 240px;
  overflow-wrap: anywhere;
  font-family: ConsoleMono, monospace;
  font-size: 11px;
}
#supplier-panel {
  margin-top: 40px;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #78a576;
  outline-offset: 3px;
}
button {
  border: 0;
  border-radius: 7px;
  padding: 11px 18px;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:active {
  transform: translateY(1px);
}
button.primary {
  background: var(--green);
  color: #fff;
  font-weight: 600;
}
.primary:hover {
  background: #295447;
}
.secondary {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--green);
}
.quiet {
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
}
.quiet:hover,
.secondary:hover {
  background: #e9eee5;
}
[hidden] {
  display: none !important;
}
.topbar {
  height: 90px;
  border-bottom: 1px solid var(--line);
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafbf7;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.15em;
}
.brand-mark {
  font-family: Georgia, serif;
  font-size: 43px;
  letter-spacing: -0.14em;
  display: block;
  width: 46px;
  color: var(--green);
  line-height: 1;
}
.brand-mark span {
  font-family: sans-serif;
  font-size: 30px;
}
.brand-sub {
  display: block;
  font-family: ConsoleMono, monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 7px;
}
.top-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}
.site {
  font-family: ConsoleMono, monospace;
  font-size: 12px;
  color: var(--muted);
}
select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  color: inherit;
}
.top-actions select {
  background: transparent;
  font-size: 12px;
}
main {
  max-width: 1360px;
  margin: 0 auto;
  padding: 54px 5vw 70px;
  min-height: calc(100vh - 155px);
}
h1 {
  font-size: 36px;
  letter-spacing: -0.04em;
  line-height: 1.25;
  margin: 12px 0 14px;
  font-weight: 600;
}
h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
h3 {
  font-size: 17px;
  font-weight: 600;
}
.eyebrow {
  font-family: ConsoleMono, monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--muted);
}
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.caption {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 35px;
}
.page-heading p {
  margin: 0;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.periods {
  display: flex;
  background: #e6ebe2;
  border-radius: 8px;
  padding: 4px;
  gap: 3px;
}
.periods button {
  font-size: 12px;
  color: var(--muted);
  padding: 9px 16px;
  background: transparent;
}
.periods button[aria-pressed="true"] {
  background: #fff;
  color: var(--green);
  box-shadow: 0 1px 3px #182a2310;
}
.live {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #57854e;
  box-shadow: 0 0 0 4px #57854e15;
}
.metrics {
  display: grid;
  grid-template-columns: 1.65fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 42px;
}
.balance {
  background: var(--green);
  color: #fff;
  padding: 28px 32px 23px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.balance:after {
  content: "";
  position: absolute;
  width: 175px;
  height: 175px;
  border: 1px solid #ffffff12;
  border-radius: 50%;
  right: -50px;
  top: -70px;
  box-shadow:
    0 0 0 30px #ffffff03,
    0 0 0 60px #ffffff03;
  pointer-events: none;
}
.metric-label {
  font-size: 12px;
  letter-spacing: 0.025em;
}
.balance .metric-label {
  color: #d2e3cc;
}
.amount {
  font-family: ConsoleMono, monospace;
  font-size: 43px;
  font-weight: 500;
  letter-spacing: -0.06em;
  margin: 26px 0 30px;
  white-space: nowrap;
}
.currency {
  color: var(--lime);
  font-size: 29px;
  margin-right: 9px;
}
.balance-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #ffffff24;
  padding-top: 16px;
  font-family: ConsoleMono, monospace;
  font-size: 10px;
  color: #c7d9c4;
  gap: 10px;
}
.metric {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbf7;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 15px;
}
.metric strong {
  font-family: ConsoleMono, monospace;
  font-size: 44px;
  letter-spacing: -0.07em;
  font-weight: 400;
}
.metric > .muted {
  font-size: 11px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 0 0 18px;
}
.table-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fafbf7;
}
.table-scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 12px;
}
th {
  padding: 15px 22px;
  background: #ecf0e7;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}
td {
  padding: 18px 22px;
  border-top: 1px solid var(--line);
}
.numeric {
  text-align: right;
  font-family: ConsoleMono, monospace;
  white-space: nowrap;
}
.channel-name {
  font-weight: 600;
  display: block;
  overflow-wrap: anywhere;
  max-width: 350px;
}
.channel-id {
  display: block;
  font-family: ConsoleMono, monospace;
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}
.amount-cell {
  color: var(--green);
  font-weight: 600;
}
.empty {
  text-align: center;
  padding: 42px 20px 48px;
}
.empty p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 22px;
}
.empty-symbol {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid #cbd6c3;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  color: #7b9571;
  background: #eef3e8;
}
.footnote {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 21px;
}
.notice {
  border: 1px solid #dcc99f;
  background: #faf5e8;
  padding: 18px 22px;
  border-radius: 8px;
  font-size: 12px;
  margin: 20px 0;
}
.error {
  color: #a23e2e;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.error:empty {
  display: none;
}
footer {
  border-top: 1px solid var(--line);
  padding: 23px 5vw;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: ConsoleMono, monospace;
  font-size: 10px;
}
footer span {
  letter-spacing: 0.15em;
}
.login-shell {
  min-height: 62vh;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 11vw;
}
.intro h1 {
  font-size: 54px;
  max-width: 480px;
  line-height: 1.22;
  margin: 25px 0;
}
.intro p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 350px;
}
.intro-line {
  height: 1px;
  width: 60px;
  background: #99ae8a;
  margin: 32px 0 18px;
}
.login-card {
  background: #fafbf7;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 40px #183f3506;
}
.login-card h2 {
  font-size: 26px;
  margin: 16px 0 8px;
}
.login-card .muted {
  margin-bottom: 28px;
}
label {
  display: block;
  margin: 20px 0 8px;
  font-size: 12px;
  font-weight: 500;
}
input,
textarea {
  width: 100%;
  border: 1px solid #cfd8cd;
  border-radius: 6px;
  padding: 11px 12px;
  background: #fff;
  color: inherit;
  font-size: 13px;
}
textarea {
  resize: vertical;
  font-family: ConsoleMono, "PingFang SC", monospace;
  line-height: 1.7;
}
#key {
  -webkit-text-security: disc;
}
#key:focus {
  -webkit-text-security: none;
}
.wide {
  width: 100%;
  margin-top: 20px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 30px;
  width: min(580px, calc(100vw - 28px));
  max-height: 90vh;
  color: inherit;
  background: #fafbf7;
  box-shadow: 0 30px 100px #10221c40;
}
dialog::backdrop {
  background: #10221c65;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.dialog-heading .eyebrow {
  margin-bottom: 10px;
}
.close {
  font-size: 26px;
  line-height: 1;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 25px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid select {
  width: 100%;
  padding: 11px;
}
.form-grid > div {
  min-width: 0;
}
#logs-dialog,
#health-dialog {
  width: min(1100px, calc(100vw - 28px));
}
.channel-note {
  display: block;
  max-width: 320px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}
.channel-status {
  min-width: 100px;
}
.status-1 {
  color: #226640;
}
.status-3 {
  color: #a34c11;
}
.channel-error {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#health-errors {
  padding-left: 20px;
}
#health-errors p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #fff;
  padding: 15px 25px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 10;
  max-width: 90vw;
}
#pending-list {
  padding-left: 20px;
  line-height: 1.8;
}
@media (max-width: 900px) {
  .topbar {
    padding: 0 24px;
    height: 78px;
  }
  .top-actions {
    gap: 8px;
  }
  .site {
    display: none;
  }
  main {
    padding: 35px 24px 50px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .balance {
    grid-column: 1/-1;
  }
  .amount {
    margin: 22px 0;
  }
  .metric {
    min-height: 155px;
  }
  .login-shell {
    gap: 40px;
  }
  .intro h1 {
    font-size: 40px;
  }
  .login-card {
    padding: 28px;
  }
  .page-heading {
    align-items: flex-start;
  }
  h1 {
    font-size: 30px;
  }
}
@media (max-width: 600px) {
  .topbar {
    padding: 0 18px;
  }
  .brand {
    font-size: 13px;
    gap: 8px;
  }
  .brand-mark {
    font-size: 35px;
    width: 35px;
  }
  .brand-mark span {
    font-size: 23px;
  }
  .brand-sub {
    font-size: 7px;
  }
  .top-actions select {
    max-width: 85px;
  }
  .top-actions button {
    font-size: 10px;
    padding: 8px 5px;
  }
  main {
    padding: 30px 18px 45px;
  }
  .page-heading {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
  }
  .page-heading > .primary {
    width: 100%;
  }
  .periods {
    width: 100%;
    justify-content: space-between;
  }
  .periods button {
    padding: 9px 11px;
  }
  .toolbar {
    gap: 14px;
  }
  .metrics {
    gap: 12px;
    margin-bottom: 30px;
  }
  .balance {
    padding: 25px;
  }
  .amount {
    font-size: 39px;
  }
  .metric {
    padding: 22px 18px;
  }
  .metric strong {
    font-size: 35px;
  }
  .section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  th,
  td {
    padding: 15px;
  }
  .login-shell {
    display: block;
    min-height: unset;
  }
  .intro {
    margin-bottom: 30px;
  }
  .intro h1 {
    font-size: 35px;
    margin: 18px 0;
  }
  .intro p {
    font-size: 13px;
  }
  .intro-line,
  .intro > .caption {
    display: none;
  }
  .login-card {
    padding: 26px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  dialog {
    padding: 23px;
  }
  footer {
    padding: 20px 18px;
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
