:root {
  --bg: #eaf8ff;
  --panel: #fafdff;
  --card: #ffffff;
  --ink: #18324a;
  --muted: #64798b;
  --line: #b9e6ff;
  --line-soft: #d7f0ff;
  --blue: #0ea5e9;
  --blue-deep: #0578c7;
  --blue-soft: #effaff;
  --red: #e11d48;
  --green: #0f9f6e;
  --amber: #f59e0b;
  --shadow: 0 20px 54px rgba(12, 99, 145, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 4% 18%, rgba(255, 255, 255, 0.86), transparent 20%),
    linear-gradient(135deg, #def5ff 0%, #f7fcff 52%, #dff5ff 100%);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 70px auto auto -130px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(14, 165, 233, 0.13);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: var(--blue-deep);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 70px;
  border-bottom: 1px solid rgba(14, 165, 233, 0.22);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(14px);
  padding: 0 max(28px, calc((100vw - 1160px) / 2));
}

.brand {
  display: flex;
  align-items: center;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #263f55;
  font-size: 15px;
  font-weight: 700;
}

.topnav span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
}

.topnav .active {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8f7ff;
  color: var(--blue-deep);
}

.service-pill {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 13px;
  padding: 0 12px;
}

.service-pill.ready {
  border-color: rgba(15, 159, 110, 0.24);
  color: var(--green);
}

.service-pill.warn {
  border-color: rgba(225, 29, 72, 0.24);
  color: var(--red);
}

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

.panel {
  min-height: calc(100vh - 108px);
  margin-top: 40px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--blue);
  border-radius: 8px;
  background: rgba(250, 253, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 36px 36px 46px;
}

.panel-title {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 24px;
  text-align: center;
}

.panel-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.panel-title h1 {
  margin: 0;
  color: var(--blue);
  font-size: 29px;
  line-height: 1.2;
  font-weight: 850;
}

.panel-title span {
  width: 86px;
  height: 2px;
  border-radius: 999px;
  background: var(--blue);
}

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

.process-grid article {
  min-height: 120px;
  border: 1px solid #8bdcff;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(242, 251, 255, 0.72));
  padding: 18px 16px;
  text-align: center;
}

.process-grid i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #fff;
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
  box-shadow: 0 10px 20px rgba(14, 165, 233, 0.18);
}

.process-grid h2 {
  margin: 0 0 7px;
  font-size: 16px;
}

.process-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(560px, 100%);
  list-style: none;
  margin: 0 auto 22px;
  padding: 0;
  gap: 10px;
}

.steps::before {
  position: absolute;
  top: 13px;
  left: 18%;
  right: 18%;
  height: 2px;
  background: var(--line-soft);
  content: "";
}

.step {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #8ba0af;
  font-size: 12px;
  font-weight: 750;
}

.step strong {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: #7d91a1;
  font-size: 13px;
}

.step.active,
.step.done {
  color: var(--blue-deep);
}

.step.active strong,
.step.done strong {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.workbox {
  width: min(820px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 252, 255, 0.9));
  box-shadow: 0 18px 48px rgba(12, 99, 145, 0.09);
  padding: 34px 44px 36px;
}

.flow-form,
.flow-screen {
  display: grid;
  gap: 18px;
}

.flow-form {
  width: 100%;
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

.section-heading {
  display: grid;
  gap: 5px;
}

.section-heading p {
  margin: 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
}

.field {
  display: grid;
  gap: 9px;
}

.field > span {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid #9bdfff;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

input {
  height: 52px;
  padding: 0 17px;
  font-size: 16px;
}

textarea {
  min-height: 188px;
  resize: vertical;
  padding: 15px 16px;
  line-height: 1.55;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.note-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.note-box article,
.guide-box,
.code-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 16px;
}

.note-box h2,
.guide-box h2 {
  margin: 0 0 8px;
  color: var(--blue-deep);
  font-size: 15px;
  font-weight: 800;
}

.note-box p,
.guide-box p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.note-box .danger {
  color: var(--red);
  font-weight: 700;
}

.code-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.code-card span {
  color: var(--muted);
  font-size: 13px;
}

.code-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 800;
}

.code-card em {
  font-style: normal;
}

.code-badges {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.code-badges b {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.08);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 800;
}

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

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  padding: 0 18px;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.primary {
  background: linear-gradient(135deg, var(--blue), #316bff);
  color: #fff;
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.2);
}

.primary:hover {
  filter: brightness(0.98);
}

.secondary,
.ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--blue-deep);
}

.secondary:hover,
.ghost:hover {
  background: #fff;
}

.full {
  width: 100%;
}

.oid-preview {
  display: grid;
  grid-template-columns: 130px 1fr;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.oid-sidebar {
  display: grid;
  align-content: start;
  gap: 8px;
  background: #f0f9ff;
  padding: 14px;
}

.oid-sidebar b,
.oid-content b {
  font-size: 14px;
}

.oid-sidebar i {
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  padding: 6px 7px;
}

.oid-sidebar .selected {
  background: #dff4ff;
  color: var(--ink);
}

.oid-content {
  padding: 20px;
}

.oid-content p {
  margin: 30px 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.oid-line {
  width: min(230px, 100%);
  border: 1px solid #ff6b6b;
  border-radius: 4px;
  background: #fff7f7;
  color: var(--muted);
  font-size: 12px;
  padding: 7px 9px;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 16px auto 0;
  border-radius: 50%;
  background: var(--green);
}

.success-mark::before {
  width: 27px;
  height: 14px;
  border-bottom: 5px solid #fff;
  border-left: 5px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
  content: "";
}

.success-title {
  margin: 18px 0 14px;
  color: var(--blue);
  text-align: center;
  font-size: 34px;
}

.success-account {
  width: min(470px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
  text-align: center;
}

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

.success-account strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 17px;
}

.success-copy {
  width: min(460px, 100%);
  margin: 18px auto 24px;
  color: var(--muted);
  line-height: 1.75;
  text-align: center;
}

.quickbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(250, 253, 255, 0.94);
  padding: 18px 24px;
}

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

.quickbar div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.ghost {
  min-height: 40px;
  font-size: 14px;
  padding: 0 18px;
}

.query-page {
  min-height: 100vh;
  background: linear-gradient(110deg, #f4efff 0%, #eef7ff 100%);
}

.query-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 60px;
  border-bottom: 1px solid rgba(130, 143, 180, 0.18);
  background: rgba(255, 255, 255, 0.72);
  padding: 0 24px;
}

.query-topbar h1 {
  margin: 0;
  color: #0b143d;
  font-size: 16px;
  font-weight: 850;
}

.query-lang {
  justify-self: end;
  color: #9aa6bd;
  font-size: 13px;
  font-weight: 800;
}

.query-lang i {
  display: inline-block;
  width: 1px;
  height: 12px;
  margin: 0 10px;
  vertical-align: -2px;
  background: #d9deea;
}

.back-button {
  justify-self: start;
  min-height: 34px;
  border: 1px solid #cbd4ff;
  border-radius: 8px;
  background: #f2f4ff;
  color: #5865e8;
  font-size: 14px;
  padding: 0 18px;
}

.query-shell {
  display: grid;
  justify-items: center;
  gap: 28px;
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.query-shell > h2 {
  margin: 0;
  color: #0b143d;
  font-size: 30px;
  font-weight: 900;
}

.query-card,
.query-result-card {
  width: min(720px, 100%);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(80, 83, 160, 0.1);
}

.query-card {
  display: grid;
  gap: 26px;
  padding: 48px;
}

.query-card textarea {
  min-height: 200px;
  border-color: #7c83ff;
  background: #fbfcff;
}

.query-card textarea:focus {
  border-color: #6c63ff;
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.13);
}

.query-primary {
  width: 100%;
  background: linear-gradient(135deg, #5f63f2, #8d4ff2);
  color: #fff;
  box-shadow: 0 14px 26px rgba(104, 91, 240, 0.24);
}

.query-result-card {
  padding: 42px 48px;
}

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

.result-head h3 {
  margin: 0;
  color: #0b143d;
  font-size: 16px;
  font-weight: 850;
}

.result-head span {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 24px;
  border-radius: 999px;
  background: #eef1ff;
  color: #8990bf;
  font-size: 13px;
  font-weight: 800;
  padding: 0 10px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #dbe2f2;
  border-radius: 8px;
}

.result-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  color: #0b143d;
  font-size: 14px;
}

.result-table th,
.result-table td {
  border-bottom: 1px solid #dbe2f2;
  padding: 13px 14px;
  text-align: left;
  vertical-align: middle;
}

.result-table tr:last-child td {
  border-bottom: 0;
}

.result-table th {
  color: #52667f;
  background: #f8faff;
  font-weight: 850;
}

.result-table td {
  overflow-wrap: anywhere;
}

.card-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  padding: 4px 9px;
  white-space: nowrap;
}

.card-status.unused {
  background: #dcfce7;
  color: #168246;
}

.card-status.used {
  background: #fef3c7;
  color: #b56a00;
}

.card-status.expired,
.card-status.missing {
  background: #fee2e2;
  color: #c8233d;
}

.query-footer {
  color: #93a1bd;
  text-align: center;
  font-size: 12px;
  padding: 0 16px 22px;
}

.footer {
  width: min(1160px, calc(100% - 40px));
  margin: 36px auto 0;
  color: #8ba0af;
  text-align: center;
  font-size: 12px;
  line-height: 1.8;
  padding-bottom: 26px;
}

.footer p {
  margin: 0;
}

.state {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
}

.state.processing {
  background: #eef7ff;
  color: var(--blue-deep);
}

.state.success {
  background: #eaf7ef;
  color: var(--green);
}

.state.failed {
  background: #fff0f1;
  color: var(--red);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(13, 34, 49, 0.42);
  padding: 18px;
}

.loading-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(245, 250, 255, 0.76);
  backdrop-filter: blur(10px);
  padding: 20px;
}

.loading-panel {
  display: grid;
  justify-items: center;
  width: min(360px, 100%);
  border: 1px solid rgba(58, 174, 246, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(17, 61, 92, 0.18);
  padding: 34px 30px 32px;
  text-align: center;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #dff2ff;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.82s linear infinite;
}

.loading-panel h2 {
  margin: 18px 0 8px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.loading-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.loading-progress {
  width: 100%;
  height: 8px;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7f4fd;
}

.loading-progress span {
  display: block;
  width: 5%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #10a7e8, #3279ff);
  transition: width 0.35s ease;
}

.loading-percent {
  margin-top: 8px;
  color: var(--blue);
  font-size: 13px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.modal {
  position: relative;
  width: min(520px, 100%);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  padding: 24px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 28px;
  width: 28px;
  border: 0;
  background: transparent;
  color: #7d91a1;
  font-size: 24px;
  line-height: 1;
  padding: 0;
  box-shadow: none;
}

.modal h2 {
  margin: 0 34px 16px 0;
  font-size: 20px;
  font-weight: 800;
}

.confirm-details p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

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

.detail-list div {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid #e8eef3;
  padding-bottom: 10px;
}

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

.detail-list dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 800;
}

.warning-line {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.warning-line span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--amber);
  color: #fff;
  font-weight: 900;
}

.warning-line p {
  margin: 0;
}

.failure-block {
  display: grid;
  gap: 10px;
}

.failure-block strong {
  color: var(--red);
}

.failure-block p {
  margin: 0;
}

.modal-actions {
  margin-top: 18px;
}

.modal-actions.single {
  grid-template-columns: 1fr;
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    padding: 0 16px;
  }

  .topnav {
    justify-content: center;
    gap: 8px;
  }

  .topnav span {
    min-height: 36px;
    padding: 0 10px;
  }

  .service-pill {
    display: none;
  }

  .panel,
  .quickbar,
  .footer {
    width: min(100% - 24px, 1160px);
  }

  .panel {
    margin-top: 24px;
    padding: 30px 18px 32px;
  }

  .panel-title h1 {
    font-size: 26px;
  }

  .process-grid,
  .note-box {
    grid-template-columns: 1fr;
  }

  .process-grid article {
    min-height: auto;
  }

  .steps {
    gap: 6px;
  }

  .code-card,
  .oid-preview,
  .form-actions,
  .modal-actions,
  .detail-list div,
  .quickbar {
    grid-template-columns: 1fr;
  }

  .workbox {
    padding: 24px 16px;
  }

  .quickbar {
    display: grid;
  }

  .quickbar div {
    justify-content: stretch;
  }

  .ghost {
    flex: 1;
  }

  .query-card,
  .query-result-card {
    padding: 28px 18px;
  }

  .query-topbar {
    padding: 0 14px;
  }
}
