/* ============================================================
   商户费率开通 · 视觉系统
   浅色 / 天蓝主色 / 毛玻璃 / 线性 SVG 图标
   ============================================================ */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

  --ink: #16324f;
  --ink-2: #3d5a78;
  --ink-3: #5d7896;

  --sky-100: #e4f4ff;
  --sky-200: #c9e9ff;
  --sky-400: #5ab9f5;
  --sky-500: #2f9fe8;
  --sky-600: #1a7fc5;
  --sky-700: #0f5f97;

  --line: rgba(126, 190, 238, 0.45);
  --radius-card: 16px;
  --radius-inner: 14px;
  --radius-control: 12px;

  --shadow-card: 0 20px 46px -24px rgba(31, 122, 188, 0.42), 0 2px 8px rgba(31, 122, 188, 0.05);
  --shadow-focus: 0 0 0 3.5px rgba(84, 178, 238, 0.2);
  --ease: cubic-bezier(0.2, 0.8, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  background: linear-gradient(165deg, #f7fcff 0%, #e9f6ff 48%, #f2fbff 100%);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}

h1, h2, h3, p, figure, dl, dd, ol, ul {
  margin: 0;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid rgba(47, 159, 232, 0.6);
  outline-offset: 2px;
  border-radius: 6px;
}

button,
input,
select {
  font-family: inherit;
}

::selection {
  background: rgba(122, 199, 245, 0.38);
  color: var(--ink);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(106, 180, 235, 0.4) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(106, 180, 235, 0.36);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(78, 160, 220, 0.55);
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 15px;
  height: 15px;
  stroke-width: 1.7;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.is-hidden {
  display: none !important;
}

/* ---------- 背景 ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
}

.orb-a {
  width: 540px;
  height: 440px;
  left: -150px;
  top: -130px;
  background: radial-gradient(circle at 45% 45%, #a9dcff, rgba(169, 220, 255, 0) 70%);
  opacity: 0.6;
}

.orb-b {
  width: 580px;
  height: 500px;
  right: -180px;
  top: 40px;
  background: radial-gradient(circle at 50% 50%, #bde4ff, rgba(189, 228, 255, 0) 70%);
  opacity: 0.55;
}

.orb-c {
  width: 620px;
  height: 520px;
  left: 34%;
  bottom: -300px;
  background: radial-gradient(circle at 50% 50%, #d6efff, rgba(214, 239, 255, 0) 70%);
  opacity: 0.5;
}

/* ---------- 顶部导航 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 251, 255, 0.62);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border-bottom: 1px solid rgba(150, 205, 245, 0.35);
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  height: 68px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(150deg, #6fc8f6, #2f9fe8 55%, #1a7fc5);
  box-shadow: 0 7px 16px -7px rgba(35, 132, 199, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand-mark .icon {
  width: 21px;
  height: 21px;
  stroke-width: 1.7;
}

.brand-name {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

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

.topbar-link,
.link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: none;
  font-size: 12.5px;
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.topbar-link:hover,
.link-button:hover {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(170, 215, 245, 0.5);
}

.link-button {
  color: var(--ink-3);
}

.inline-form {
  display: inline-block;
  margin: 0;
}

/* ---------- 页面骨架 ---------- */

.page {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 36px 32px 48px;
}

.page-head {
  max-width: 780px;
  margin-bottom: 26px;
}

.page-head h1 {
  font-size: 27px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.page-head p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-3);
  max-width: 66ch;
}

.card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.56));
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), var(--shadow-card);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.card-head h2 {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.head-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}

.head-link {
  font-size: 12px;
  color: var(--sky-600);
  text-decoration: none;
}

.head-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 表单 ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

.optional {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-3);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
  color: #5e7a96;
  opacity: 1;
}

input[type="text"]:hover,
input[type="password"]:hover {
  border-color: rgba(96, 175, 232, 0.6);
  background: rgba(255, 255, 255, 0.7);
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: #54b2ee;
  background: #fff;
  box-shadow: var(--shadow-focus);
}

input.is-invalid {
  border-color: rgba(212, 88, 110, 0.6);
  background: rgba(255, 246, 248, 0.78);
}

input.is-invalid:focus {
  box-shadow: 0 0 0 3.5px rgba(212, 88, 110, 0.16);
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid #6a8aa6;
  border-bottom: 1.6px solid #6a8aa6;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

select {
  width: 100%;
  height: 46px;
  padding: 0 36px 0 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

select:hover {
  border-color: rgba(96, 175, 232, 0.6);
  background: rgba(255, 255, 255, 0.7);
}

select:focus {
  outline: none;
  border-color: #54b2ee;
  background: #fff;
  box-shadow: var(--shadow-focus);
}

select:disabled {
  color: #7e97ad;
  cursor: not-allowed;
}

select option {
  background: #fff;
  color: var(--ink);
}

.input-affix {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 12px 0 13px;
  border-radius: var(--radius-control);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.input-affix:focus-within {
  border-color: #54b2ee;
  background: #fff;
  box-shadow: var(--shadow-focus);
}

.input-affix .affix {
  font-size: 14px;
  color: #4f7ea3;
}

.input-affix input[type="text"] {
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.input-affix input[type="text"]:hover,
.input-affix input[type="text"]:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.affix-unit {
  font-size: 12px;
  color: var(--ink-3);
  padding-left: 2px;
}

.field-hint,
.form-hint {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

.form-hint {
  margin-top: 10px;
}

.field-error {
  font-size: 12px;
  line-height: 1.5;
  color: #b94a60;
}

/* ---------- 按钮 ---------- */

.btn-primary {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-control);
  border: 1px solid rgba(24, 116, 172, 0.9);
  background: linear-gradient(135deg, #1d85c8, #0f62a3);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 12px 24px -12px rgba(23, 120, 190, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.16s, box-shadow 0.2s, filter 0.2s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px -12px rgba(23, 120, 190, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px -12px rgba(23, 120, 190, 0.7);
}

.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3.5px rgba(84, 178, 238, 0.32), 0 12px 24px -12px rgba(23, 120, 190, 0.7);
}

.btn-primary:disabled {
  cursor: progress;
  filter: saturate(0.85);
}

.btn-icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  animation: spin 0.72s linear infinite;
}

.is-loading .spinner {
  display: block;
}

.is-loading .btn-icon {
  display: none;
}

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

.btn-ghost {
  width: 100%;
  height: 44px;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--radius-control);
  border: 1px solid rgba(150, 205, 240, 0.55);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.16s;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(110, 185, 235, 0.7);
  transform: translateY(-1px);
}

.btn-ghost:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3.5px rgba(84, 178, 238, 0.28);
}

.btn-inline {
  width: auto;
  height: 40px;
  margin-top: 0;
  padding: 0 16px;
}

/* ---------- 公告条 ---------- */

.notice {
  display: flex;
  gap: 12px;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: var(--radius-inner);
  background: linear-gradient(135deg, rgba(236, 248, 255, 0.88), rgba(255, 255, 255, 0.55));
  border: 1px solid rgba(150, 210, 248, 0.55);
}

.notice-icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(160, 215, 245, 0.5);
  color: #3c94cc;
}

.notice-icon .icon {
  width: 18px;
  height: 18px;
}

.notice h3 {
  margin-bottom: 4px;
  font-size: 13.5px;
  font-weight: 600;
}

.notice p {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-3);
}

.notice.is-error {
  background: linear-gradient(135deg, rgba(255, 241, 244, 0.9), rgba(255, 255, 255, 0.6));
  border-color: rgba(226, 158, 174, 0.55);
}

.notice.is-error .notice-icon {
  color: #b94a60;
  border-color: rgba(230, 176, 190, 0.55);
}

.notice.is-success {
  background: linear-gradient(135deg, rgba(235, 251, 245, 0.9), rgba(255, 255, 255, 0.6));
  border-color: rgba(140, 214, 188, 0.55);
}

.notice.is-success .notice-icon {
  color: #1f9d7a;
  border-color: rgba(150, 218, 196, 0.55);
}

/* ---------- 前台布局 ---------- */

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

.flow-main {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.side-column {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 24px;
  min-width: 0;
}

.side-column > * {
  min-width: 0;
}

.step-card {
  scroll-margin-top: 92px;
}

.product-list {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.product-option {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-inner);
  border: 1px solid rgba(160, 210, 245, 0.45);
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.22s, transform 0.18s;
}

.product-option:hover {
  border-color: rgba(110, 190, 240, 0.65);
  background: rgba(255, 255, 255, 0.62);
  transform: translateY(-1px);
}

.product-option:has(input:checked) {
  border-color: rgba(58, 169, 236, 0.75);
  background: linear-gradient(135deg, rgba(226, 246, 255, 0.9), rgba(255, 255, 255, 0.62));
  box-shadow: 0 14px 30px -24px rgba(24, 120, 190, 0.65);
}

.product-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.product-option input:focus-visible + .radio-mark {
  box-shadow: 0 0 0 3.5px rgba(84, 178, 238, 0.28);
}

.radio-mark {
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 3px;
  border-radius: 50%;
  border: 1.5px solid rgba(110, 175, 220, 0.7);
  background: #fff;
}

.radio-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--sky-500);
  transform: scale(0);
  transition: transform 0.16s var(--ease);
}

.product-option input:checked + .radio-mark {
  border-color: var(--sky-500);
}

.product-option input:checked + .radio-mark::after {
  transform: scale(1);
}

.product-body {
  display: grid;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

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

.product-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.product-price {
  font-size: 17px;
  font-weight: 600;
  color: var(--sky-700);
  white-space: nowrap;
}

.product-desc {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.6;
}

.product-meta {
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

#bindForm {
  display: grid;
  gap: 16px;
}

#bindForm .btn-primary {
  margin-top: 4px;
}

.order-note {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-control);
  background: rgba(230, 246, 255, 0.7);
  border: 1px solid rgba(150, 210, 245, 0.5);
}

.order-note-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.order-note-label {
  font-size: 11.5px;
  color: var(--ink-3);
}

.order-note-main strong {
  font-size: 14px;
  letter-spacing: 0.02em;
}

.order-note-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-3);
}

.summary-list {
  display: grid;
}

.summary-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid rgba(190, 225, 248, 0.42);
  font-size: 12.5px;
}

.summary-list > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.summary-list dt {
  color: var(--ink-3);
  flex: none;
}

.summary-list dd {
  text-align: right;
  color: var(--ink-2);
  font-weight: 500;
  word-break: break-all;
}

.guide-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 16px;
}

.guide-list li {
  display: flex;
  gap: 12px;
}

.guide-index {
  width: 24px;
  height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(130, 200, 245, 0.55);
  background: rgba(220, 242, 255, 0.9);
  color: #1779b8;
  font-size: 11.5px;
  font-weight: 600;
}

.guide-list strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.guide-list p {
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* ---------- 办理结果 ---------- */

.result-hero {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.result-mark {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(211, 243, 255, 0.95), rgba(255, 255, 255, 0.7));
  border: 1px solid rgba(120, 200, 245, 0.6);
  color: #1c8ec9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.result-mark .icon {
  width: 22px;
  height: 22px;
}

.result-hero h3 {
  font-size: 16px;
  font-weight: 600;
}

.result-hero p {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.result-hero strong {
  color: var(--ink-2);
  font-weight: 600;
}

.change-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 20px;
}

.group-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(170, 215, 245, 0.45);
}

.group-box.is-target {
  background: linear-gradient(135deg, rgba(224, 245, 255, 0.85), rgba(255, 255, 255, 0.55));
  border-color: rgba(120, 195, 240, 0.6);
}

.group-label {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.group-tag {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-all;
}

.group-tag.is-empty {
  color: var(--ink-3);
  font-weight: 500;
}

.group-box small {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-3);
}

.change-arrow {
  align-self: center;
  width: 22px;
  display: grid;
  place-items: center;
  color: #7fb3d6;
}

.change-arrow .icon {
  width: 18px;
  height: 18px;
}

.result-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  margin-bottom: 14px;
}

.result-meta > div {
  display: flex;
  gap: 6px;
  font-size: 12.5px;
}

.result-meta dt {
  flex: none;
  color: var(--ink-3);
}

.result-meta dd {
  color: var(--ink-2);
  word-break: break-all;
}

.result-note {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(150, 205, 242, 0.5);
  background: rgba(236, 248, 255, 0.6);
  font-size: 11.5px;
  color: var(--ink-3);
}

.result-card {
  scroll-margin-top: 92px;
}

.result-card .btn-ghost {
  margin-top: 0;
}

/* ---------- 状态徽章 ---------- */

.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.state-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}

.state-pill.is-live {
  color: #1779b8;
  background: rgba(214, 240, 255, 0.82);
  border: 1px solid rgba(130, 200, 245, 0.5);
}

.state-pill.is-idle {
  color: #5c7590;
  background: rgba(236, 243, 249, 0.88);
  border: 1px solid rgba(170, 200, 225, 0.45);
}

.state-pill.is-warn {
  color: #97651f;
  background: rgba(253, 246, 233, 0.92);
  border: 1px solid rgba(226, 199, 148, 0.55);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-success {
  color: #15795f;
  background: rgba(222, 246, 238, 0.9);
  border: 1px solid rgba(120, 205, 180, 0.45);
}

.status-pending {
  color: #4c6784;
  background: rgba(232, 241, 250, 0.9);
  border: 1px solid rgba(160, 190, 218, 0.45);
}

.status-failed {
  color: #a8485d;
  background: rgba(253, 238, 242, 0.9);
  border: 1px solid rgba(226, 170, 185, 0.45);
}

.status-muted {
  color: #526b83;
  background: rgba(240, 245, 250, 0.9);
  border: 1px solid rgba(175, 200, 220, 0.45);
}

/* ---------- 表格 ---------- */

.table-scroll {
  margin: 0 -2px;
  overflow: auto;
  border: 1px solid rgba(180, 220, 245, 0.42);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.34);
}

.table-scroll.is-tall {
  max-height: 520px;
}

.data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}

.orders-table {
  min-width: 1060px;
}

.orders-table th,
.orders-table td {
  white-space: nowrap;
}

.orders-table .cell-sub {
  white-space: nowrap;
}

.orders-table .cell-note {
  white-space: normal;
}

.product-list-card .data-table {
  min-width: 760px;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 14px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-align: left;
  white-space: nowrap;
  color: var(--ink-3);
  background: rgba(240, 250, 255, 0.93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(165, 210, 240, 0.5);
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(195, 228, 248, 0.38);
  color: var(--ink-2);
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.16s;
}

.data-table tbody tr:hover td {
  background: rgba(224, 243, 255, 0.42);
}

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

.cell-strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
}

.cell-sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-3);
  white-space: normal;
}

.cell-id {
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.cell-note {
  max-width: 220px;
  white-space: normal;
  font-size: 11.5px;
  color: var(--ink-3);
}

.cell-actions {
  white-space: nowrap;
}

.text-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--sky-600);
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link.danger {
  margin-left: 10px;
  color: #b94a60;
}

.ta-right {
  text-align: right !important;
}

.num {
  font-variant-numeric: tabular-nums;
}

.muted {
  color: #8ba3b7;
}

/* ---------- 空态 ---------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 38px 24px 42px;
  text-align: center;
}

.empty-state.is-compact {
  padding: 22px 18px 24px;
}

.empty-art {
  width: 220px;
  max-width: 62%;
  height: auto;
  margin-bottom: 10px;
}

.empty-state.is-compact .empty-art {
  width: 180px;
  max-width: 56%;
  margin-bottom: 6px;
}

.empty-state h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.empty-state p {
  margin-top: 7px;
  max-width: 38ch;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

.page-foot {
  margin-top: 26px;
  font-size: 11.5px;
  text-align: center;
  color: var(--ink-3);
}

/* ---------- 后台 ---------- */

.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  max-width: none;
}

.admin-layout {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.admin-layout > *,
.orders-card {
  min-width: 0;
}

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

.product-form-card .btn-primary {
  margin-top: 4px;
}

.orders-card {
  margin-top: 0;
}

.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 32px;
}

.auth-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(150deg, #6fc8f6, #2f9fe8 55%, #1a7fc5);
  box-shadow: 0 8px 18px -8px rgba(35, 132, 199, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.auth-mark .icon {
  width: 21px;
  height: 21px;
}

.auth-card h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.auth-card > p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-3);
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.auth-form .btn-primary {
  margin-top: 6px;
}

.auth-back {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  text-align: center;
  color: var(--ink-3);
  text-decoration: none;
}

.auth-back:hover {
  color: var(--sky-600);
}

.auth-card .notice {
  margin-top: 18px;
  margin-bottom: 0;
  padding: 12px;
}

/* ---------- 轻提示 ---------- */

.toast-region {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(370px, calc(100vw - 48px));
  padding: 12px 16px;
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(170, 215, 245, 0.65);
  box-shadow: 0 18px 38px -20px rgba(28, 115, 180, 0.55);
  font-size: 13px;
  color: var(--ink-2);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s var(--ease);
}

.toast.is-in {
  opacity: 1;
  transform: none;
}

.toast .icon {
  width: 18px;
  height: 18px;
}

.toast-success .icon { color: #1f9d7a; }
.toast-info .icon { color: #2f9fe8; }
.toast-warn .icon { color: #b07a2f; }
.toast-error .icon { color: #b94a60; }

/* ---------- 响应式 ---------- */

@media (max-width: 1120px) {
  .flow-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .admin-layout {
    grid-template-columns: 340px minmax(0, 1fr);
  }
}

@media (max-width: 1000px) {
  .flow-layout {
    grid-template-columns: 1fr;
  }

  .side-column {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

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

  .product-form-card form {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .product-form-card form > .field:first-of-type,
  .product-form-card form > .field:last-of-type,
  .product-form-card form > .btn-primary,
  .product-form-card form > .field-row {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    height: 62px;
    padding: 0 18px;
  }

  .page {
    padding: 26px 18px 40px;
  }

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

  .page-head p {
    font-size: 13px;
  }

  .card {
    padding: 20px;
  }

  .admin-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .side-column {
    grid-template-columns: 1fr;
  }

  .change-row {
    grid-template-columns: 1fr;
  }

  .change-arrow {
    width: auto;
    height: 18px;
    transform: rotate(90deg);
    justify-self: center;
  }

  .result-meta {
    grid-template-columns: 1fr;
  }

  .table-scroll {
    margin: 0 -8px;
  }

  .toast-region {
    left: 18px;
    right: 18px;
    bottom: 18px;
    align-items: stretch;
  }

  .toast {
    max-width: none;
  }
}

@media (max-width: 600px) {
  .brand-name {
    font-size: 15px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .product-form-card form {
    grid-template-columns: 1fr;
  }

  .product-option {
    padding: 15px;
    gap: 11px;
  }

  .product-price {
    font-size: 15.5px;
  }

  .product-head {
    gap: 8px;
  }

  .auth-card {
    padding: 24px;
  }

  .topbar-nav .topbar-link {
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
