:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #202127;
  background: #fafafa;
  font-synthesis: none;
  font-size: 14px;
  --line: #e8e8ed;
  --muted: #757680;
  --accent: #6658d9;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
}
.layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  position: sticky;
  top: 0;
  height: 100dvh;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 28px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  min-width: 0;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 8px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 20px;
}
.brand small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0;
}
nav {
  display: grid;
  gap: 5px;
}
.nav {
  border: 0;
  background: transparent;
  color: #62636c;
  text-align: left;
  padding: 12px 16px;
  border-radius: 7px;
  font-size: 14px;
}
.nav:hover {
  background: #f7f7fa;
}
.nav.active {
  background: #f0edff;
  color: #6658d9;
  font-weight: 600;
  border-left: 3px solid var(--accent);
  padding-left: 13px;
}
.identity {
  margin-top: auto;
  padding: 18px 8px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
  overflow-wrap: anywhere;
  font-size: 12px;
  min-width: 0;
}
.identity strong {
  font-weight: 500;
}
.identity small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.avatar {
  flex-shrink: 0;
  border-radius: 50%;
  background: #f0edff;
  color: var(--accent);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
}
.main {
  padding: 30px 36px 48px;
  width: 100%;
  max-width: 1600px;
  min-width: 0;
  margin: 0 auto;
  align-self: start;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.header-actions select {
  width: auto;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: #8b8b95;
}
h1 {
  font-size: 25px;
  font-weight: 650;
  margin: 8px 0;
  letter-spacing: -0.7px;
}
h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 20px;
}
h3 {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 12px;
}
p {
  line-height: 1.65;
}
.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  margin: 8px 0;
}
.stack {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  min-width: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 16px;
  min-width: 0;
}
.card .metrics {
  margin-bottom: 20px;
}
.metric {
  background: #fff;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
}
.metric span {
  color: var(--muted);
  font-size: 12px;
}
.metric strong {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.6px;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dedee6;
  background: #fff;
  color: #393944;
  padding: 8px 13px;
  border-radius: 6px;
  min-height: 36px;
  font-size: 12px;
  line-height: 1.4;
  gap: 6px;
}
.button:hover:not(:disabled) {
  background: #f7f7fb;
  border-color: #c6c1ed;
}
.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.primary:hover:not(:disabled) {
  background: #5548c4;
  color: #fff;
}
.actions,
.filters,
.pager {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.pager {
  justify-content: flex-end;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}
.table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid #efeff3;
  vertical-align: middle;
}
th {
  color: #73737f;
  font-weight: 500;
  background: #fafafb;
  white-space: nowrap;
}
td {
  max-width: 280px;
  overflow-wrap: anywhere;
  min-width: 90px;
  font-variant-numeric: tabular-nums;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fcfcfe;
}
td .button {
  white-space: nowrap;
}
.empty {
  padding: 30px 20px;
  background: #fafafb;
  border: 1px dashed #e4e3ec;
  text-align: center;
  color: #898995;
  line-height: 1.8;
  font-size: 12px;
  border-radius: 8px;
}
input,
select {
  border: 1px solid #dedee7;
  border-radius: 6px;
  background: #fff;
  padding: 9px 11px;
  color: #393944;
  min-width: 0;
  max-width: 100%;
  min-height: 36px;
}
input:not([type="checkbox"]) {
  width: 320px;
  max-width: 100%;
}
select {
  width: 100%;
}
label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  max-width: 100%;
  min-width: 0;
}
form {
  display: grid;
  gap: 12px;
  justify-items: start;
  min-width: 0;
}
.filters {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 20px 0;
}
.filters input {
  width: 175px;
}
.filters label {
  flex: 0 1 175px;
}
.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toggle input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.notice {
  background: #fff5f3;
  color: #a04232;
  border: 1px solid #f3d6d0;
  border-radius: 8px;
  padding: 15px;
  margin: 16px 0;
}
.notice[hidden] {
  display: none;
}
.login {
  max-width: 540px;
  padding: 60px 32px;
  margin: 8vh auto;
}
.login h1 {
  font-size: 34px;
  line-height: 1.4;
  margin: 18px 0;
}
.login select {
  display: block;
  width: auto;
  margin-left: auto;
}
.login .eyebrow {
  margin-top: 65px;
}
.login .button {
  margin-top: 22px;
  padding: 11px 24px;
}
.login .muted {
  font-size: 14px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  max-width: 580px;
  width: calc(100% - 32px);
  max-height: 85dvh;
  overflow: auto;
  box-shadow: 0 24px 80px #20203320;
}
dialog::backdrop {
  background: #14142655;
}
dialog .actions {
  justify-content: flex-end;
  margin-top: 24px;
}
.detail-grid {
  display: grid;
  gap: 16px;
  margin: 0;
}
.detail-grid > div {
  display: grid;
  grid-template-columns: minmax(95px, 0.8fr) minmax(0, 1.6fr);
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f4;
}
.detail-grid dt {
  color: var(--muted);
  font-size: 12px;
}
.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.payment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.amount-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.amount-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px 8px;
  font-size: 18px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.amount-option small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 5px;
}
.amount-option[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: #f6f4ff;
  box-shadow: 0 0 0 1px var(--accent);
}
.payment-method {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.payment-logo {
  display: grid;
  place-items: center;
  background: #1678ff;
  color: #fff;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  font-size: 20px;
}
.badge {
  background: #f2f2f6;
  color: #81818d;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 5px;
  margin-left: auto;
}
.full-width {
  width: 100%;
  margin-top: 18px;
}
@media (min-width: 1600px) {
  .main {
    padding-top: 40px;
  }
}
@media (max-width: 1100px) {
  .main {
    padding: 26px 22px;
  }
  .layout {
    grid-template-columns: 195px minmax(0, 1fr);
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .payment-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .layout {
    display: block;
  }
  aside {
    position: static;
    height: auto;
    padding: 14px 16px;
    gap: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  aside nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
  }
  .brand {
    font-size: 17px;
    padding: 0;
  }
  .brand small {
    display: none;
  }
  .brand-mark {
    width: 28px;
    height: 28px;
    font-size: 17px;
  }
  .identity {
    display: none;
  }
  .nav {
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 12px;
  }
  .nav.active {
    border-left: 0;
    padding-left: 12px;
  }
  .main {
    padding: 22px 16px;
  }
  header {
    gap: 12px;
    margin-bottom: 22px;
    align-items: start;
  }
  h1 {
    font-size: 22px;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .card {
    padding: 18px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 16px;
  }
  .metric strong {
    font-size: 18px;
  }
  .payment-grid {
    gap: 16px;
  }
  .amount-option {
    font-size: 16px;
  }
  .filters label {
    flex: 1 1 120px;
  }
  .filters input {
    width: 100%;
  }
  .login h1 {
    font-size: 28px;
  }
  .login {
    margin: 0 auto;
    padding: 32px 22px;
  }
  .detail-grid > div {
    grid-template-columns: minmax(90px, 0.7fr) minmax(0, 1fr);
  }
  .stack {
    gap: 16px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .button,
  .nav,
  .amount-option {
    transition:
      background 0.15s,
      border-color 0.15s;
  }
}

.model-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 230px;
  overflow-wrap: anywhere;
}
