:root {
  color-scheme: light;
  --canvas: #eef2f7;
  --surface: #fff;
  --navy: #12263f;
  --ink: #1c2c44;
  --muted: #5d6d84;
  --line: #e0e7f0;
  --blue: #225ed1;
  --blue-strong: #1a4fb9;
  --blue-tint: #eef4ff;
  --danger: #af3040;
  --radius: 14px;
  --shadow: 0 14px 45px rgba(18, 38, 63, 0.08);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
}

*, *::before, *::after { box-sizing: border-box; }
body { min-width: 300px; min-height: 100vh; margin: 0; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
:focus-visible { outline: 3px solid #76a4ff; outline-offset: 3px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

.button {
  display: inline-flex;
  min-height: 40px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 650;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.button-primary { background: var(--blue); color: #fff; box-shadow: 0 3px 7px #225ed126; }
.button-primary:hover:not(:disabled) { background: var(--blue-strong); }
.button-secondary { border-color: var(--line); background: #fff; color: var(--ink); }
.button-secondary:hover:not(:disabled) { border-color: #a4bcdf; background: #f7faff; }
.button-danger { background: var(--danger); color: #fff; }
.button-danger:hover:not(:disabled) { background: #932435; }
.button:disabled { opacity: 0.55; box-shadow: none; }
.button-small { min-height: 34px; padding: 6px 11px; font-size: 13px; }
.button-block { width: 100%; }
.plus { font-size: 21px; line-height: 16px; font-weight: 400; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.brand-mark {
  position: relative;
  display: inline-block;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
}
.brand-mark::before {
  content: '';
  position: absolute;
  inset: 8px 9px 7px;
  border: 1.6px solid currentColor;
  border-radius: 2px;
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: 13px 13px auto;
  height: 1px;
  background: currentColor;
  box-shadow: 0 4px currentColor;
}
.startup { padding: 16px; text-align: center; color: var(--muted); margin: 20vh auto 0; }

.login-screen {
  display: grid;
  min-height: 100vh;
  padding: 32px;
  place-items: center;
  background: radial-gradient(ellipse at 50% 10%, #fff 0, #eef3fa 56%, #e9eef6 100%);
}
.login-frame {
  display: grid;
  grid-template-columns: minmax(210px, .88fr) minmax(300px, 1fr);
  width: min(100%, 750px);
  min-height: 442px;
  overflow: hidden;
  border: 1px solid #dce5f1;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 25px 78px #17335f1f;
}
.login-illustration {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 68% 29%, #4a79ee 0, transparent 49%),
    linear-gradient(138deg, #183f93 0, #153a83 56%, #112549 100%);
}
.login-illustration::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .45;
  background-image: radial-gradient(circle, #c7d8ff76 .75px, transparent 1px);
  background-size: 19px 19px;
  mask-image: linear-gradient(130deg, #000, transparent 75%);
}
.orbit { position: absolute; border: 1px solid #b8d4ff38; border-radius: 100%; transform: rotate(-32deg); }
.orbit-one { width: 92%; height: 42%; }
.orbit-two { width: 125%; height: 62%; }
.orbit-two::after {
  content: '';
  position: absolute;
  top: 18%;
  right: 8%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #8be0d7;
  box-shadow: 0 0 22px #b1fcf4;
}
.receipt-back, .receipt-art {
  width: 137px;
  height: 174px;
  border-radius: 19px;
  grid-area: 1 / 1;
}
.receipt-back {
  transform: translate(14px, -3px) rotate(18deg);
  background: #6fa4ff54;
  border: 1px solid #d9e8ff59;
}
.receipt-art {
  position: relative;
  padding: 22px;
  transform: translate(-6px, 5px) rotate(-12deg);
  background: linear-gradient(145deg, #fff, #dceaff);
  box-shadow: 0 22px 40px #0b183c58;
}
.receipt-art-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dce8ff;
  color: #2353b0;
  font-size: 23px;
  font-weight: 700;
}
.receipt-art-line { height: 5px; margin-top: 13px; border-radius: 3px; background: #a1b9e5; }
.receipt-art-line-short { width: 63%; margin-top: 8px; opacity: .75; }
.receipt-art-line-last { width: 83%; margin-top: 22px; opacity: .58; }
.login-content { align-self: center; padding: 42px; }
.login-content > h1 { margin: 25px 0 21px; font-size: 25px; font-weight: 750; letter-spacing: -.02em; }
.login-content .button { margin-top: 3px; }
.form { display: grid; gap: 17px; }
.field { display: grid; min-width: 0; gap: 6px; color: var(--ink); font-weight: 650; }
.field input, .field textarea, .search-control {
  min-width: 0;
  width: 100%;
  min-height: 40px;
  border: 1px solid #d9e2ee;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field input, .field textarea { padding: 9px 11px; }
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder, .search-control input::placeholder { color: #697c96; }
.field input:focus, .field textarea:focus, .search-control:focus-within {
  border-color: #779df0;
  outline: none;
  box-shadow: 0 0 0 3px #eaf1ff;
}
.field input[readonly] { background: #f8faff; }
.checkbox-field { display: inline-flex; gap: 8px; align-items: center; width: max-content; color: var(--muted); }
.checkbox-field input { width: 16px; height: 16px; accent-color: var(--blue); margin: 0; }
.password-control { position: relative; }
.password-control input { padding-right: 58px; }
.password-toggle {
  position: absolute;
  top: 5px;
  right: 5px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #38567d;
  font-size: 12px;
}
.password-toggle:hover { background: var(--blue-tint); }
.form-error {
  color: #9c283b;
  padding: 9px 11px;
  border: 1px solid #f5dbe0;
  border-radius: 7px;
  background: #fff4f5;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.workspace { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--navy); color: #e6efff; padding: 24px 16px; }
.sidebar-brand { margin: 0 0 32px 7px; }
.sidebar-brand .brand-mark { background: #426ce5; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 650;
}
.nav-link[aria-current] { color: #fff; background: #294c82; }
.order-icon {
  position: relative;
  display: block;
  width: 15px;
  height: 16px;
  border: 1.4px solid #c6dbff;
  border-radius: 3px;
}
.order-icon::before { content: ''; position: absolute; inset: 4px 3px auto; height: 1px; background: #c6dbff; box-shadow: 0 3px #c6dbff; }
.workspace-body { min-width: 0; }
.topbar {
  height: 65px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 30px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.account { position: relative; }
.account-trigger {
  min-height: 40px;
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  padding: 4px 8px;
  background: transparent;
  color: var(--ink);
  font-weight: 650;
}
.account-trigger:hover, .account-trigger[aria-expanded="true"] { background: #f1f5fc; }
.account-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e5eeff;
  color: #1c55c0;
  font-size: 12px;
  font-weight: 750;
}
.chevron { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.account-menu {
  z-index: 2;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 138px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 14px 28px #172c5620;
}
.account-menu button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 5px;
  padding: 8px 11px;
  text-align: left;
  color: var(--ink);
  background: transparent;
}
.account-menu button:hover { background: var(--blue-tint); }
.workspace-content { width: min(100%, 1660px); margin: 0 auto; padding: 32px 30px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.page-heading h1 { font-size: 27px; font-weight: 750; letter-spacing: -.025em; }
.refund-history-order { margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; }
.records-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.records-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 13px; padding: 16px; }
.status-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  border: 1px solid #e6edf6;
  border-radius: 9px;
  background: #f1f5fb;
}
.status-filters button {
  min-height: 32px;
  padding: 5px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4b6080;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.status-filters button:hover { color: var(--blue-strong); }
.status-filters button[aria-pressed="true"] { background: #fff; color: var(--blue-strong); box-shadow: 0 1px 3px #23385b16; }
.search-form { width: min(100%, 245px); }
.search-control { min-height: 39px; display: flex; }
.search-control input { width: 100%; min-width: 0; border: 0; padding: 8px 9px; outline: none; background: transparent; color: var(--ink); font-size: 13px; }
.search-control input:focus-visible { outline: none; }
.search-button { background: transparent; width: 39px; border: 0; border-radius: 7px; display: grid; place-items: center; color: #4f6588; }
.search-button:hover { background: var(--blue-tint); }
.search-icon { width: 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; }
.search-icon::after { content: ''; position: absolute; right: -4px; bottom: -2px; width: 5px; height: 1.5px; border-radius: 1.5px; transform: rotate(45deg); background: currentColor; }
.table-wrap { overflow: auto; }
.table-wrap:focus-visible { outline-offset: -3px; }
table { min-width: 1140px; width: 100%; border-collapse: collapse; font-size: 13px; }
.refund-history-table { min-width: 0; }
thead { background: #f4f7fb; color: #495d7a; }
thead th { white-space: nowrap; }
th, td { padding: 13px 12px; text-align: left; }
th:first-child, td:first-child { padding-left: 16px; }
th:last-child, td:last-child { padding-right: 16px; }
tbody tr { border-top: 1px solid #e9eff6; }
tbody tr:hover { background: #f9fbff; }
.order-number { color: #273a57; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12px; font-weight: 650; white-space: nowrap; }
.customer-name { display: block; font-weight: 650; overflow-wrap: anywhere; }
.customer-cell { max-width: 150px; }
.cell-subtitle { display: block; margin-top: 1px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.amount-cell, .time-cell { white-space: nowrap; }
.amount-cell { color: #1c2e4a; font-weight: 750; font-variant-numeric: tabular-nums; }
.amount-cell .cell-subtitle { font-weight: 500; }
.amount-uncollected { color: var(--muted); }
.refund-abnormal { color: var(--danger); }
.time-cell { color: var(--muted); font-size: 12px; }
.description-text { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 20px;
  background: #edf0f5;
  color: #49586f;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 650;
}
.state-tag::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.state-tag.is-pending { color: #885514; background: #fff3d9; }
.state-tag.is-paid { color: #126d53; background: #e2f5ed; }
.state-tag.is-refunded { color: var(--blue-strong); background: var(--blue-tint); }
.state-tag.is-failed { color: var(--danger); background: #fff0f2; }
.actions-cell { white-space: nowrap; }
.table-action {
  display: inline-block;
  padding: 7px 5px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--blue-strong);
  font-weight: 650;
  font-size: 12px;
  text-decoration: none;
}
.table-action + .table-action { margin-left: 4px; }
.table-action:hover { background: var(--blue-tint); }
.action-danger { color: var(--danger); }
.action-danger:hover { background: #fff0f2; }
.table-message { display: flex; min-height: 260px; align-items: center; justify-content: center; flex-direction: column; gap: 7px; padding: 36px 16px; text-align: center; }
.table-message p { color: var(--muted); }
.table-message button { margin-top: 5px; }
.empty-illustration {
  position: relative;
  width: 58px;
  height: 58px;
  margin-bottom: 5px;
  border-radius: 18px;
  background: #ecf3ff;
}
.empty-illustration > span {
  position: absolute;
  inset: 13px 15px 12px;
  border: 1px solid #93b2e6;
  border-radius: 5px;
  background: #f7faff;
  transform: rotate(-8deg);
}
.empty-illustration > span::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 6px;
  left: 6px;
  height: 1px;
  background: #8daee5;
  box-shadow: 0 5px #a5bde9, 0 10px #a5bde9;
}
.records-footer {
  min-height: 61px;
  padding: 11px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.pagination { display: flex; align-items: center; gap: 8px; white-space: nowrap; }

dialog {
  width: min(100% - 26px, 470px);
  max-height: calc(100vh - 30px);
  padding: 0;
  overflow: auto;
  border: 1px solid #dce7f4;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 25px 90px #0c204b45;
}
dialog::backdrop { background: #1025406e; backdrop-filter: blur(2px); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 19px 22px 15px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 19px; font-weight: 750; }
.dialog-header p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.dialog-close { flex: 0 0 30px; height: 30px; margin: -1px -4px 0 0; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #4b607e; font-size: 24px; line-height: 26px; }
.dialog-close:hover { background: var(--blue-tint); }
.dialog-content { padding: 17px 22px; }
.dialog-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); padding: 14px 22px; background: #f9fbfe; }
.confirm-description { overflow-wrap: anywhere; }
.refund-summary { display: grid; gap: 7px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f7faff; }
.refund-summary div { display: flex; justify-content: space-between; gap: 10px; }
.refund-summary dt { flex: 0 0 auto; color: var(--muted); }
.refund-summary dd { margin: 0; min-width: 0; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.refund-hint { color: var(--muted); font-size: 13px; }
.clipboard-buffer { position: fixed; top: 0; left: 0; pointer-events: none; opacity: 0; }
.toast { position: fixed; z-index: 4; top: 76px; right: 22px; max-width: min(390px, 90vw); padding: 10px 14px; border: 1px solid #d9e8dc; border-radius: 9px; background: #eef9f1; color: #1d633d; box-shadow: 0 10px 24px #17335f1d; }
.toast-error { border-color: #f5dbe0; background: #fff4f5; color: #9c283b; }

.pay-page {
  background: radial-gradient(ellipse at 50% 0, #f7faff, #edf2f8 68%);
  padding: 0 16px env(safe-area-inset-bottom, 0);
}
.pay-shell { width: min(100%, 475px); margin: 0 auto; padding: clamp(27px, 8vw, 74px) 0 28px; }
.pay-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 3px 15px; }
.pay-demo-note { padding: 3px 7px; border: 1px solid #d7e3f4; border-radius: 6px; color: #425d86; font-size: 11px; }
.pay-header .brand { font-size: 15px; }
.pay-header .brand-mark { width: 28px; height: 28px; flex-basis: 28px; border-radius: 8px; }
.pay-header .brand-mark::before { inset: 7px 7px 6px; }
.pay-header .brand-mark::after { inset: 12px 11px auto; }
.pay-card {
  min-height: 285px;
  overflow: hidden;
  border: 1px solid #dce7f5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 55px #17335f14;
}
.pay-unavailable, .pay-loading { display: grid; justify-items: center; gap: 12px; padding: 60px 24px; text-align: center; }
.pay-loading { color: var(--muted); }
.pay-unavailable h1 { font-size: 21px; }
.pay-unavailable p { max-width: 300px; color: var(--muted); }
.pay-unavailable button { margin-top: 5px; }
.pay-summary { padding: 24px 20px 23px; background: #f6f9ff; text-align: center; border-bottom: 1px solid #e8eef7; }
.pay-summary h1 { font-size: 19px; font-weight: 750; }
.pay-summary.is-pending h1 { color: var(--muted); font-size: 14px; font-weight: 650; }
.pay-status-mark {
  display: inline-grid;
  place-items: center;
  width: 47px;
  height: 47px;
  margin-bottom: 10px;
  border-radius: 50%;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.pay-status-mark.is-paid { color: #137354; background: #dff5eb; }
.pay-status-mark.is-cancelled { color: #53647e; background: #e8eef8; }
.pay-amount { display: flex; align-items: baseline; justify-content: center; gap: 5px; margin-top: 5px; color: #172d4d; font-variant-numeric: tabular-nums; }
.pay-amount span { font-size: 23px; font-weight: 650; }
.pay-amount strong { font-size: clamp(33px, 9vw, 44px); font-weight: 750; letter-spacing: -.03em; overflow-wrap: anywhere; }
.pay-summary:not(.is-pending) .pay-amount span { font-size: 19px; }
.pay-summary:not(.is-pending) .pay-amount strong { font-size: 29px; }
.pay-state-detail { margin-top: 7px; color: var(--muted); font-size: 13px; }
.pay-details { margin: 0; padding: 7px 23px 0; }
.pay-details > div { display: grid; grid-template-columns: minmax(72px, 1fr) minmax(0, 2.3fr); gap: 9px; padding: 12px 0; border-bottom: 1px solid #eef2f9; }
.pay-details > div:last-child { border-bottom: 0; }
.pay-details dt { color: var(--muted); }
.pay-details dd { margin: 0; text-align: right; color: #293e60; font-weight: 650; overflow-wrap: anywhere; }
.pay-details .countdown { color: #8a5523; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.pay-action { padding: 12px 23px 23px; }
.pay-action .button { font-size: 15px; min-height: 46px; }
.pay-notice { margin-bottom: 11px; color: var(--muted); text-align: center; font-size: 13px; }

@media (max-width: 1040px) {
  .workspace { grid-template-columns: 175px minmax(0, 1fr); }
  .topbar { padding-inline: 19px; }
  .workspace-content { padding-inline: 19px; }
}
@media (max-width: 760px) {
  .workspace { display: block; }
  .sidebar { display: flex; align-items: center; justify-content: space-between; gap: 11px; padding: 10px 14px; }
  .sidebar-brand { margin: 0; }
  .nav-link { padding: 7px 9px; font-size: 12px; }
  .topbar { height: 49px; padding-inline: 14px; }
  .workspace-content { padding: 17px 12px 24px; }
  .page-heading { margin: 0 3px 13px; align-items: flex-start; }
  .page-heading h1 { font-size: 23px; }
  .records-toolbar { gap: 8px; padding: 12px; }
  .search-form { width: 100%; }
  .records-footer { flex-wrap: wrap; }
}
@media (max-width: 580px) {
  .login-screen { padding: 18px; }
  .login-frame { display: block; max-width: 420px; min-height: initial; }
  .login-illustration { display: none; }
  .login-content { padding: clamp(23px, 7vw, 37px); }
}
@media (max-width: 520px) {
  .refund-history-table :is(th, td) { padding-inline: 8px; }
  .refund-history-table :is(th, .time-cell) { white-space: normal; }
}
@media (max-width: 360px) {
  .status-filters button { padding-inline: 7px; }
  .refund-history-table :is(th, td) { padding-inline: 4px; }
  .refund-history-table .state-tag { padding-inline: 4px; }
  .refund-history-table .state-tag::before { display: none; }
  .pay-details, .pay-action { padding-inline: 15px; }
  .page-heading .button { padding-inline: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
