:root {
  --bg: #f5f8fc;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #657084;
  --line: #dbe4ef;
  --blue: #1764e8;
  --blue-dark: #0c2e78;
  --blue-soft: #e8f1ff;
  --cyan: #23b5e8;
  --violet: #7357ff;
  --orange: #f08300;
  --ok: #16a36a;
  --warn: #e38b12;
  --shadow: 0 18px 50px rgba(20, 49, 91, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 0%, rgba(35, 181, 232, 0.11), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 34%, #f3f7fb 100%);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 70px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark-img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(23, 100, 232, 0.2);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #fff;
  font-weight: 800;
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 28%, #7ee8ff 0 12%, transparent 13%),
    linear-gradient(135deg, var(--blue-dark), var(--blue), var(--violet));
  box-shadow: 0 10px 24px rgba(23, 100, 232, 0.28);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  margin-top: 2px;
}

.top-nav {
  display: flex;
  gap: 8px;
  flex: 1;
}

.internal-entry {
  color: #4f5d72;
  border-color: #d6e0ee;
  background: #f8fbff;
}

.internal-entry::before {
  content: "仅内部";
  margin-right: 8px;
  padding: 2px 6px;
  color: var(--orange);
  border-radius: 999px;
  background: #fff3e3;
  font-size: 11px;
}

.top-cta {
  white-space: nowrap;
}

.top-nav a,
.sidebar button,
.ghost-btn,
.secondary-btn,
.primary-btn,
.user-actions button,
.actions button,
td button {
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
}

.top-nav a {
  color: var(--muted);
  padding: 9px 12px;
}

.top-nav a.active,
.top-nav a:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

.primary-btn {
  color: #fff;
  padding: 11px 16px;
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--blue), #1aa8ff);
  box-shadow: 0 12px 28px rgba(23, 100, 232, 0.24);
}

.secondary-btn,
.ghost-btn,
.actions button,
.user-actions button,
td button {
  color: var(--blue);
  padding: 10px 14px;
  border-color: #bfd2f2;
  background: #fff;
}

.journey-panel {
  margin: 18px 0;
}

.journey-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.journey-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  text-align: left;
  color: var(--ink);
  border: 1px solid #d6e4f5;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(232, 241, 255, 0.85), rgba(255, 255, 255, 0.96));
  box-shadow: 0 12px 28px rgba(23, 100, 232, 0.08);
}

.journey-card b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.journey-card strong {
  font-size: 16px;
}

.journey-card span {
  color: var(--muted);
  line-height: 1.55;
}

.journey-card:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}

.ghost-btn.light {
  color: #d8ecff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(3, 13, 36, 0.94) 0%, rgba(5, 22, 56, 0.9) 40%, rgba(5, 22, 56, 0.34) 74%, rgba(5, 22, 56, 0.18) 100%),
    url("../assets/megcore-hero-ai-core.png") center right / cover no-repeat,
    #0b234f;
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.78;
  background-image:
    linear-gradient(rgba(80, 166, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 166, 255, 0.09) 1px, transparent 1px),
    radial-gradient(circle at 75% 45%, rgba(240, 131, 0, 0.2), transparent 22%),
    radial-gradient(circle at 16% 78%, rgba(35, 181, 232, 0.18), transparent 28%);
  background-size: 52px 52px, 52px 52px, auto, auto;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 180px;
  background: linear-gradient(180deg, transparent, rgba(245, 248, 252, 0.98));
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 1040px;
  padding: 104px 32px 110px;
  margin: 0 auto;
  z-index: 1;
}

.eyebrow {
  color: var(--cyan);
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
}

.hero-copy {
  max-width: 700px;
  color: #d8e8ff;
  font-size: 20px;
  line-height: 1.8;
}

.hero-actions,
.hero-metrics,
.actions,
.filters,
.category-tabs,
.tag-cloud,
.model-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-metrics {
  margin-top: 46px;
}

.hero-metrics span {
  min-width: 160px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(7, 25, 61, 0.48);
  backdrop-filter: blur(14px);
}

.hero-metrics strong {
  display: block;
  font-size: 26px;
}

.section,
.form-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 70px 0;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 28px;
}

h1,
h2,
h3 {
  margin: 0 0 14px;
}

h2 {
  font-size: 32px;
}

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

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

.feature-grid article,
.factory-grid article,
.panel,
.metric-card,
details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(20, 49, 91, 0.06);
}

.feature-grid article {
  position: relative;
  padding: 22px;
  overflow: hidden;
}

.factory-grid article {
  min-height: 210px;
  padding: 24px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f6fbff 100%),
    radial-gradient(circle at top right, rgba(35, 181, 232, 0.12), transparent 30%);
}

.factory-grid span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  color: #fff;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 800;
}

.factory-grid b {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 20px;
}

.factory-grid p {
  margin: 0;
  color: #52627a;
  line-height: 1.75;
}

.feature-grid article::before {
  content: "";
  display: block;
  width: 34px;
  height: 4px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--orange));
}

.feature-grid b,
.feature-grid span {
  display: block;
}

.feature-grid span,
.panel p,
.notice,
td,
label,
.workspace-top span {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.token-factory {
  padding-top: 44px;
}

.agent-panel {
  padding: 30px;
  border: 1px solid #cfe3fb;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(23, 100, 232, 0.08), rgba(35, 181, 232, 0.12)),
    #fff;
}

.agent-panel p:not(.eyebrow) {
  margin: 0 0 20px;
  color: #52627a;
  line-height: 1.8;
}

.tag-cloud span,
.model-strip span,
.category-tabs span {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.service-strip span {
  border-color: #cfe3fb;
  background: #f8fbff;
  color: #27476d;
  font-weight: 650;
}

.steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.steps span {
  position: relative;
  min-height: 82px;
  padding: 18px;
  color: var(--blue-dark);
  border: 1px solid #bdd8ff;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #eef6ff);
}

.steps span::before {
  content: counter(step);
  counter-increment: step;
  display: block;
  color: var(--blue);
  font-weight: 800;
  margin-bottom: 8px;
}

.steps {
  counter-reset: step;
}

.console-layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: calc(100vh - 70px);
}

.sidebar {
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  padding: 20px 14px;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.sidebar button {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  padding: 12px 14px;
  color: var(--muted);
  text-align: left;
  background: transparent;
}

.sidebar button.active,
.sidebar button:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

.nav-group {
  margin-bottom: 18px;
}

.nav-group p {
  margin: 0 0 8px;
  padding: 0 10px;
  color: #8a96a8;
  font-size: 12px;
  font-weight: 700;
}

.nav-icon {
  display: none;
}

.workspace {
  min-width: 0;
  padding: 26px;
}

.workspace-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.workspace-top b,
.workspace-top span {
  display: block;
}

.console-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.console-tools button {
  min-height: 38px;
  padding: 0 12px;
  color: #52627a;
  border: 1px solid #d9e6f7;
  border-radius: 8px;
  background: #fff;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
}

.account-chip span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #0b5fd3;
  border-radius: 999px;
  background: #eaf3ff;
  font-size: 13px;
  font-weight: 800;
}

.account-chip b {
  overflow: hidden;
  color: #24354d;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-shell {
  display: grid;
  gap: 18px;
}

.welcome-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  color: #fff;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(9, 37, 84, 0.95), rgba(23, 100, 232, 0.9)),
    url("../assets/megcore-hero-ai-core.png") center right / cover no-repeat;
  box-shadow: 0 18px 42px rgba(14, 49, 105, 0.16);
}

.welcome-panel h1 {
  margin: 0 0 10px;
  font-size: 32px;
}

.welcome-panel p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: #dcecff;
  line-height: 1.7;
}

.welcome-actions,
.panel-tabs,
.dashboard-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.welcome-actions button,
.panel-tabs button,
.insight-tile {
  border: 1px solid #d9e6f7;
  border-radius: 8px;
  background: #fff;
}

.welcome-actions .primary-btn {
  color: #fff;
  border-color: #1764e8;
  background: linear-gradient(135deg, #1689ff, #1764e8);
}

.welcome-actions button:not(.primary-btn) {
  min-height: 42px;
  padding: 0 14px;
  color: #1764e8;
}

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

.dashboard-card {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 78px;
  align-items: center;
  gap: 14px;
  min-height: 132px;
  padding: 18px;
  overflow: hidden;
  text-align: left;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 35, 70, 0.06);
}

.dashboard-card:hover,
.insight-tile:hover,
.model-card:hover {
  border-color: #8fb9f7;
  transform: translateY(-1px);
}

.dash-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.tone-green .dash-icon {
  background: linear-gradient(135deg, #16a36a, #6dd68e);
}

.tone-pink .dash-icon {
  background: linear-gradient(135deg, #e85d9b, #ff9cc4);
}

.tone-orange .dash-icon {
  background: linear-gradient(135deg, #f08300, #ffc15b);
}

.dash-copy b,
.dash-copy small,
.dash-copy strong {
  display: block;
}

.dash-copy b {
  color: #52627a;
  font-size: 14px;
}

.dash-copy strong {
  margin: 6px 0;
  color: #1f2937;
  font-size: 27px;
}

.dash-copy small {
  color: #718096;
}

.mini-spark {
  position: relative;
  display: block;
  width: 72px;
  height: 48px;
}

.mini-spark i {
  position: absolute;
  left: 8px;
  bottom: 12px;
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  color: #ff9f1a;
  transform: rotate(-48deg);
}

.mini-spark i:nth-child(2) {
  left: 26px;
  bottom: 25px;
  color: #1fc6f3;
  transform: rotate(-8deg);
}

.mini-spark i:nth-child(3) {
  left: 47px;
  bottom: 28px;
  color: #1764e8;
  transform: rotate(-2deg);
}

.dashboard-card em {
  position: absolute;
  right: 16px;
  bottom: 14px;
  color: #1764e8;
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-main {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.45fr);
  gap: 18px;
}

.chart-panel {
  min-height: 390px;
}

.panel-tabs {
  justify-content: flex-end;
}

.panel-tabs button {
  min-height: 34px;
  padding: 0 10px;
  color: #68778d;
}

.panel-tabs button.active {
  color: #0b5fd3;
  border-color: #bcd5fb;
  background: #eef6ff;
}

.account-panel {
  min-height: 390px;
}

.api-state {
  display: grid;
  place-items: center;
  min-height: 280px;
  text-align: center;
}

.empty-illustration {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin-bottom: 18px;
  color: #1764e8;
  border: 1px solid #d9e6f7;
  border-radius: 24px;
  background: linear-gradient(180deg, #f8fbff, #edf6ff);
  font-weight: 900;
}

.api-state b {
  display: block;
  margin-bottom: 8px;
  color: #18233a;
  font-size: 20px;
}

.api-state p {
  max-width: 280px;
  margin: 0;
  line-height: 1.7;
}

.dashboard-bottom {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.insight-tile {
  display: grid;
  gap: 8px;
  padding: 18px;
  text-align: left;
}

.insight-tile b {
  color: #64748b;
}

.insight-tile strong {
  color: #172033;
  font-size: 24px;
}

.insight-tile span {
  color: #657084;
}

.page-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  margin-bottom: 20px;
}

.page-title .eyebrow,
.page-title h1 {
  margin: 0;
}

.page-title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  padding: 18px;
}

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

.metric-card strong {
  display: block;
  margin: 9px 0 4px;
  font-size: 26px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin: 18px 0;
}

.panel {
  padding: 20px;
  overflow: hidden;
}

.line-chart {
  width: 100%;
  height: 230px;
  margin-top: 10px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff, #f2f7ff);
}

.line-chart polyline {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.bar-list > div {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 14px 0;
  padding-bottom: 11px;
}

.bar-list i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.notice {
  margin: 16px 0 0;
  padding: 13px 15px;
  border: 1px solid #cfe0fb;
  border-radius: 8px;
  background: #f0f6ff;
}

.sync-panel {
  margin: 18px 0;
  border-color: rgba(37, 99, 235, 0.18);
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.sync-panel h3 {
  margin-bottom: 14px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-title-row h3 {
  margin-bottom: 0;
}

.primary-btn.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

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

.sync-grid span {
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #64748b;
  font-size: 13px;
}

.sync-grid b {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 14px;
}

.table-wrap {
  overflow: auto;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.empty-table-cell {
  padding: 30px 18px;
  color: #7b8798;
  text-align: center;
  background: #fbfcfe;
}

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

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid #edf1f6;
  white-space: nowrap;
}

th {
  color: #34425a;
  background: #f8fbff;
  font-size: 13px;
}

td button {
  margin-right: 6px;
  padding: 6px 8px;
}

.status {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
}

.status.ok {
  color: var(--ok);
  background: #e9f8f1;
}

.status.off {
  color: #8792a4;
  background: #eef1f5;
}

.status.wait {
  color: #b76a00;
  background: #fff3d8;
}

.filters {
  margin: 12px 0 18px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  margin-top: 7px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.filters input,
.filters select {
  width: 190px;
}

.category-tabs {
  margin-bottom: 12px;
}

.category-tabs button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 230px;
  padding: 12px;
  text-align: left;
  border: 1px solid #d9e6f7;
  border-radius: 8px;
  background: #fff;
}

.category-tabs button b {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  grid-row: span 2;
  color: #fff;
  border-radius: 10px;
  background: linear-gradient(135deg, #1764e8, #23b5e8);
  font-size: 12px;
}

.category-tabs button span {
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f172a;
  font-weight: 800;
}

.category-tabs button small {
  color: #657084;
}

.docs pre {
  overflow: auto;
  padding: 15px;
  color: #d8e8ff;
  border-radius: 8px;
  background: #0f1d35;
}

.faq {
  display: grid;
  gap: 12px;
}

details {
  padding: 18px;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

.form-page {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 32px;
  align-items: start;
}

.registration-form {
  display: grid;
  gap: 16px;
}

.registration-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f6f9ff;
}

.registration-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.registration-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #1769e0, #23b5ed);
  box-shadow: 0 8px 18px rgba(31, 123, 228, .2);
}

.registration-form [data-registration-enterprise] {
  padding: 16px;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  background: #f7fbff;
}

.registration-account-fields {
  display: grid;
  gap: 14px;
}

.form-section-title {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.login-page {
  min-height: calc(100vh - 92px);
  align-items: center;
}

.demo-accounts {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.demo-accounts span {
  display: inline-flex;
  width: fit-content;
  padding: 8px 10px;
  border: 1px solid #cfe0fb;
  border-radius: 8px;
  background: #f0f6ff;
  color: #3b5b78;
  font-size: 13px;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-list p {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f6;
}

.detail-list b {
  color: #475569;
}

.detail-list span {
  color: #0f172a;
  word-break: break-all;
}

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

.model-permission-summary {
  display: grid;
  gap: 4px;
  min-width: 190px;
}

.model-permission-summary code {
  overflow: hidden;
  max-width: 250px;
  color: #475569;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-permission-summary span,
.model-permission-empty {
  color: #64748b;
  font-size: 12px;
}

.customer-row-actions {
  display: flex;
  gap: 6px;
  min-width: 150px;
}

.customer-row-actions button {
  margin-right: 0;
}

.customer-management-actions {
  display: grid;
  gap: 14px;
}

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

.action-grid button {
  min-height: 42px;
  margin: 0;
  text-align: left;
}

.payment-qr {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #f8fbff;
}

.payment-qr-codes {
  display: flex;
  gap: 10px;
}

.payment-qr figure {
  display: grid;
  gap: 4px;
  margin: 0;
  text-align: center;
}

.payment-qr figcaption {
  color: #475569;
  font-size: 12px;
}

.payment-qr img {
  width: 118px;
  height: 118px;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
}

.payment-qr div {
  display: grid;
  gap: 6px;
}

.payment-qr span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.key-model-selector {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d8e3f2;
  border-radius: 10px;
  background: #f8fbff;
}

.key-model-toolbar,
.key-model-category > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.key-model-toolbar span {
  display: flex;
  gap: 8px;
}

.key-model-toolbar button,
.key-model-category button {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #b9d4ff;
  border-radius: 6px;
  color: #1769e8;
  background: #fff;
  font-size: 13px;
}

.key-model-category {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #e4edf8;
}

.key-model-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.key-model-options label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 7px;
  align-items: center;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
}

.key-model-options input {
  grid-row: span 2;
  width: auto;
  min-height: auto;
  margin: 0;
}

.key-model-options small {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-limit-details {
  padding: 10px;
  border: 1px solid #d8e3f2;
  border-radius: 8px;
  background: #fbfdff;
}

.key-limit-details summary {
  cursor: pointer;
  color: #334155;
  font-weight: 600;
}

.key-limit-details .form-grid {
  margin-top: 12px;
}

form {
  display: grid;
  gap: 14px;
}

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

.check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 18, 38, 0.48);
}

.modal {
  position: relative;
  width: min(560px, 100%);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 24px 12px;
  background: #fff;
  z-index: 1;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
}

.modal-header h3 {
  margin: 0;
  flex: 1;
}

.modal-body {
  overflow-y: auto;
  padding: 20px 24px 24px;
  flex: 1;
}

.modal-close {
  position: relative;
  top: 0;
  right: 0;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #eef3fa;
  flex-shrink: 0;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.toast {
  position: fixed;
  right: 24px;
  top: 90px;
  z-index: 80;
  transform: translateY(-12px);
  opacity: 0;
  padding: 12px 16px;
  color: #fff;
  border-radius: 8px;
  background: #14223d;
  box-shadow: var(--shadow);
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0;
}

.model-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  background:
    radial-gradient(circle at 82% 18%, rgba(31, 198, 243, 0.18), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #eef7ff 100%);
}

.model-hero h3 {
  margin: 6px 0 8px;
  color: #0f172a;
  font-size: 26px;
}

.model-hero p {
  margin: 0;
  color: #52627a;
  line-height: 1.8;
}

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

.model-endpoints code {
  display: block;
  padding: 12px;
  border: 1px solid #cfe3fb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #0b5fd3;
  font-size: 12px;
  white-space: normal;
  word-break: break-word;
}

.model-market {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 16px;
  margin: 18px 0;
}

.featured-models {
  display: grid;
  gap: 18px;
  margin: 18px 0;
  padding: 20px;
  border: 1px solid #cfe3fb;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 248, 255, 0.96));
}

.featured-models .panel-title-row > span,
.featured-model-group-head > span {
  color: #637791;
  font-size: 13px;
}

.featured-model-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.featured-model-group-head > b {
  color: #17365e;
  font-size: 17px;
}

.featured-model-market {
  margin: 10px 0 0;
  grid-auto-rows: 1fr;
}

.featured-model-market .model-card {
  min-height: 0;
}

.model-catalog-groups {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.model-catalog-group {
  padding: 0;
  overflow: hidden;
  border: 1px solid #d9e6f7;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
}

.model-catalog-group summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  color: #17365e;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.model-catalog-group summary::-webkit-details-marker {
  display: none;
}

.model-catalog-group summary small {
  margin-left: auto;
  color: #6d8198;
  font-weight: 500;
}

.model-catalog-group summary::after {
  content: '展开';
  color: #2375dd;
  font-size: 12px;
}

.model-catalog-group[open] summary {
  border-bottom: 1px solid #d9e6f7;
  background: #f7fbff;
}

.model-catalog-group[open] summary::after {
  content: '收起';
}

.model-catalog-group .model-market {
  padding: 0 16px 16px;
}

.model-explorer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0;
  padding: 18px 20px;
  border: 1px solid #cfe3fb;
  border-radius: 10px;
  background: linear-gradient(135deg, #fafdff, #edf7ff);
}

.model-explorer b {
  color: #10203b;
  font-size: 18px;
}

.model-explorer p,
.catalog-count-note {
  margin: 6px 0 0;
  color: #5d6f87;
  line-height: 1.65;
}

.model-explorer-form {
  display: grid;
  grid-template-columns: minmax(260px, 420px) auto;
  align-items: end;
  gap: 10px;
  min-width: min(100%, 520px);
}

.model-explorer-form label {
  color: #4e627f;
  font-size: 13px;
  font-weight: 700;
}

.model-explorer-form button {
  min-height: 42px;
  white-space: nowrap;
}

.catalog-count-note {
  margin-top: 18px;
  font-size: 13px;
}

.model-card {
  display: grid;
  gap: 10px;
  min-height: 206px;
  padding: 18px;
  height: 100%;
  border: 1px solid #dbe5f1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(15, 35, 70, 0.05);
  cursor: pointer;
}

.model-card-top,
.model-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.model-card-top {
  justify-content: space-between;
}

.model-category-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #d7e7fb;
  border-radius: 999px;
  color: #245a96;
  background: #f3f8ff;
  font-size: 12px;
  font-weight: 700;
}

.model-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0b5fd3, #1fc6f3);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 12px 24px rgba(22, 119, 255, 0.22);
}

.model-mark.logo {
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: linear-gradient(135deg, #5b4ff7, #1876ee 54%, #26c6da);
  font-size: 12px;
  letter-spacing: 0.3px;
}

.model-mark.image {
  background: linear-gradient(135deg, #f08300, #ffbd4a);
}

.model-mark.video {
  background: linear-gradient(135deg, #7357ff, #23b5e8);
}

.model-mark.vector {
  background: linear-gradient(135deg, #16a36a, #5fd4a0);
}

.model-mark.audio {
  background: linear-gradient(135deg, #0f766e, #2dd4bf);
}

.model-mark.qoder {
  background: linear-gradient(135deg, #101827, #1764e8);
}

.model-mark.glm {
  background: linear-gradient(135deg, #6d28d9, #a855f7);
  font-size: 12px;
}

.model-mark.kimi {
  background: linear-gradient(135deg, #0e7490, #22d3ee);
  font-size: 11px;
}

.model-mark.minimax {
  background: linear-gradient(135deg, #db2777, #fb7185);
}

.model-mark.deepseek {
  background: linear-gradient(135deg, #1d4ed8, #60a5fa);
}

.model-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 19px;
}

.model-card code {
  color: #5f728d;
  white-space: normal;
  word-break: break-all;
}

.model-card p {
  margin: 0;
  color: #52627a;
  line-height: 1.55;
}

.model-io-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.model-io-summary span {
  padding: 4px 7px;
  border: 1px solid #e1eaf5;
  border-radius: 6px;
  background: #f8fbff;
  font-size: 12px;
}

.model-scenario {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.model-card-meta {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #6a7e98;
  font-size: 12px;
}

.model-price-summary {
  display: grid;
  gap: 5px;
  min-height: 68px;
  min-width: 0;
  padding: 8px 9px;
  border-radius: 8px;
  background: #f2f7fd;
  font-weight: 500;
}

.model-price-summary > span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  min-width: 0;
}

.model-price-summary small {
  color: #6b7e97;
  white-space: nowrap;
}

.model-price-summary b {
  color: #145dac;
  text-align: right;
  white-space: nowrap;
}

.model-price-empty {
  color: #71829a;
}

.model-reasoning-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  color: #52627a;
  background: #f8fafc;
  font-size: 12px;
}

.model-reasoning-tag b {
  color: #334155;
}

.model-reasoning-tag.switchable {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.model-reasoning-tag.switchable b {
  color: #1d4ed8;
}

.model-reasoning-tag.always {
  border-color: #ddd6fe;
  background: #f5f3ff;
}

.model-reasoning-tag.always b {
  color: #6d28d9;
}

.model-reasoning-tag.unsupported {
  color: #64748b;
  background: #f8fafc;
}

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

.reasoning-profile-grid article {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  background: #f8fbff;
}

.reasoning-profile-grid p {
  margin: 0;
  color: #52627a;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .reasoning-profile-grid {
    grid-template-columns: 1fr;
  }
}

.model-card-meta > span + span::before {
  margin-right: 8px;
  color: #c0ccda;
  content: '·';
}

.model-detail-button {
  width: fit-content;
  min-height: 34px;
  margin-top: auto;
  padding: 0 12px;
  border: 1px solid #c7dcf7;
  border-radius: 8px;
  color: #1764e8;
  background: #f6faff;
  font-weight: 700;
}

.model-detail-button:hover {
  border-color: #1764e8;
  background: #edf5ff;
}

.model-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f4faff, #fff);
}

.model-detail-hero > div {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.model-detail-hero h4 {
  margin: 0 0 5px;
  color: #10203b;
  font-size: 18px;
}

.model-detail-hero code {
  color: #58708f;
  word-break: break-all;
}

.model-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.model-detail-grid article,
.rate-detail-grid article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #dce8f7;
  border-radius: 8px;
  background: #fff;
}

.model-detail-grid span,
.rate-detail-grid span {
  color: #71829a;
  font-size: 12px;
}

.model-detail-grid b {
  color: #1b304d;
  line-height: 1.5;
}

.model-detail-price {
  grid-column: 1 / -1;
  background: #f5faff !important;
}

.model-detail-price small,
.rate-detail-grid small {
  color: #6b7d93;
  line-height: 1.5;
}

.pricing-browser {
  display: grid;
  gap: 12px;
}

.pricing-group {
  padding: 0;
  overflow: hidden;
  border: 1px solid #d9e6f7;
  border-radius: 10px;
  background: #fff;
}

.pricing-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  color: #16345b;
  list-style: none;
}

.pricing-group summary::-webkit-details-marker {
  display: none;
}

.pricing-group summary::after {
  content: '展开';
  margin-left: auto;
  color: #2375dd;
  font-size: 12px;
  font-weight: 600;
}

.pricing-group[open] summary {
  border-bottom: 1px solid #d9e6f7;
  background: #f7fbff;
}

.pricing-group[open] summary::after {
  content: '收起';
}

.pricing-group summary small {
  color: #6c7f97;
  font-weight: 500;
}

.pricing-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  grid-auto-rows: 1fr;
  gap: 12px;
  padding: 16px;
}

.pricing-rule-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  height: 100%;
  border: 1px solid #dce8f7;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f9fcff);
}

.pricing-rule-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.pricing-rule-head h4 {
  margin: 0 0 6px;
  color: #152b4a;
  line-height: 1.4;
}

.pricing-rule-head code {
  color: #637791;
  font-size: 12px;
  word-break: break-all;
}

.pricing-rule-card > p {
  margin: 0;
  color: #71829a;
  font-size: 12px;
}

.rate-preview {
  display: grid;
  gap: 6px;
  min-height: 58px;
}

.rate-preview span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #5c7089;
  font-size: 13px;
}

.rate-preview b {
  color: #144f9a;
  white-space: nowrap;
}

.rate-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.rate-detail-grid strong {
  color: #145dac;
  font-size: 17px;
}

.model-simple-prices {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.model-simple-prices article {
  align-content: center;
  min-height: 76px;
}

.rate-detail-grid code {
  overflow-wrap: anywhere;
  color: #71829a;
  font-size: 11px;
}

.detail-section-title {
  margin: 22px 0 10px;
  color: #18375f;
}

.official-rate-section {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #dce8f7;
  border-radius: 10px;
  background: #f9fcff;
}

.official-rate-section > p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: #60738c;
  font-size: 13px;
}

.official-rate-section > p b {
  color: #17365e;
}

.model-tags span {
  padding: 7px 9px;
  border-radius: 8px;
  background: #eef6ff;
  color: #31516f;
  font-size: 12px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 16px;
  margin-top: 18px;
}

.product-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  height: 100%;
  border: 1px solid #d9e6f7;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.product-visual {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 14px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(22, 119, 255, 0.82)),
    radial-gradient(circle at top right, rgba(255, 138, 0, 0.35), transparent 36%);
  color: #fff;
  overflow: hidden;
}

.product-visual.image-backed {
  position: relative;
  display: block;
  min-height: 152px;
  padding: 0;
  background: #0f172a;
}

.product-visual.image-backed img {
  display: block;
  width: 100%;
  height: 152px;
  object-fit: cover;
  opacity: 0.88;
}

.product-visual.image-backed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.82));
}

.product-visual-caption {
  position: absolute;
  inset: auto 12px 12px 12px;
  z-index: 1;
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 10px;
}

.product-visual-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 28px;
  font-weight: 900;
}

.product-visual b,
.product-visual small {
  display: block;
}

.product-visual small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
}

.product-visual code {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
}

.qoder-product-visual {
  grid-template-columns: 54px minmax(0, 1fr);
  background:
    radial-gradient(circle at 88% 18%, rgba(45, 190, 125, 0.34), transparent 30%),
    linear-gradient(135deg, #14233b, #1c5d91);
}

.qoder-product-visual div {
  min-width: 0;
}

.qoder-product-visual b,
.qoder-product-visual small,
.qoder-product-visual em {
  display: block;
}

.qoder-product-visual b {
  margin: 3px 0;
  font-size: 20px;
}

.qoder-product-visual em {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
}

.qwen-office-panel {
  overflow: hidden;
  background:
    radial-gradient(circle at 94% 0%, rgba(128, 92, 255, 0.11), transparent 28%),
    #fff;
}

.qwen-office-brand-badge {
  padding: 7px 12px;
  border: 1px solid rgba(112, 81, 238, 0.22);
  border-radius: 999px;
  color: #5f43c5;
  background: #f4f1ff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.qwen-office-product-visual {
  grid-template-columns: 62px minmax(0, 1fr);
  min-height: 126px;
  background:
    radial-gradient(circle at 88% 10%, rgba(55, 205, 229, 0.45), transparent 33%),
    radial-gradient(circle at 15% 110%, rgba(148, 94, 255, 0.55), transparent 44%),
    linear-gradient(135deg, #2f2a73, #5c4fe4 54%, #148fc5);
}

.qwen-office-product-visual div {
  min-width: 0;
}

.qwen-office-product-visual b,
.qwen-office-product-visual small,
.qwen-office-product-visual em {
  display: block;
}

.qwen-office-product-visual b {
  margin: 4px 0;
  font-size: 21px;
}

.qwen-office-product-visual em {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
}

.qwen-office-mark {
  position: relative;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.1);
}

.qwen-office-mark::before,
.qwen-office-mark::after,
.qwen-office-mark i {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  content: '';
}

.qwen-office-mark::before { inset: 8px; }
.qwen-office-mark::after { inset: 15px; }
.qwen-office-mark i { inset: 22px; }
.qwen-office-mark b { position: relative; z-index: 1; margin: 0; font-size: 23px; }

.qwen-office-guide .guide-grid article {
  border-top: 3px solid #7460ed;
  background: linear-gradient(180deg, #fbfaff, #f7fbff);
}

.console-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
  padding: 22px 0 4px;
}

.console-intro h1,
.console-intro p {
  margin: 0;
}

.console-intro h1 {
  margin-top: 5px;
  font-size: clamp(28px, 3vw, 40px);
}

.console-intro > div > p:last-child {
  margin-top: 8px;
  color: #64748b;
}

.console-intro-actions,
.panel-title-row,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.console-intro-actions button,
.panel-title-row > button,
.quick-start button {
  border: 1px solid #cfe0fb;
  border-radius: 8px;
  background: #fff;
  color: #1e5fbb;
  cursor: pointer;
}

.console-intro-actions button,
.panel-title-row > button {
  padding: 10px 14px;
}

.console-intro-actions .primary-btn {
  border: 1px solid #1764e8;
  background: linear-gradient(135deg, #125bea, #21b7f0);
  color: #fff;
}

.integration-model-tags {
  margin: 10px 0 18px;
}

.integration-model-tags code {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.quick-start {
  margin: 0 0 14px;
}

.panel-title-row {
  justify-content: space-between;
}

.panel-title-row h3,
.panel-title-row p {
  margin: 0;
}

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

.quick-start-item {
  min-height: 132px;
  padding: 15px;
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.quick-start-item:hover {
  transform: translateY(-2px);
  border-color: #79aef4;
}

.quick-start-item span,
.quick-start-item small,
.quick-start-item code {
  display: block;
}

.quick-start-item span {
  color: #64748b;
  font-size: 13px;
}

.quick-start-item code {
  margin: 10px 0 8px;
  overflow: hidden;
  color: #172033;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-start-item small {
  color: #708198;
  line-height: 1.55;
}

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

.compact-metrics .metric-card {
  padding: 16px;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.compact-metrics button {
  padding: 16px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: #52627a;
  text-align: left;
  cursor: pointer;
}

.compact-metrics span,
.compact-metrics strong {
  display: block;
}

.compact-metrics strong {
  margin-top: 6px;
  color: #172033;
  font-size: 20px;
  line-height: 1.3;
  word-break: break-word;
}

.compact-metrics .status-badge {
  margin-top: 6px;
  font-size: 13px;
}

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

.guide-grid article {
  padding: 16px;
  border: 1px solid #d9e6f7;
  border-radius: 8px;
  background: #f8fbff;
}

.guide-grid b {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
}

.guide-grid p {
  margin: 0;
  color: #52627a;
  line-height: 1.7;
}

.product-card-head,
.product-meta,
.price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.product-card-head {
  justify-content: space-between;
  color: #64748b;
  font-size: 13px;
}

.product-card-head b,
.price-row em {
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f2ff;
  color: #1677ff;
  font-style: normal;
}

.product-card h3 {
  margin: 0;
  color: #0f172a;
}

.product-card p {
  margin: 0;
  color: #52627a;
  line-height: 1.7;
}

.product-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #334155;
}

.price-row strong {
  color: #0f172a;
  font-size: 30px;
}

.price-row del {
  color: #94a3b8;
}

.product-meta span {
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef6ff;
  color: #31516f;
  font-size: 13px;
}

.product-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.product-actions a {
  color: #1677ff;
  text-decoration: none;
}

.qoder-flow .flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.qoder-flow .flow-steps span {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #d9e6f7;
  border-radius: 8px;
  background: #fff;
  color: #334155;
}

.qoder-flow .flow-steps b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #1677ff;
  color: #fff;
}

.order-summary {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #d9e6f7;
  border-radius: 8px;
  background: #f8fbff;
}

.order-summary span {
  color: #64748b;
}

.form-hint {
  margin: -4px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.workbench-panel {
  background:
    linear-gradient(135deg, rgba(22, 119, 255, 0.08), rgba(16, 185, 129, 0.05)),
    #fff;
}

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

.customer-application-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workbench-cards article {
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid #d9e6f7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.workbench-cards b {
  color: #1677ff;
  font-size: 32px;
  line-height: 1;
}

.workbench-cards span {
  color: #0f172a;
  font-weight: 800;
}

.workbench-cards p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.order-summary strong {
  color: #0f172a;
}

@media (max-width: 980px) {
  .topbar {
    flex-wrap: wrap;
    padding: 12px 18px;
  }

  .top-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

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

  .sidebar {
    position: static;
    display: block;
    height: auto;
    padding: 12px;
  }

  .nav-group {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    overflow-x: auto;
  }

  .nav-group p {
    display: none;
  }

  .sidebar button {
    width: auto;
    white-space: nowrap;
  }

  .metrics,
  .dashboard-cards,
  .dashboard-main,
  .dashboard-bottom,
  .journey-grid,
  .feature-grid,
  .steps,
  .split,
  .grid-2,
  .model-hero,
  .model-market,
  .product-grid,
  .qoder-flow .flow-steps,
  .form-page,
  .workbench-cards {
    grid-template-columns: 1fr 1fr;
  }

  .quick-start-grid,
  .compact-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .model-explorer {
    align-items: stretch;
    flex-direction: column;
  }

  .model-explorer-form {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .brand {
    min-width: 0;
  }

  .hero-content {
    padding: 84px 20px 56px;
  }

  .section,
  .form-page {
    width: min(100% - 28px, 1180px);
    padding: 42px 0;
  }

  .metrics,
  .dashboard-cards,
  .dashboard-main,
  .dashboard-bottom,
  .journey-grid,
  .feature-grid,
  .steps,
  .split,
  .grid-2,
  .form-page,
  .form-grid,
  .model-hero,
  .model-market,
  .model-endpoints,
  .product-grid,
  .qoder-flow .flow-steps,
  .compact {
    grid-template-columns: 1fr;
  }

  .quick-start-grid,
  .compact-metrics {
    grid-template-columns: 1fr;
  }

  .console-intro {
    align-items: start;
    flex-direction: column;
  }

  .workbench-cards {
    grid-template-columns: 1fr;
  }

  .workspace {
    padding: 16px;
  }

  .workspace-top,
  .page-title,
  .welcome-panel {
    align-items: start;
    flex-direction: column;
  }

  .dashboard-card {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .mini-spark {
    display: none;
  }

  .filters input,
  .filters select {
    width: 100%;
  }
}

/* MegCore UI refinement: keep the product compact, brighter, and more AI-platform like. */
body {
  background:
    radial-gradient(circle at 18% -10%, rgba(23, 100, 232, 0.16), transparent 30%),
    radial-gradient(circle at 92% 8%, rgba(35, 181, 232, 0.13), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #f3f7fc 42%, #eef4fb 100%);
}

.topbar {
  min-height: 66px;
  border-bottom-color: rgba(168, 189, 218, 0.45);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 30px rgba(15, 35, 70, 0.06);
}

.console-layout {
  background:
    linear-gradient(rgba(23, 100, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 100, 232, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 250, 255, 0.88)),
    radial-gradient(circle at 0% 0%, rgba(23, 100, 232, 0.08), transparent 35%);
  backdrop-filter: blur(18px);
}

.nav-group {
  margin-bottom: 0;
}

.sidebar button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.sidebar button.active,
.sidebar button:hover {
  color: #0b56c5;
  border-color: rgba(23, 100, 232, 0.18);
  background: linear-gradient(135deg, rgba(232, 241, 255, 0.96), rgba(255, 255, 255, 0.78));
  box-shadow: 0 10px 24px rgba(23, 100, 232, 0.08);
}

.workspace {
  padding: 24px;
}

.workspace-top,
.panel,
.metric-card,
.dashboard-card,
.model-card,
.product-card,
.insight-tile,
.welcome-panel {
  border-radius: 12px;
}

.workspace-top,
.panel,
.metric-card,
.dashboard-card,
.model-card,
.product-card,
.insight-tile {
  border-color: rgba(174, 194, 220, 0.58);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(21, 44, 84, 0.07);
}

.welcome-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(5, 18, 46, 0.96), rgba(11, 76, 171, 0.88)),
    url("../assets/megcore-hero-ai-core.png") center right / cover no-repeat;
}

.welcome-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(126, 200, 255, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 200, 255, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 76% 32%, rgba(240, 131, 0, 0.18), transparent 22%);
  background-size: 42px 42px, 42px 42px, auto;
}

.page-title h1,
.welcome-panel h1 {
  letter-spacing: 0;
}

.product-card::before,
.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--blue), var(--cyan), var(--orange));
  opacity: 0.85;
}

.product-card:hover,
.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(21, 76, 145, 0.12);
}

.primary-btn {
  border-radius: 10px;
  background: linear-gradient(135deg, #125bea, #21b7f0);
  box-shadow: 0 13px 28px rgba(23, 100, 232, 0.22);
}

.secondary-btn,
.ghost-btn,
.actions button,
.user-actions button,
td button,
.console-tools button {
  border-radius: 10px;
}

.notice {
  color: #475569;
  border-color: rgba(23, 100, 232, 0.18);
  background: linear-gradient(135deg, rgba(240, 246, 255, 0.98), rgba(255, 255, 255, 0.78));
}

.modal {
  border-radius: 14px;
  border: 1px solid rgba(196, 212, 235, 0.8);
  box-shadow: 0 28px 70px rgba(8, 22, 48, 0.24);
}

.key-reveal {
  display: grid;
  gap: 16px;
}

.key-reveal-head,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.key-value {
  padding: 14px 16px;
  border: 1px solid #bdd5ff;
  border-radius: 10px;
  background: #f6faff;
}

.key-value code {
  display: block;
  color: #143a70;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.key-hint {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

.key-management table {
  width: 100%;
  min-width: 680px;
}

.key-management td:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar.admin button {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.nav-count,
.toolbar-count {
  align-items: center;
  background: #ef4444;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  min-width: 20px;
  padding: 4px 6px;
}

.toolbar-count {
  margin-left: 6px;
}

/* Mobile-first refinements. Dense operational tables stay scrollable, while
   navigation, cards, forms and dialogs reflow for touch screens. */
@media (max-width: 768px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    overflow-x: hidden;
  }

  .topbar {
    gap: 8px;
    min-height: 62px;
    padding: 8px 14px;
  }

  .brand {
    flex: 1;
    min-width: 0;
  }

  .brand-mark-img {
    width: 34px;
    height: 34px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand small {
    display: none;
  }

  .top-cta,
  .internal-entry {
    min-height: 38px;
    padding-inline: 10px;
    font-size: 13px;
  }

  .top-nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar,
  .sidebar::-webkit-scrollbar {
    display: none;
  }

  .top-nav a {
    flex: 0 0 auto;
    padding: 8px 10px;
    font-size: 13px;
  }

  .hero-content {
    min-height: auto;
    padding: 72px 20px 44px;
  }

  .hero h1 {
    font-size: clamp(34px, 11vw, 46px);
  }

  .hero-copy {
    font-size: 16px;
    line-height: 1.7;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions button {
    width: 100%;
    min-height: 46px;
  }

  .hero-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 28px;
  }

  .hero-metrics span {
    min-width: 0;
    padding: 12px 14px;
  }

  .hero-metrics strong {
    display: inline;
    margin-right: 6px;
    font-size: 17px;
  }

  .section,
  .form-page {
    width: min(100% - 28px, 1180px);
    padding: 36px 0;
  }

  h2 {
    font-size: 26px;
  }

  .feature-grid,
  .factory-grid,
  .form-page,
  .metrics,
  .dashboard-cards,
  .dashboard-main,
  .dashboard-bottom,
  .journey-grid,
  .feature-grid,
  .steps,
  .split,
  .grid-2,
  .model-hero,
  .model-market,
  .model-endpoints,
  .product-grid,
  .qoder-flow .flow-steps,
  .workbench-cards,
  .compact {
    grid-template-columns: 1fr;
  }

  .console-layout {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .sidebar,
  .sidebar.admin {
    position: static;
    display: flex;
    height: auto;
    gap: 8px;
    padding: 8px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
  }

  .sidebar .nav-group {
    display: contents;
  }

  .sidebar .nav-group p {
    display: none;
  }

  .sidebar button,
  .sidebar.admin button {
    display: inline-flex;
    flex: 0 0 auto;
    width: auto;
    min-height: 40px;
    margin: 0;
    padding: 8px 12px;
    font-size: 13px;
  }

  .workspace {
    padding: 14px;
  }

  .workspace-top,
  .page-title,
  .panel-title-row,
  .console-intro,
  .welcome-panel {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .workspace-top {
    margin-bottom: 16px;
    padding: 12px;
  }

  .console-tools,
  .user-actions,
  .page-title-actions,
  .actions {
    justify-content: flex-start;
  }

  .console-tools button,
  .user-actions button,
  .page-title-actions button,
  .panel-title-row > button,
  .actions button {
    min-height: 42px;
  }

  .page-title {
    margin-bottom: 14px;
  }

  .page-title h1 {
    font-size: 28px;
  }

  .page-title-actions button {
    flex: 1 1 170px;
  }

  .panel,
  .metric-card,
  .dashboard-card,
  .model-card,
  .product-card,
  .insight-tile {
    padding: 14px;
  }

  .compact-metrics,
  .quick-start-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .compact-metrics button {
    min-height: 86px;
    padding: 12px;
  }

  .category-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }

  .category-tabs button {
    flex: 0 0 210px;
    min-width: 210px;
  }

  .model-market {
    display: grid;
    gap: 12px;
  }

  .model-explorer {
    padding: 14px;
  }

  .model-explorer-form,
  .model-detail-grid {
    grid-template-columns: 1fr;
  }

  .model-explorer-form button {
    width: 100%;
  }

  .model-detail-price {
    grid-column: auto;
  }

  .pricing-group summary {
    padding: 14px;
  }

  .pricing-rule-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .rate-detail-grid {
    grid-template-columns: 1fr;
  }

  .model-card button,
  .product-card button {
    width: 100%;
    min-height: 44px;
  }

  .table-wrap {
    margin-top: 12px;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 680px;
  }

  th,
  td {
    padding: 11px 12px;
  }

  .docs pre {
    margin-inline: -2px;
    padding: 12px;
    font-size: 12px;
  }

  .detail-list p {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .form-grid,
  .model-checks,
  .key-model-options {
    grid-template-columns: 1fr;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .modal-backdrop {
    place-items: end center;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: min(88vh, 760px);
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
  }

  .modal-close {
    top: 10px;
    right: 10px;
  }

  .modal h3 {
    padding-right: 38px;
  }

  .key-management {
    overflow-x: auto;
  }

  .key-management table {
    min-width: 640px;
  }

  .toast {
    top: auto;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 14px;
  }
}

@media (max-width: 420px) {
  .topbar {
    padding-inline: 10px;
  }

  .brand strong {
    font-size: 15px;
  }

  .top-cta,
  .internal-entry {
    padding-inline: 8px;
  }

  .workspace {
    padding: 12px;
  }

  .page-title h1 {
    font-size: 25px;
  }

  .compact-metrics,
  .quick-start-grid {
    grid-template-columns: 1fr;
  }

  .category-tabs button {
    flex-basis: 88%;
    min-width: 88%;
  }
}

/* Payment methods grid */
.payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.payment-method-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  transition: border-color 0.2s;
}

.payment-method-card.active {
  border-color: var(--primary);
}

.payment-method-card.pending {
  opacity: 0.6;
}

.payment-method-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.payment-icon {
  font-size: 24px;
}

.payment-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--primary);
  color: white;
  font-size: 12px;
}

.payment-badge.disabled {
  background: var(--border);
}

.payment-qr-slot {
  text-align: center;
}

.payment-qr-slot img {
  max-width: 200px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.qr-placeholder {
  padding: 40px 20px;
  background: var(--bg-secondary);
  border-radius: 4px;
}

.qr-placeholder-icon {
  font-size: 48px;
  opacity: 0.3;
}

.qr-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.payment-bank-info {
  margin: 16px 0;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.payment-bank-info h4 {
  margin: 0 0 12px;
}

.payment-bank-info .detail-list p {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.allinpay-entry,
.manual-recharge {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fbff;
}

.allinpay-entry h4,
.manual-recharge summary {
  margin: 0 0 12px;
  color: #17365d;
  font-weight: 700;
}

.manual-recharge summary {
  cursor: pointer;
}

.manual-recharge form {
  margin-top: 14px;
}

.allinpay-result {
  display: grid;
  justify-items: center;
  gap: 16px;
}

.allinpay-result .detail-list {
  width: 100%;
}

.allinpay-qr {
  width: min(320px, 80vw);
  height: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.allinpay-checkout {
  padding: 0;
  overflow: hidden;
  border: 1px solid #c9d9f4;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(21, 61, 120, 0.12);
}

.checkout-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 0%, rgba(31, 203, 224, 0.6), transparent 35%),
    linear-gradient(135deg, #153d78, #1768d5 64%, #16a7d9);
}

.checkout-heading h4 {
  margin: 5px 0 6px;
  color: #fff;
  font-size: 24px;
}

.checkout-heading p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.checkout-kicker {
  color: #9eeaff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.checkout-secure {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  font-size: 12px;
  font-weight: 700;
}

.allinpay-checkout form {
  padding: 24px 26px 26px;
}

.allinpay-checkout fieldset {
  min-width: 0;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.allinpay-checkout legend {
  margin-bottom: 12px;
  color: #203451;
  font-size: 14px;
  font-weight: 800;
}

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

.recharge-amount-option {
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 12px 10px;
  border: 1px solid #d9e3f2;
  border-radius: 12px;
  color: #1e3452;
  background: #f9fbfe;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.recharge-amount-option:hover {
  transform: translateY(-1px);
  border-color: #7aa9ef;
}

.recharge-amount-option.active {
  border-color: #1768d5;
  background: linear-gradient(145deg, #eef5ff, #f4fbff);
  box-shadow: inset 0 0 0 1px #1768d5, 0 7px 18px rgba(23, 104, 213, 0.12);
}

.recharge-amount-option strong {
  font-size: 18px;
}

.recharge-amount-option span {
  color: #7889a1;
  font-size: 12px;
}

.custom-recharge-amount {
  margin-top: 12px;
}

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

.checkout-note {
  margin: -4px 0 18px;
  padding: 12px 14px;
  border: 1px solid #e1e8f2;
  border-radius: 10px;
  background: #fbfcfe;
}

.checkout-note summary {
  cursor: pointer;
  color: #526983;
  font-weight: 700;
}

.checkout-note label {
  margin-top: 12px;
}

.checkout-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
  padding: 16px 18px;
  border-radius: 12px;
  color: #203451;
  background: #f0f6ff;
}

.checkout-total strong {
  color: #0a61d5;
  font-size: 24px;
}

.checkout-submit {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
}

.checkout-footnote {
  margin: 10px 0 0;
  color: #8794a7;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 720px) {
  .checkout-heading,
  .checkout-form-grid {
    grid-template-columns: 1fr;
  }

  .checkout-heading {
    display: grid;
  }

  .checkout-secure {
    justify-self: start;
  }

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

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.active {
  background: #e6f7ed;
  color: #1a7f37;
}

.status-badge.warning {
  background: #fff8e1;
  color: #b8860b;
}

.status-badge.pending {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.badge-postpaid {
  display: inline-block;
  background: #0d9488;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}
.settlement-info {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 4px;
}



/* === v1.3.0 Onboard Form Styles === */
.onboard-panel { max-width: 720px; }
.onboard-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.onboard-form .form-field { display: flex; flex-direction: column; gap: 4px; }
.onboard-form .form-field label { font-weight: 600; font-size: 0.85rem; color: #334155; }
.onboard-form .form-field .required { color: #ef4444; }
.onboard-form .form-field input, .onboard-form .form-field select {
  padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 0.9rem;
  transition: border-color 0.2s;
}
.onboard-form .form-field input:focus, .onboard-form .form-field select:focus {
  border-color: #3b82f6; outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.onboard-form .form-field small { font-size: 0.75rem; color: #94a3b8; }
.onboard-form .form-section-title { font-weight: 600; font-size: 0.9rem; color: #1e293b; margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid #e2e8f0; }
.onboard-form .form-actions { display: flex; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #e2e8f0; }
.onboard-form .form-actions button[type="submit"] { min-width: 160px; }
.onboard-form button:disabled { opacity: 0.6; cursor: not-allowed; }
/* Onboard result styles */
.onboard-result { max-width: 640px; }
.onboard-result .result-header { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.onboard-result .result-header.success { background: #f0fdf4; border: 1px solid #bbf7d0; }
.onboard-result .result-header.partial { background: #fffbeb; border: 1px solid #fde68a; }
.onboard-result .result-header h3 { margin: 0 0 4px; font-size: 1.1rem; }
.onboard-result .result-header p { margin: 0; font-size: 0.9rem; color: #475569; }
.onboard-result .result-credentials { margin-bottom: 16px; }
.onboard-result .result-credentials h4 { font-size: 0.85rem; color: #64748b; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.detail-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.detail-table td { padding: 6px 12px; border-bottom: 1px solid #f1f5f9; }
.detail-table td:first-child { font-weight: 500; color: #475569; width: 140px; white-space: nowrap; }
.detail-table td code { background: #f8fafc; padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; }
.detail-table button { font-size: 0.75rem; padding: 2px 8px; margin-left: 8px; }
.onboard-result .result-warning { background: #fffbeb; border: 1px solid #fde68a; padding: 12px 16px; border-radius: 8px; margin-top: 12px; }
.onboard-result .result-warning h4 { margin: 0 0 6px; color: #92400e; }
.onboard-result .result-warning p { margin: 4px 0; font-size: 0.85rem; color: #78350f; }
.onboard-result .result-errors { background: #fef2f2; border: 1px solid #fecaca; padding: 12px 16px; border-radius: 8px; margin-top: 12px; }
.status.ok { color: #16a34a; font-weight: 600; }
.status.warn { color: #d97706; font-weight: 600; }
