:root {
  font-family:Inter,"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",system-ui,sans-serif;
  color:#203347;
  background:#f4f7fa;
  font-synthesis:none;
  --ink:#122a3c;
  --muted:#6b7e90;
  --line:#e4eaf0;
  --accent:#147d6f;
  --accent-light:#e8f5f1
}
* {
  box-sizing:border-box
}
body {
  margin:0
}
a {
  color:var(--accent);
  text-decoration:none
}
a:hover {
  text-decoration:underline
}
button,input,select,textarea {
  font:inherit
}
button,a,input,select,textarea {
  touch-action:manipulation
}
button {
  cursor:pointer
}
button:disabled {
  cursor:not-allowed;
  opacity:.55
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline:3px solid #8bd6c6;
  outline-offset:3px
}
h1,h2,h3,p {
  margin-top:0
}
h1 {
  font-size:30px;
  letter-spacing:-.5px;
  margin-bottom:12px;
  line-height:1.35;
  color:var(--ink)
}
h2 {
  font-size:18px;
  margin-bottom:16px;
  line-height:1.5
}
h3 {
  font-size:17px
}
p {
  line-height:1.8;
  margin-bottom:16px
}
small {
  display:block;
  font-size:12px;
  color:var(--muted);
  line-height:1.7
}
hr {
  border:0;
  border-top:1px solid var(--line);
  margin:26px 0
}
.app-shell {
  display:flex;
  min-height:100vh
}
.sidebar {
  width:224px;
  flex:0 0 224px;
  background:var(--ink);
  color:#c5d4df;
  padding:30px 18px;
  position:fixed;
  inset:0 auto 0 0;
  display:flex;
  flex-direction:column
}
.brand {
  display:flex;
  gap:12px;
  align-items:center;
  padding:0 10px 28px;
  color:#fff;
  font-size:19px;
  font-weight:650;
  letter-spacing:.3px
}
.brand>span:last-child { white-space: nowrap; }
.brand:hover {
  text-decoration:none
}
.brand small {
  font-weight:400;
  font-size:10px;
  letter-spacing:1px;
  color:#92abba
}
.brand-mark {
  width:40px;
  height:40px;
  border:1px solid #326475;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:#1c4351;
  font-size:22px
}
.sidebar nav {
  display:flex;
  flex-direction:column;
  gap:6px
}
.sidebar nav a {
  padding:13px 18px;
  border-radius:8px;
  color:#bbcedb;
  font-size:14px
}
.sidebar nav a:hover,.sidebar nav a.active {
  background:#24485b;
  color:#fff;
  text-decoration:none
}
.sidebar-note {
  margin-top:auto;
  border-top:1px solid #2a4558;
  padding:23px 12px 0;
  font-size:11px;
  line-height:1.9;
  color:#8eabbc
}
.workspace {
  margin-left:224px;
  min-width:0;
  flex:1
}
.topbar {
  height:72px;
  padding:0 36px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:#fff;
  border-bottom:1px solid var(--line);
  gap:12px
}
.workspace-label {
  font-size:13px;
  color:var(--muted)
}
.user-actions {
  display:flex;
  gap:18px;
  align-items:center;
  font-size:13px
}
.user-name {
  max-width:160px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
main {
  max-width:1450px;
  margin:0 auto;
  padding:36px
}
.page-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:26px
}
.page-heading p:last-child {
  color:var(--muted);
  font-size:14px;
  margin-bottom:0
}
.eyebrow {
  font-size:11px!important;
  font-weight:650;
  color:var(--accent)!important;
  letter-spacing:2px;
  margin-bottom:10px!important
}
.panel {
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:26px;
  margin-bottom:22px;
  min-width:0;
  box-shadow:0 3px 12px #23374d03
}
.section-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px
}
.section-heading h2,.section-heading p {
  margin-bottom:0
}
.muted,.field-help {
  color:var(--muted);
  font-size:13px
}
.field-help {
  font-size:12px;
  line-height:1.7;
  margin:8px 0 20px
}
.button {
  border:1px solid transparent;
  border-radius:8px;
  padding:11px 17px;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:600;
  line-height:1.5;
  text-align:center;
  white-space:normal
}
.button:hover {
  text-decoration:none
}
.primary {
  color:#fff;
  background:var(--accent);
  box-shadow:0 3px 8px #147d6f18
}
.primary:hover {
  background:#116f63
}
.secondary {
  border-color:#d7e1e8;
  color:#314d60;
  background:#fff
}
.secondary:hover {
  background:#f5f8fa
}
.wide {
  width:100%;
  margin-top:14px
}
.text-button {
  border:0;
  background:transparent;
  color:var(--accent);
  font-size:13px;
  padding:5px 2px
}
.text-link {
  font-size:13px;
  font-weight:600
}
.action-row {
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-bottom:20px
}
.section-heading .action-row,.page-heading .action-row,td .action-row {
  margin-bottom:0
}
.alert,.notice {
  padding:15px 18px;
  border-radius:10px;
  border:1px solid #dce8ed;
  background:#eef5f8;
  font-size:13px;
  line-height:1.75;
  margin-bottom:20px;
  overflow-wrap:anywhere
}
.warning {
  background:#fff7e8;
  border-color:#f1dfb5;
  color:#8a641d
}
.error {
  background:#fff0ef;
  border-color:#f1cfca;
  color:#a9463a
}
.notice {
  background:var(--accent-light);
  border-color:#cfe8df;
  color:#276b5c
}
.loading {
  padding:40px 20px;
  color:var(--muted);
  text-align:center
}
.summary-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;
  margin-bottom:25px
}
.summary-card {
  padding:22px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  color:var(--ink)
}
.summary-card span {
  display:block;
  color:var(--muted);
  font-size:12px;
  margin-bottom:10px
}
.summary-card strong {
  font-size:25px;
  font-weight:600;
  overflow-wrap:anywhere;
  font-variant-numeric:tabular-nums
}
.summary-card:hover {
  text-decoration:none
}
.job-row {
  display:flex;
  align-items:center;
  gap:18px;
  padding:20px 0;
  border-top:1px solid var(--line);
  color:inherit
}
.job-row:hover {
  text-decoration:none;
  background:#fcfdfd
}
.stock-avatar {
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:12px;
  background:#edf3f7;
  color:#44677b;
  font-weight:600;
  flex-shrink:0
}
.job-main {
  flex:1;
  min-width:0
}
.job-main strong {
  display:block;
  font-size:17px;
  margin-bottom:6px
}
.job-main span {
  font-size:12px;
  color:var(--muted)
}
.job-state {
  min-width:120px
}
.job-state small {
  margin-top:6px
}
.job-time {
  color:var(--muted);
  font-size:12px;
  text-align:right
}
.row-arrow {
  color:#8ca0af
}
.status {
  display:inline-block;
  font-size:11px;
  line-height:1.5;
  padding:5px 10px;
  border-radius:5px;
  background:#edf2f6;
  color:#5c7182;
  vertical-align:middle;
  font-weight:500;
  letter-spacing:0
}
.status.running {
  background:#e6f4f0;
  color:#177965
}
.status.completed {
  background:#eaf1fb;
  color:#446ca2
}
.status.partial,.status.reconciliation_required,.status.cancel_requested {
  background:#fff3dd;
  color:#91681b
}
.status.failed {
  background:#fbece9;
  color:#a54d42
}
.empty {
  text-align:center;
  padding:45px 20px;
  color:var(--muted)
}
.empty h3 {
  color:var(--ink)
}
.empty-icon {
  width:56px;
  height:56px;
  display:grid;
  place-items:center;
  margin:0 auto 16px;
  background:#edf5f4;
  color:#67a697;
  border-radius:16px;
  font-size:23px
}
.pagination {
  display:flex;
  justify-content:flex-end;
  gap:20px;
  padding-top:20px;
  font-size:13px
}
.analysis-grid {
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr);
  gap:24px
}
.analysis-grid .panel {
  align-self:start
}
label {
  display:block;
  font-size:13px;
  font-weight:600;
  margin:18px 0 8px
}
label:first-child {
  margin-top:0
}
input,select,textarea {
  display:block;
  width:100%;
  border:1px solid #cfdce5;
  border-radius:8px;
  padding:11px 12px;
  background:#fff;
  color:var(--ink);
  min-width:0;
  line-height:1.6
}
input:disabled,select:disabled,textarea:disabled {
  background:#f6f8fa;
  color:#718392
}
input::placeholder {
  color:#9aaab6
}
.large-amount {
  font-size:34px;
  font-weight:600;
  letter-spacing:-1px;
  margin:12px 0;
  overflow-wrap:anywhere
}
.rate-row {
  font-size:12px;
  border-top:1px solid var(--line);
  padding-top:15px;
  margin-top:15px
}
.rate-row small {
  overflow-wrap:anywhere
}
.rate-row p {
  margin:8px 0 0
}
details summary {
  cursor:pointer;
  font-size:13px;
  line-height:1.6;
  color:var(--accent)
}
.rating {
  font-size:16px;
  font-weight:600;
  border-radius:6px;
  background:#fff2d6;
  color:#976717;
  padding:6px 11px;
  vertical-align:middle;
  margin-left:10px;
  display:inline-block
}
.cost-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;
  margin:18px 0
}
.cost-grid span {
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:9px
}
.cost-grid strong {
  font-size:20px;
  font-weight:600;
  overflow-wrap:anywhere
}
.gap {
  border-top:1px solid var(--line);
  padding-top:18px;
  margin-top:18px
}
.gap strong {
  font-size:13px
}
.gap ul {
  font-size:13px;
  color:#8d652b;
  line-height:1.9;
  padding-left:20px
}
pre {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font-size:12px;
  line-height:1.7;
  background:#f5f7f9;
  border-radius:7px;
  padding:14px;
  max-width:100%
}
.report-body {
  font-size:14px;
  line-height:1.95;
  overflow-wrap:anywhere
}
.report-body h1 {
  font-size:25px
}
.report-body h2 {
  margin-top:28px;
  padding-top:14px;
  border-top:1px solid var(--line)
}
.report-body h3 {
  margin-top:22px
}
.report-body blockquote {
  margin:16px 0;
  padding:12px 18px;
  border-left:3px solid #aecbc4;
  background:#f2f8f6;
  color:#53736a
}
.report-body blockquote p {
  margin:0
}
.report-body table {
  display:block;
  max-width:100%;
  overflow-x:auto
}
.report-body code {
  font-size:.9em;
  background:#f0f4f7;
  padding:2px 4px;
  border-radius:4px
}
.report-body pre code {
  padding:0
}
.table-scroll {
  overflow-x:auto;
  max-width:100%
}
table {
  width:100%;
  border-collapse:collapse;
  font-size:12px;
  text-align:left
}
th {
  font-weight:500;
  color:var(--muted);
  background:#f7f9fb;
  padding:13px 12px;
  white-space:nowrap
}
td {
  padding:16px 12px;
  border-bottom:1px solid var(--line);
  vertical-align:top;
  line-height:1.7
}
td small {
  max-width:230px;
  overflow-wrap:anywhere
}
.progress-panel {
  display:flex;
  gap:17px;
  align-items:flex-start
}
.progress-panel h2 {
  margin-bottom:5px
}
.progress-panel p {
  margin-bottom:0
}
.progress-dot {
  width:12px;
  height:12px;
  margin-top:7px;
  border-radius:100%;
  background:#9aacb8;
  flex:0 0 12px
}
.progress-dot.live {
  background:var(--accent);
  box-shadow:0 0 0 6px #e8f5f1
}
.timeline {
  list-style:none;
  padding:0;
  margin:0
}
.timeline li {
  display:flex;
  justify-content:space-between;
  gap:15px;
  position:relative;
  padding:12px 0 12px 20px;
  border-left:1px solid var(--line);
  font-size:13px
}
.timeline li:before {
  position:absolute;
  left:-4px;
  top:18px;
  width:7px;
  height:7px;
  border-radius:50%;
  content:"";
  background:#afc4cf
}
.timeline time {
  font-size:12px;
  color:var(--muted);
  white-space:nowrap
}
.wallet-overview {
  padding:32px;
  border-radius:15px;
  background:var(--ink);
  color:#fff;
  display:flex;
  justify-content:space-between;
  gap:30px;
  margin-bottom:24px
}
.wallet-overview>div {
  min-width:0
}
.wallet-overview span {
  font-size:12px;
  color:#b6ccd9
}
.wallet-amount {
  font-size:36px;
  font-weight:600;
  margin:14px 0;
  letter-spacing:-.6px;
  overflow-wrap:anywhere
}
.wallet-overview p {
  font-size:12px;
  color:#91b0c3;
  margin:0
}
.wallet-breakdown {
  display:flex;
  gap:35px;
  align-items:center
}
.wallet-breakdown strong {
  display:block;
  margin-top:12px;
  font-size:20px;
  font-weight:500;
  overflow-wrap:anywhere
}
.recharge-placeholder {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px
}
.recharge-placeholder h2 {
  margin-bottom:8px
}
.recharge-placeholder p {
  margin-bottom:0
}
.auth-wrap {
  display:grid;
  grid-template-columns:1.1fr 1fr;
  align-items:center;
  gap:60px;
  max-width:1000px;
  margin:50px auto
}
.auth-intro h1 {
  font-size:36px;
  line-height:1.6
}
.auth-intro p:last-child {
  color:var(--muted);
  font-size:14px;
  max-width:350px
}
.auth-panel {
  padding:32px
}
.auth-links {
  display:flex;
  justify-content:space-between;
  font-size:12px;
  margin-top:24px;
  gap:12px
}
.narrow-page {
  max-width:640px;
  margin:0 auto
}
.search-form {
  display:flex;
  gap:10px;
  max-width:340px
}
.secret-result code {
  display:block;
  padding:16px;
  background:#f0f6f5;
  overflow-wrap:anywhere;
  border-radius:8px;
  font-size:14px;
  margin:12px 0
}
@media(max-width:1050px) {
  .sidebar {
    width:190px;
    flex-basis:190px
  }
  .workspace {
    margin-left:190px
  }
  main {
    padding:26px
  }
  .topbar {
    padding:0 26px
  }
  .analysis-grid {
    grid-template-columns:1fr
  }
  .auth-wrap {
    gap:24px
  }
  .auth-intro h1 {
    font-size:28px
  }
  .wallet-overview {
    flex-direction:column
  }
  .wallet-breakdown {
    justify-content:flex-start
  }
  .job-time {
    display:none
  }
}
@media(max-width:700px) {
  .app-shell {
    display:block
  }
  .sidebar {
    position:static;
    width:100%;
    padding:16px 16px 0
  }
  .brand {
    padding:0 2px 16px;
    font-size:18px
  }
  .brand-mark {
    width:34px;
    height:34px;
    font-size:19px
  }
  .brand small {
    font-size:10px
  }
  .sidebar nav {
    flex-direction:row;
    overflow-x:auto;
    gap:2px;
    padding-bottom:8px
  }
  .sidebar nav a {
    flex-shrink:0;
    padding:9px 11px;
    font-size:12px
  }
  .sidebar-note {
    display:none
  }
  .workspace {
    margin-left:0
  }
  .topbar {
    height:54px;
    padding:0 17px
  }
  .workspace-label {
    font-size:11px
  }
  .user-actions {
    gap:12px;
    font-size:12px
  }
  .user-name {
    max-width:100px
  }
  main {
    padding:22px 16px
  }
  .page-heading {
    align-items:flex-start;
    flex-wrap:wrap;
    gap:16px;
    margin-bottom:22px
  }
  h1 {
    font-size:25px
  }
  .page-heading p:last-child {
    font-size:12px
  }
  .panel {
    padding:20px 16px;
    border-radius:12px;
    margin-bottom:18px
  }
  .summary-grid {
    gap:10px;
    grid-template-columns:1fr
  }
  .summary-card {
    padding:16px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px
  }
  .summary-card span {
    margin:0
  }
  .summary-card strong {
    font-size:20px
  }
  .job-row {
    gap:10px;
    padding:17px 0
  }
  .stock-avatar {
    width:34px;
    height:34px;
    border-radius:10px
  }
  .job-main strong {
    font-size:16px
  }
  .job-main span {
    font-size:10px
  }
  .job-state {
    min-width:0;
    text-align:right;
    max-width:120px
  }
  .job-state small {
    font-size:10px
  }
  .row-arrow {
    display:none
  }
  .button {
    padding:10px 13px;
    font-size:12px
  }
  .analysis-grid {
    gap:0
  }
  .large-amount {
    font-size:30px
  }
  .cost-grid {
    grid-template-columns:1fr;
    gap:16px
  }
  .cost-grid>div {
    display:flex;
    justify-content:space-between;
    gap:15px
  }
  .cost-grid span {
    margin:0;
    align-self:center
  }
  .cost-grid strong {
    font-size:17px
  }
  .action-row {
    gap:8px
  }
  .section-heading {
    align-items:flex-start;
    flex-wrap:wrap
  }
  .wallet-overview {
    padding:24px 20px;
    gap:20px
  }
  .wallet-amount {
    font-size:29px
  }
  .wallet-breakdown {
    gap:25px;
    display:grid;
    grid-template-columns:1fr 1fr
  }
  .wallet-breakdown strong {
    font-size:17px
  }
  .recharge-placeholder {
    align-items:stretch;
    flex-direction:column
  }
  .auth-wrap {
    display:block;
    margin:8px auto
  }
  .auth-intro h1 {
    font-size:28px;
    line-height:1.5
  }
  .auth-intro h1 br {
    display:none
  }
  .auth-intro p:last-child {
    font-size:12px;
    max-width:none
  }
  .auth-panel {
    padding:24px 20px
  }
  .report-body {
    font-size:13px;
    padding:20px 16px
  }
  .report-body h1 {
    font-size:22px
  }
  .search-form {
    width:100%;
    max-width:none
  }
  .timeline li {
    font-size:12px
  }
  .timeline time {
    font-size:10px
  }
  .rating {
    font-size:13px;
    padding:5px 8px
  }
  .empty {
    padding:30px 5px
  }
}
@media(prefers-reduced-motion:no-preference) {
  .button,nav a {
    transition:background .15s ease
  }
  .progress-dot.live {
    animation:breathe 2s infinite
  }
  @keyframes breathe {
    50% {
      box-shadow:0 0 0 10px #e8f5f140
    }
  }
}
h1[tabindex="-1"]:focus {
  outline:none
}
.mobile-ledger {
  display:none
}
@media(max-width:700px) {
  .desktop-ledger {
    display:none
  }
  .mobile-ledger {
    display:block
  }
  .ledger-card {
    border-top:1px solid var(--line);
    padding:18px 0
  }
  .ledger-card header {
    display:flex;
    justify-content:space-between;
    gap:10px;
    margin-bottom:15px;
    font-size:12px
  }
  .ledger-card time {
    color:var(--muted);
    font-size:11px;
    white-space:nowrap
  }
  .ledger-card>div {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px
  }
  .ledger-card span {
    font-size:10px;
    color:var(--muted)
  }
  .ledger-card b {
    display:block;
    font-size:12px;
    font-weight:500;
    color:var(--ink);
    margin-top:6px;
    overflow-wrap:anywhere
  }
}

.review-card {
  padding: 20px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.review-card p { margin: 8px 0; }
.review-json {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.6;
  padding: 12px;
  background: #f4f7fa;
  border-radius: 8px;
}
.review-token-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.review-form-panel label { display: block; margin-top: 12px; }
.review-form-panel textarea { width: 100%; resize: vertical; margin: 8px 0 16px; }
.review-form-panel .refund-confirm { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; }
.refund-confirm input { width: 18px; height: 18px; flex: 0 0 18px; padding: 0; margin: 3px 0 0; }
@media (max-width: 700px) {
  .review-token-grid { grid-template-columns: 1fr; }
  .review-card .section-heading { flex-wrap: wrap; gap: 12px; }
}

.denominations { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.denominations .button { min-width: 110px; }
.payment-card { max-width: 560px; margin-inline: auto; text-align: center; }
.payment-amount { font-size: 42px; font-weight: 700; color: var(--ink); margin: 8px 0 14px; }
.native-qr { display: block; width: 280px; max-width: 100%; height: auto; margin: 18px auto; background: white; }
.payment-order-id { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; margin-top: 22px; }
.payment-card .button { margin: 6px; }
