:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #182230;
  --muted: #667085;
  --line: #d6deea;
  --blue: #1769e0;
  --blue-dark: #0f4fb4;
  --green: #0f9f7a;
  --orange: #c87516;
  --red: #c33d32;
  --shadow: 0 16px 34px rgba(28, 43, 70, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr) minmax(96px, auto);
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 0 36px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(214, 222, 234, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(23, 105, 224, 0.18);
}

.brand-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand-text strong {
  color: #101828;
  font-size: 18px;
  line-height: 1.15;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-item,
.account-chip button,
.outline-button,
.secondary-button {
  min-height: 40px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  color: #344054;
  font-weight: 700;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
}

.nav-item:hover,
.nav-item.is-active {
  background: #eaf1fb;
  color: var(--blue);
}

.account-chip {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  color: var(--muted);
  font-size: 13px;
}

.account-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-chip button {
  flex: 0 0 auto;
  padding: 0 16px;
  border-color: var(--blue);
  background: #ffffff;
  color: var(--blue);
}

.workspace {
  width: min(1220px, calc(100vw - 48px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 34px 0 48px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 520px);
  gap: 54px;
  align-items: center;
  min-height: calc(100vh - 150px);
  padding: 30px 0 56px;
}

.hero-copy h1,
.intro-band h2,
.section-head h2,
.page-head h1 {
  margin: 0;
  color: #101828;
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 720px;
  font-size: 48px;
}

.lead {
  max-width: 660px;
  margin: 22px 0 0;
  color: #475467;
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-button,
.secondary-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  background: var(--blue);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--blue-dark);
}

.secondary-button {
  background: #ffffff;
  border-color: var(--line);
  color: var(--blue);
}

.outline-button {
  background: #ffffff;
  border-color: var(--line);
  color: #344054;
}

.primary-button:disabled,
.secondary-button:disabled,
.outline-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.product-preview {
  min-height: 420px;
  padding: 20px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.preview-top {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e7edf5;
}

.preview-top span {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--blue);
}

.preview-top strong {
  color: #101828;
}

.preview-top em {
  color: var(--green);
  font-style: normal;
  font-weight: 800;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.preview-grid article {
  min-height: 96px;
  padding: 14px;
  border: 1px solid #e4eaf3;
  border-radius: 8px;
  background: var(--surface-soft);
}

.preview-grid span,
.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.preview-grid strong {
  display: block;
  margin-top: 10px;
  color: #101828;
  font-size: 26px;
}

.preview-flow {
  display: grid;
  gap: 10px;
}

.preview-flow p {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid #e4eaf3;
  border-radius: 8px;
}

.preview-flow b {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.preview-flow i {
  color: var(--blue);
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 42px;
  align-items: start;
  padding: 42px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intro-band h2,
.section-head h2 {
  font-size: 30px;
}

.intro-band p:last-child {
  margin: 4px 0 0;
  color: #475467;
  font-size: 17px;
}

.section {
  padding: 54px 0 8px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-grid article,
.capability-list article,
.plan-card,
.point-card,
.print-item,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature-grid article {
  min-height: 190px;
  padding: 20px;
}

.feature-grid h3,
.capability-list h3,
.plan-card h3,
.point-card h3,
.panel h2,
.dialog-head h2 {
  margin: 0;
  color: #101828;
  line-height: 1.25;
  letter-spacing: 0;
}

.feature-grid h3,
.plan-card h3,
.point-card h3 {
  font-size: 20px;
}

.feature-grid p,
.capability-list p,
.plan-card p,
.point-card p {
  margin: 12px 0 0;
  color: var(--muted);
}

.capability-list {
  display: grid;
  gap: 12px;
}

.capability-list article {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 20px;
}

.capability-list span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #eaf1fb;
  color: var(--blue);
  font-weight: 900;
}

.dashboard-panel {
  margin-top: 54px;
  padding: 22px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-head h1 {
  font-size: 30px;
}

.section-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.side-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.status-pill,
.head-meta {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.is-ok {
  background: #e8f7f1;
  color: var(--green);
}

.status-pill.is-warn {
  background: #fff3e0;
  color: var(--orange);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  min-height: 104px;
  padding: 16px;
  border: 1px solid #e4eaf3;
  border-radius: 8px;
  background: var(--surface-soft);
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  color: #101828;
  font-size: 24px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f7;
}

.info-list div:last-child {
  border-bottom: 0;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  color: #182230;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.plan-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--blue);
}

.plan-price strong {
  font-size: 28px;
  line-height: 1;
}

.plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.point-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.point-card {
  min-height: 154px;
  padding: 18px;
}

.point-card strong {
  display: block;
  margin: 12px 0 16px;
  color: var(--blue);
  font-size: 28px;
  line-height: 1.1;
}

.balance-box {
  display: grid;
  gap: 3px;
  min-width: 160px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.balance-box span {
  color: var(--muted);
  font-size: 12px;
}

.balance-box strong {
  color: var(--blue);
  font-size: 22px;
}

.amount-field,
.login-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.amount-field input,
.login-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.amount-field input:focus,
.login-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.12);
}

.full-button {
  width: 100%;
  margin-top: 14px;
}

.form-tip {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.form-tip.is-error {
  color: var(--red);
}

.form-tip.is-success {
  color: var(--green);
}

.print-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.segmented button {
  min-width: 86px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  color: #344054;
  font-weight: 800;
}

.segmented button.is-active {
  background: var(--blue);
  color: #ffffff;
}

.print-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.print-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.print-list {
  display: grid;
  gap: 10px;
}

.print-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.print-check {
  width: 18px;
  height: 18px;
}

.print-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.print-title strong {
  overflow-wrap: anywhere;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.print-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.print-actions {
  display: flex;
  gap: 8px;
}

.empty-state {
  min-height: 170px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  text-align: center;
}

dialog {
  width: min(520px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--text);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.dialog-form,
.payment-body,
.info-dialog p {
  padding: 20px 22px 22px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  color: #344054;
  font-size: 22px;
  line-height: 1;
}

.qr-box {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px;
  border: 1px solid #e4eaf3;
  border-radius: 8px;
  background: var(--surface-soft);
}

.qr-box canvas {
  width: 220px;
  height: 220px;
  border-radius: 6px;
  background: #ffffff;
}

.qr-fallback {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
  text-align: center;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.info-dialog p {
  margin: 0;
  color: #344054;
  white-space: pre-line;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
}

.footer a {
  color: var(--blue);
}

@media (max-width: 1080px) {
  .hero-section,
  .intro-band,
  .section-layout {
    grid-template-columns: 1fr;
  }

  .product-preview {
    min-height: 360px;
  }

  .feature-grid,
  .point-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 18px;
  }

  .nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .account-chip {
    justify-self: start;
  }

  .workspace {
    width: min(100% - 28px, 760px);
    padding-top: 24px;
  }

  .hero-section {
    min-height: auto;
    padding-top: 18px;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .stats-grid,
  .plan-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .page-head,
  .print-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .page-head h1,
  .intro-band h2,
  .section-head h2 {
    font-size: 24px;
  }

  .hero-copy h1 {
    font-size: 30px;
  }

  .lead,
  .intro-band p:last-child {
    font-size: 16px;
  }

  .nav-item {
    padding: 0 12px;
    white-space: nowrap;
  }

  .feature-grid,
  .point-grid,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .capability-list article,
  .print-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .print-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1 1 0;
    min-width: 0;
  }
}
