:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef4f1;
  --text: #101827;
  --muted: #607086;
  --line: #d9e1ea;
  --blue: #155eef;
  --blue-dark: #1047b8;
  --green: #0f766e;
  --amber: #b45309;
  --code: #111827;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.auth-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(21, 94, 239, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 94, 239, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 18% 18%, rgba(21, 94, 239, 0.12), transparent 28%),
    #f7fbff;
  background-size: 54px 54px, 54px 54px, auto, auto;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 460px);
  align-items: center;
  gap: 56px;
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
}

.auth-brand-link {
  margin-bottom: 30px;
}

.auth-brand h1 {
  max-width: 560px;
  margin-top: 0;
  font-size: 58px;
}

.auth-brand p {
  max-width: 480px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 18px;
}

.auth-card {
  width: 100%;
  padding: 36px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(21, 94, 239, 0.14);
}

.auth-card-head {
  display: grid;
  justify-items: center;
  margin-bottom: 26px;
  text-align: center;
}

.auth-card-head h2 {
  margin-top: 16px;
  font-size: 28px;
}

.auth-card-head p {
  color: var(--muted);
}

.auth-form {
  max-width: none;
}

.auth-submit {
  width: 100%;
  margin-top: 6px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.social-button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #26364f;
  background: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.social-button:hover {
  border-color: #a8c4f4;
  background: #f2f7ff;
}

.auth-register {
  margin-top: 24px;
  text-align: center;
  color: var(--muted);
}

.auth-register a {
  color: var(--blue);
  font-weight: 800;
}

.auth-links {
  position: fixed;
  right: 28px;
  bottom: 24px;
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(217, 225, 234, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a:hover {
  color: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

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

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

.button.secondary:hover {
  background: #edf2f7;
  border-color: #c7d2df;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  align-items: center;
  gap: 34px;
  width: min(1120px, calc(100% - 32px));
  min-height: calc(100vh - 118px);
  margin: 0 auto;
  padding: 54px 0 38px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: var(--green);
  background: #e7f7f4;
  border: 1px solid #b8ebe4;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 720px;
  margin-top: 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 680px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 18px;
}

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

.hero-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.hero-visual {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(16, 24, 39, 0.12);
}

.terminal {
  overflow: hidden;
  background: var(--code);
  border-radius: 8px;
  color: #d7e1f0;
}

.terminal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: #9fb0c5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.terminal pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
}

.terminal code {
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
}

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

.section h2 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.section p {
  color: var(--muted);
}

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

.card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  color: #31506f;
  background: #eef4fa;
  border: 1px solid #d8e5f1;
  border-radius: 6px;
  font-size: 13px;
}

.band {
  margin-top: 28px;
  padding: 24px;
  background: var(--surface-2);
  border: 1px solid #d6e7df;
  border-radius: 8px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  counter-reset: step;
}

.step {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  counter-increment: step;
}

.step::before {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  place-items: center;
  content: counter(step);
  color: #fff;
  background: var(--green);
  border-radius: 6px;
  font-weight: 800;
}

.price-table,
.usage-table {
  width: 100%;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.doc-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
}

.side-nav {
  position: sticky;
  top: 82px;
  align-self: start;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.side-nav a {
  display: block;
  padding: 8px 10px;
  color: var(--muted);
  border-radius: 6px;
}

.side-nav a:hover {
  color: var(--text);
  background: #f2f5f8;
}

.doc-stack {
  display: grid;
  gap: 16px;
}

.code-block {
  overflow: hidden;
  background: var(--code);
  border-radius: 8px;
}

.code-block pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  color: #d7e1f0;
  font-size: 13px;
  line-height: 1.7;
}

.code-block code {
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

.form {
  display: grid;
  gap: 12px;
  max-width: 620px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

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

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

.plan {
  display: grid;
  gap: 12px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.plan.featured {
  border-color: #8ab4ff;
  box-shadow: 0 16px 42px rgba(21, 94, 239, 0.12);
}

.plan h3 {
  margin: 0;
  font-size: 18px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

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

.plan small {
  color: var(--muted);
}

.profile-item {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.profile-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.profile-item strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 22px;
}

.notice {
  margin-top: 14px;
  padding: 12px 14px;
  color: #084c41;
  background: #e8f8f4;
  border: 1px solid #bce9e0;
  border-radius: 8px;
}

.notice.error {
  color: #9f1239;
  background: #fff1f2;
  border-color: #fecdd3;
}

.secret-box {
  margin-top: 14px;
  padding: 14px;
  overflow-wrap: anywhere;
  color: #f8fafc;
  background: #111827;
  border: 1px solid #243044;
  border-radius: 8px;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
}

.footer {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 26px 0 36px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.dashboard-page {
  min-height: 100vh;
  background: #f3f7fc;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.dashboard-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 22px;
  padding: 26px 18px;
  background: #fff;
  border-right: 1px solid #dce7f5;
}

.dashboard-brand {
  padding: 0 8px 18px;
  border-bottom: 1px solid #edf2f8;
}

.dashboard-menu {
  display: grid;
  gap: 8px;
}

.dashboard-menu a,
.dashboard-sidebar-foot a,
.dashboard-sidebar-foot button {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  color: #526278;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.dashboard-menu a.active,
.dashboard-menu a:hover,
.dashboard-sidebar-foot a:hover,
.dashboard-sidebar-foot button:hover {
  color: var(--blue);
  background: #edf5ff;
}

.dashboard-sidebar-foot {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid #edf2f8;
}

.dashboard-main {
  min-width: 0;
  padding: 30px 34px 44px;
}

.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.dashboard-topbar h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}

.dashboard-topbar p {
  color: var(--muted);
}

.dashboard-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-user span {
  max-width: 260px;
  overflow: hidden;
  color: #31435a;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 20px 22px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
}

.dashboard-notice.is-ok {
  color: #075985;
  background: #eff8ff;
  border-color: #bfdbfe;
}

.dashboard-notice strong,
.dashboard-notice span {
  display: block;
}

.dashboard-notice span {
  color: #526278;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.metric-card {
  min-height: 112px;
  padding: 18px;
  background: #fff;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(21, 94, 239, 0.07);
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  color: #0f1b2d;
  font-size: 28px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.dashboard-panel {
  margin-top: 22px;
  padding: 20px;
  background: #fff;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(21, 94, 239, 0.06);
}

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

.panel-head h2 {
  font-size: 20px;
}

.panel-head p {
  color: var(--muted);
}

.panel-pill {
  min-height: 30px;
  padding: 4px 10px;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 22px;
}

.dashboard-plans {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.dashboard-panel .usage-table {
  border-color: #edf2f8;
  box-shadow: none;
}

.dashboard-panel code {
  color: #0f3f8f;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  white-space: normal;
  word-break: break-all;
}

.table-action {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  color: var(--blue);
  background: #eff6ff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.table-action:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.modal-open {
  overflow: hidden;
}

.payment-modal[hidden] {
  display: none;
}

.payment-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}

.payment-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 27, 45, 0.45);
  backdrop-filter: blur(6px);
}

.payment-dialog {
  position: relative;
  width: min(480px, 100%);
  padding: 28px;
  background: #fff;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(15, 27, 45, 0.26);
}

.payment-dialog h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.payment-dialog p {
  color: var(--muted);
}

.payment-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.payment-methods {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.payment-method {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.payment-method:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.payment-method span {
  color: #0f1b2d;
  font-size: 18px;
  font-weight: 900;
}

.payment-method small {
  color: var(--muted);
}

.payment-method.alipay {
  border-left: 4px solid #1677ff;
}

.payment-method.wechat {
  border-left: 4px solid #16a34a;
}

.payment-qr {
  display: block;
  width: min(320px, 100%);
  max-height: 430px;
  object-fit: contain;
  margin: 18px auto;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
}

.payment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
}

.payment-summary span {
  color: var(--muted);
}

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

.payment-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.payment-actions .button {
  flex: 1;
}

.payment-tip {
  margin-top: 12px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .hero,
  .doc-layout,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .grid,
  .steps,
  .plans,
  .profile {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .side-nav {
    position: static;
  }

  .auth-brand h1 {
    font-size: 42px;
  }

  .auth-links {
    position: static;
    justify-content: center;
    margin-top: -32px;
    padding-bottom: 24px;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
    height: auto;
  }

  .dashboard-main {
    padding: 22px 16px 34px;
  }

  .dashboard-topbar,
  .dashboard-notice,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-two-col,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-plans {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
  }

  h1 {
    font-size: 40px;
  }
}
