:root {
  --primary: #6c5ce7;
  --primary-hover: #5948d8;
  --primary-soft: #f0edff;
  --blue: #4d8ef7;
  --blue-soft: #edf4ff;
  --green: #27a67a;
  --green-soft: #eaf8f2;
  --amber: #d58a18;
  --amber-soft: #fff6df;
  --red: #dc4c64;
  --red-soft: #fff0f2;
  --ink: #252632;
  --muted: #7a7d8c;
  --line: #e8e9f0;
  --surface: #ffffff;
  --surface-soft: #f8f9fc;
  --canvas: #f4f6fa;
  --shadow: 0 12px 32px rgba(42, 44, 61, .1);
  font-family: Inter, "Microsoft YaHei UI", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

:root.dark {
  color-scheme: dark;
  --primary: #8d7cf4;
  --primary-hover: #a394ff;
  --primary-soft: #292442;
  --blue-soft: #1c2b42;
  --green-soft: #17352d;
  --amber-soft: #3c301d;
  --red-soft: #3a2028;
  --ink: #e7e8ef;
  --muted: #a6a9b6;
  --line: #353741;
  --surface: #1c1d23;
  --surface-soft: #24262e;
  --canvas: #14151a;
  --shadow: 0 14px 38px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .68; }
img { display: block; }
:root.dark img[src*="/assets/icons/"] { filter: invert(1) brightness(.9); }
[hidden] { display: none !important; }

.eyebrow { margin: 0; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
.primary, .secondary, .text-button, .copy-row button { min-height: 40px; border: 1px solid transparent; border-radius: 6px; padding: 0 16px; font-weight: 700; transition: .18s ease; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: #fff; background: var(--primary); box-shadow: 0 7px 16px rgba(108, 92, 231, .2); }
.primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.secondary { color: var(--ink); background: var(--surface); border-color: var(--line); }
.secondary:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.wide { width: 100%; min-height: 44px; }
.icon-text { display: inline-flex; align-items: center; gap: 7px; }
.icon-text img, .copy-row button img { width: 17px; height: 17px; }
.text-button { color: var(--muted); background: transparent; padding: 0 4px; }
.text-button:hover { color: var(--primary); }
.theme-switch, .icon-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--surface); }
.theme-switch:hover, .icon-button:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.theme-switch span { font-size: 20px; line-height: 1; transform: rotate(-25deg); }

/* Account */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns:minmax(560px, 1.65fr) minmax(420px, .82fr); background: var(--surface); }
.auth-visual { position: relative; min-height: 680px; overflow: hidden; padding: 34px clamp(38px, 5vw, 82px); color: #2e3150; background: linear-gradient(135deg, #edf5ff 0%, #f4eeff 48%, #e7f8f4 100%); }
.auth-visual::before { content: ""; position: absolute; inset: 0; opacity: .38; background-image: linear-gradient(rgba(102, 91, 194, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(102, 91, 194, .12) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(to bottom right, #000, transparent 74%); }
.auth-visual::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: 7%; height: 18%; background: rgba(255, 255, 255, .36); border: 1px solid rgba(255, 255, 255, .66); border-radius: 8px; transform: skewX(-12deg); }
.auth-brandline { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.auth-brandline > img { width: 46px; height: 46px; border-radius: 8px; box-shadow: 0 8px 20px rgba(76, 70, 146, .18); }
.auth-brandline > span { display: grid; gap: 2px; }
.auth-brandline b { font-size: 17px; }
.auth-brandline small { color: #737692; font-size: 11px; }
.auth-copy { position: relative; z-index: 2; width: min(540px, 58%); margin-top: clamp(70px, 11vh, 125px); }
.auth-copy h1 { margin: 12px 0 20px; font-size: clamp(40px, 3.8vw, 54px); line-height: 1.14; letter-spacing: 0; }
.auth-copy > p:not(.eyebrow) { max-width: 410px; margin: 0; color: #686c89; font-size: 16px; line-height: 1.9; }
.trust-list { max-width: 430px; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.trust-list span { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid rgba(105, 97, 172, .16); border-radius: 6px; color: #555a78; background: rgba(255, 255, 255, .6); font-size: 13px; font-weight: 700; backdrop-filter: blur(8px); }
.trust-list img { width: 17px; height: 17px; }
.auth-illustration { position: absolute; z-index: 1; right: 2%; bottom: clamp(58px, 8vh, 92px); width: min(44%, 520px); height: auto; filter: drop-shadow(0 26px 34px rgba(62, 83, 172, .16)); }
.visual-caption { position: absolute; z-index: 3; left: clamp(38px, 5vw, 82px); bottom: 34px; display: flex; align-items: center; gap: 8px; color: #646982; font-size: 12px; }
.visual-caption span { width: 8px; height: 8px; border-radius: 50%; background: #2ebd85; box-shadow: 0 0 0 4px rgba(46, 189, 133, .13); }
.auth-panel { position: relative; display: flex; min-height: 680px; flex-direction: column; justify-content: center; padding: 70px clamp(42px, 5vw, 86px); background: var(--surface); }
.auth-theme { position: absolute; top: 28px; right: 30px; }
.auth-form-wrap { width: min(100%, 420px); margin: auto; }
.auth-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.tab { position: relative; border: 0; background: transparent; padding: 12px 2px 14px; color: var(--muted); font-weight: 700; }
.tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; }
.tab.active { color: var(--primary); }
.tab.active::after { background: var(--primary); }
.form-stack { display: grid; gap: 18px; width: 100%; }
.form-stack header { margin-bottom: 3px; }
.form-stack header h2, .dialog-body h2 { margin: 0 0 8px; font-size: 27px; letter-spacing: 0; }
.form-stack header p, .dialog-body header p, .section-heading p { margin: 0; color: var(--muted); line-height: 1.65; }
label { display: grid; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 700; }
label small { color: var(--muted); font-weight: 400; line-height: 1.5; }
input, select, textarea { width: 100%; border: 1px solid #d9dbe5; border-radius: 6px; padding: 11px 13px; outline: 0; color: var(--ink); background: var(--surface); transition: .18s ease; }
:root.dark input, :root.dark select, :root.dark textarea { border-color: var(--line); }
input::placeholder, textarea::placeholder { color: #aaadba; }
input:hover, select:hover, textarea:hover { border-color: #b8b4d5; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108, 92, 231, .12); }
textarea { min-height: 86px; resize: vertical; }
.form-error { min-height: 19px; margin: -4px 0; color: var(--red); font-size: 13px; }
.auth-footer { position: absolute; bottom: 24px; left: 0; right: 0; margin: 0; text-align: center; color: var(--muted); font-size: 12px; }
.mobile-brand { display: none; }

/* Dashboard */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 230px; display: flex; flex-direction: column; padding: 0 12px 18px; border-right: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.sidebar-brand { height: 64px; display: flex; align-items: center; gap: 11px; padding: 0 9px; border-bottom: 1px solid var(--line); }
.sidebar-brand > img { width: 40px; height: 40px; border-radius: 8px; }
.sidebar-brand > span { display: grid; gap: 1px; }
.sidebar-brand b { font-size: 15px; }
.sidebar-brand small { color: var(--muted); font-size: 10px; }
.nav-label { margin: 24px 12px 9px; color: #a0a3b0; font-size: 11px; font-weight: 700; }
.sidebar nav { display: grid; gap: 5px; }
.nav-item { position: relative; min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 0 13px; border: 0; border-radius: 6px; color: #555865; background: transparent; text-decoration: none; font-size: 13px; font-weight: 600; }
:root.dark .nav-item { color: #c6c8d2; }
.nav-item img { width: 18px; height: 18px; opacity: .72; }
.nav-item i { margin-left: auto; color: var(--muted); font-style: normal; }
.nav-item:hover { color: var(--primary); background: var(--surface-soft); }
.nav-item.active { color: var(--primary); background: var(--primary-soft); }
.nav-item.active::before { content: ""; position: absolute; left: 0; width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--primary); }
.sidebar-note { display: flex; gap: 10px; margin-top: auto; padding: 14px 12px; border: 1px solid #dfeeed; border-radius: 8px; background: #f2fbf8; }
:root.dark .sidebar-note { border-color: #29473e; background: #192d28; }
.sidebar-note > img { width: 20px; height: 20px; flex: 0 0 auto; }
.sidebar-note b { color: var(--green); font-size: 12px; }
.sidebar-note p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; z-index: 20; top: 0; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); }
.topbar-left, .account { display: flex; align-items: center; gap: 10px; }
.breadcrumb { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.breadcrumb span, .breadcrumb i { color: var(--muted); font-style: normal; }
.breadcrumb b { font-weight: 600; }
.account { margin-left: auto; }
.account-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #7565e8, #4d8ef7); font-size: 11px; font-weight: 800; }
#accountName { font-size: 13px; font-weight: 700; }
.menu-button { display: none; }
.main-content { padding: 24px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-heading h1 { margin: 0 0 6px; font-size: 23px; letter-spacing: 0; }
.page-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card { min-height: 132px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.stat-card > div { display: grid; }
.stat-card span { color: var(--muted); font-size: 13px; }
.stat-card strong { margin: 8px 0 9px; font-size: 28px; line-height: 1; }
.stat-card small { color: var(--muted); font-size: 11px; }
.stat-icon { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; }
.stat-icon img { width: 22px; height: 22px; }
.stat-icon.blue { background: var(--blue-soft); }
.stat-icon.green { background: var(--green-soft); }
.stat-icon.amber { background: var(--amber-soft); }
.stat-icon.purple { background: var(--primary-soft); }

/* ---- 服务状态页 ---- */
.status-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); box-shadow: var(--shadow); margin-bottom: 16px;
}
.status-hero b { display: block; font-size: 16px; }
.status-hero small { color: var(--muted); }
.pulse-dot { position: relative; width: 12px; height: 12px; border-radius: 50%; background: var(--green); flex: none; }
.pulse-dot::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--green); opacity: .55; animation: statusPulse 1.8s ease-out infinite;
}
@keyframes statusPulse { 0% { transform: scale(.55); opacity: .65; } 100% { transform: scale(1.25); opacity: 0; } }
.status-grid strong { font-variant-numeric: tabular-nums; }
.status-rows { display: flex; flex-direction: column; }
.status-row {
  display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 12px;
  padding: 13px 4px; border-bottom: 1px dashed var(--line);
}
.status-row:last-child { border-bottom: none; }
.status-row > span:first-child { color: var(--muted); font-size: 13px; font-weight: 600; }
.status-row code {
  font-family: Consolas, "Courier New", monospace; font-size: 13px; color: var(--ink);
  background: var(--surface-soft); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px;
  word-break: break-all;
}
.status-row.tip code { color: var(--muted); font-family: inherit; background: none; border: none; padding: 0; }
.status-row .text-button { min-height: 30px; padding: 0 10px; }
@media (max-width: 640px) {
  .status-row { grid-template-columns: 96px 1fr; }
  .status-row .text-button { grid-column: 2; justify-self: start; }
}
.content-section { padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-heading h2 { margin: 0 0 4px; font-size: 17px; }
.section-heading p { font-size: 12px; }
.instance-table { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; }
.instance-table-head, .instance-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(260px, 2fr) 115px 135px 230px; align-items: center; gap: 16px; }
.instance-table-head { min-height: 44px; padding: 0 18px; color: var(--muted); background: var(--surface-soft); font-size: 12px; font-weight: 700; }
.instance-table-head span:last-child { text-align: right; }
.instance-row { min-height: 88px; padding: 15px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.instance-row:hover { background: color-mix(in srgb, var(--primary-soft) 32%, var(--surface)); }
.instance-name, .instance-url, .metric { min-width: 0; display: grid; gap: 5px; }
.instance-name b { overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.instance-name small, .instance-url small, .metric small { color: var(--muted); font-size: 11px; }
.instance-url code { overflow: hidden; padding: 7px 9px; border-radius: 5px; color: #555a68; background: var(--surface-soft); text-overflow: ellipsis; white-space: nowrap; font-family: Consolas, monospace; font-size: 11px; }
:root.dark .instance-url code { color: #c7cad4; }
.status { width: fit-content; display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.online { color: var(--green); background: var(--green-soft); }
.status.offline { color: var(--muted); background: var(--surface-soft); }
.metric b { font-size: 17px; }
.row-actions { display: flex; justify-content: flex-end; gap: 7px; }
.row-actions button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.row-actions button:hover { border-color: var(--primary); background: var(--primary-soft); }
.row-actions button.danger:hover { border-color: var(--red); background: var(--red-soft); }
.row-actions img { width: 16px; height: 16px; }
.empty-state { display: grid; justify-items: center; padding: 58px 20px; border: 1px dashed #cbc8dd; border-radius: 7px; background: var(--surface-soft); text-align: center; }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 15px; border-radius: 8px; background: var(--primary-soft); }
.empty-icon img { width: 24px; height: 24px; }
.empty-state h3 { margin: 0 0 7px; font-size: 16px; }
.empty-state p { max-width: 440px; margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.sidebar-mask { display: none; }

/* ---- 公开商店首页 ---- */
.shop-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--canvas); }
.shop-topbar { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 5vw, 48px); height: 68px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); }
.shop-brand { display: flex; align-items: center; gap: 11px; }
.shop-brand img { width: 40px; height: 40px; border-radius: 8px; }
.shop-brand span { display: grid; gap: 1px; }
.shop-brand b { font-size: 15px; }
.shop-brand small { color: var(--muted); font-size: 10px; }
.shop-topbar-actions { display: flex; align-items: center; gap: 10px; }
.shop-login { min-height: 38px; }
.shop-hero { position: relative; overflow: hidden; padding: clamp(52px, 9vh, 96px) clamp(20px, 5vw, 48px) clamp(42px, 6vh, 64px); background: linear-gradient(135deg, #edf5ff 0%, #f4eeff 52%, #e7f8f4 100%); }
:root.dark .shop-hero { background: linear-gradient(135deg, #1a2333 0%, #221f38 52%, #14261f 100%); }
.shop-hero-inner { max-width: 1160px; margin: 0 auto; }
.shop-hero-grid { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr); gap: clamp(30px, 5vw, 68px); align-items: center; }
.shop-hero h1 { margin: 12px 0 18px; font-size: clamp(34px, 4.6vw, 54px); line-height: 1.16; letter-spacing: -.5px; }
.shop-hero-copy { max-width: 560px; margin: 0 0 26px; color: var(--muted); font-size: 15.5px; line-height: 1.9; }
.shop-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.shop-hero-actions .primary, .shop-hero-actions .secondary { min-height: 46px; padding: 0 26px; font-size: 14.5px; }
.shop-hero-actions .primary { position: relative; overflow: hidden; }
.shop-hero-actions .primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, .35) 50%, transparent 68%); transform: translateX(-120%); animation: hero-shine 3.4s ease-in-out 1.2s infinite; }
@keyframes hero-shine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.shop-hero-tip { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; }
.shop-hero .trust-list { margin-top: 22px; }
/* 进场与滚动 reveal 动画 */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .8s cubic-bezier(.16, 1, .3, 1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
/* Hero 右侧视觉：光晕 + 悬浮卡片 */
.shop-hero-visual { position: relative; min-height: 380px; }
.hero-orb { position: absolute; display: block; border-radius: 50%; filter: blur(52px); opacity: .5; animation: orb-drift 11s ease-in-out infinite alternate; }
.hero-orb-1 { width: 290px; height: 290px; left: 4%; top: 2%; background: radial-gradient(circle at 32% 32%, #a78bfa, #6c5ce7 62%, transparent 100%); }
.hero-orb-2 { width: 250px; height: 250px; right: 0; bottom: 0; background: radial-gradient(circle at 58% 42%, #5eead4, #34d399 58%, transparent 100%); animation-delay: -5.5s; }
@keyframes orb-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(28px, -20px) scale(1.1); } }
.hero-illustration { position: relative; z-index: 1; width: min(540px, 96%); height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 26px 46px rgba(76, 29, 149, .24)); animation: card-float 7s ease-in-out infinite alternate; }
@keyframes card-float { from { transform: translateY(-9px); } to { transform: translateY(11px); } }
.shop-section { max-width: 1160px; width: 100%; margin: 0 auto; padding: clamp(30px, 6vh, 54px) clamp(20px, 5vw, 48px) 0; }
.shop-section h2 { margin: 0 0 8px; font-size: clamp(21px, 2.4vw, 27px); }
.shop-section-sub { margin: 0 0 26px; color: var(--muted); font-size: 13.5px; }
.shop-section .shop-section-sub + .shop-plans { margin-top: 0; }
.shop-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.shop-feature { display: grid; gap: 8px; align-content: start; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.shop-feature b { font-size: 14.5px; }
.shop-feature p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.shop-feature-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; background: var(--primary-soft); }
.shop-feature-icon img { width: 21px; height: 21px; }
.shop-plans { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.shop-plans-loading { padding: 40px 0; color: var(--muted); font-size: 13px; text-align: center; grid-column: 1 / -1; }
.shop-plan { position: relative; display: grid; gap: 6px; align-content: start; padding: 22px 18px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.shop-plan.featured { border-color: var(--primary); box-shadow: 0 14px 34px rgba(108, 92, 231, .22); }
.shop-plan-tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #7565e8, #4d8ef7); font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.shop-plan b { font-size: 16px; }
.shop-plan > small { color: var(--muted); font-size: 11.5px; }
.shop-plan-price { margin: 10px 0 14px; display: grid; gap: 2px; }
.shop-plan-price strong { font-size: 27px; color: var(--primary); }
.shop-plan-price span { color: var(--muted); font-size: 11px; }
.shop-closed { display: grid; gap: 5px; margin-top: 20px; padding: 15px 18px; border-left: 3px solid #e2a236; border-radius: 6px; color: var(--amber); background: var(--amber-soft); font-size: 13px; }
.shop-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.shop-step { display: grid; gap: 7px; align-content: start; padding: 18px; border: 1px dashed #cbc8dd; border-radius: 10px; background: var(--surface-soft); }
.shop-step i { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--primary); font-size: 12.5px; font-weight: 800; font-style: normal; }
.shop-step b { font-size: 13.5px; }
.shop-step p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.shop-faq details { padding: 13px 4px; border-bottom: 1px dashed var(--line); }
.shop-faq details:last-of-type { border-bottom: none; }
.shop-faq summary { cursor: pointer; font-weight: 700; font-size: 13.5px; }
.shop-faq details p { margin: 9px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.75; }
.shop-footer { margin-top: auto; padding: 30px clamp(20px, 5vw, 48px) 26px; color: var(--muted); font-size: 12px; text-align: center; }

/* 购买弹窗 */
.shop-buy-body { min-width: 0; }
.buy-plan-line { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 7px; background: var(--surface-soft); font-size: 14px; }
.buy-plan-line b { color: var(--primary); font-size: 16px; }
.buy-qty-row { display: grid; grid-template-columns: 44px 1fr 44px; gap: 8px; }
.buy-qty-row .secondary { padding: 0; font-size: 18px; }
.buy-channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.buy-channel { display: flex; align-items: center; gap: 9px; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; transition: .15s; }
.buy-channel:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.buy-channel input { width: auto; }
.buy-channel b { font-size: 13.5px; }
.buy-channel small { margin-left: auto; color: var(--muted); font-size: 11px; }
.buy-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.buy-total { color: var(--muted); font-size: 13px; }
.buy-total b { color: var(--primary); font-size: 19px; }
.buy-status-line { display: flex; align-items: center; justify-content: space-between; }
.buy-amount { font-size: 21px; font-weight: 800; color: var(--primary); }
.buy-qr-wrap { display: grid; justify-items: center; gap: 10px; padding: 14px 0 4px; }
.buy-qr { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.buy-qr img { width: 196px; height: 196px; }
.buy-qr-hint { margin: 0; color: var(--muted); font-size: 12.5px; }
.buy-order-line { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }
.buy-order-line code { color: var(--ink); background: var(--surface-soft); border-radius: 4px; padding: 3px 8px; }
.buy-countdown { margin: 0; color: var(--amber); font-size: 12px; text-align: center; }
/* 支付成功视图 */
.paid-hero { display: grid; justify-items: center; gap: 7px; padding: 8px 0 16px; text-align: center; }
.paid-check { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); animation: paid-pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.paid-check svg { width: 30px; height: 30px; fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@keyframes paid-pop { from { transform: scale(.35); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.paid-hero h3 { margin: 0; font-size: 21px; }
.paid-hero p { margin: 0; color: var(--muted); font-size: 13px; }
.paid-codes-label { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.paid-code-list { display: grid; gap: 8px; margin-bottom: 12px; }
.paid-code-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1.5px dashed color-mix(in srgb, var(--primary) 42%, transparent); border-radius: 9px; background: var(--primary-soft); }
.paid-code-row code { font-family: Consolas, "JetBrains Mono", monospace; font-size: 16.5px; font-weight: 700; letter-spacing: .4px; color: var(--ink); }
.paid-code-row .text-button { color: var(--primary); font-weight: 700; flex: 0 0 auto; }
.paid-code-row .text-button:hover { color: var(--primary-hover); }
.paid-steps { margin: 14px 0 10px; padding-left: 20px; color: var(--muted); font-size: 12.5px; line-height: 2; }
/* 查询订单弹窗 */
.query-history { display: grid; gap: 8px; margin-bottom: 14px; }
.query-history-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); cursor: pointer; transition: .18s ease; }
.query-history-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.query-history-item code { font-size: 13px; font-weight: 700; }
.query-history-item small { color: var(--muted); font-size: 11.5px; flex: 0 0 auto; }
.query-band { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; padding: 11px 14px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.query-band.ok { color: var(--green); background: var(--green-soft); }
.query-band.warn { color: var(--amber); background: var(--amber-soft); }
.query-band.err { color: var(--red); background: var(--red-soft); }
.query-tip { margin: 0 0 12px; color: var(--muted); font-size: 12.5px; }
.query-note { margin: 14px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
/* 查询方式切换 / 邮箱找回（v0.3.5） */
.query-mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); margin-bottom: 14px; }
.query-mode { padding: 9px 6px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; transition: .18s ease; }
.query-mode:hover { color: var(--ink); }
.query-mode.active { background: var(--surface); color: var(--primary); box-shadow: 0 1px 4px rgba(16, 18, 35, .08); }
.lookup-order { padding: 12px 0 4px; border-bottom: 1px dashed var(--line); }
.lookup-order:last-child { border-bottom: 0; }
.buy-field-hint { margin: 2px 0 10px; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.paid-mail-hint { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--green-soft); color: var(--green); font-size: 12.5px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-orb, .hero-illustration, .shop-hero-actions .primary::after { animation: none; }
}
.warning-band.success { border-left-color: var(--green); color: var(--green); background: var(--green-soft); }

/* ---- 售卡管理页（管理员） ---- */
.shop-switch { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; }
.shop-switch input { width: auto; accent-color: var(--primary); }
.shop-config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.shop-config-card { display: grid; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.shop-config-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.shop-config-card header b { font-size: 13.5px; }
.shop-prices { margin-top: 14px; }
.shop-prices > b { display: block; margin-bottom: 9px; font-size: 13px; }
.shop-prices-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.shop-price-item { font-size: 12px; }
.shop-config-footer { display: flex; justify-content: flex-end; padding-top: 4px; }
.shop-orders-table { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; }
.shop-orders-head, .shop-order-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(84px, .7fr) 92px 72px 84px minmax(170px, 1.2fr) minmax(120px, .9fr); align-items: center; gap: 12px; }
.shop-orders-head { min-height: 44px; padding: 0 18px; color: var(--muted); background: var(--surface-soft); font-size: 12px; font-weight: 700; }
.shop-order-row { min-height: 62px; padding: 11px 18px; border-top: 1px solid var(--line); background: var(--surface); font-size: 12.5px; }
.shop-order-row:hover { background: color-mix(in srgb, var(--primary-soft) 32%, var(--surface)); }
.shop-order-id { font-family: Consolas, monospace; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-order-codes { font-family: Consolas, monospace; font-size: 11px; color: #555a68; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root.dark .shop-order-codes { color: #c7cad4; }
.shop-order-row small { color: var(--muted); font-size: 11px; }
.shop-orders-empty { padding: 34px 0; color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 1080px) {
  .shop-features, .shop-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-config-grid { grid-template-columns: 1fr; }
  .shop-prices-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-orders-head, .shop-order-row { grid-template-columns: minmax(130px, 1.1fr) 86px 80px 80px minmax(150px, 1fr) minmax(110px, .8fr); }
  .shop-orders-head span:nth-child(4), .shop-order-row span:nth-child(4) { display: none; }
  .shop-hero-grid { grid-template-columns: 1fr; }
  .shop-hero-visual { display: none; }
}
@media (max-width: 680px) {
  .shop-features, .shop-steps { grid-template-columns: 1fr; }
  .shop-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-prices-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .buy-channels { grid-template-columns: 1fr; }
  .shop-orders-head { display: none; }
  .shop-orders-list { display: grid; gap: 10px; }
  .shop-order-row { grid-template-columns: 1fr auto; gap: 10px; border: 1px solid var(--line); border-radius: 7px; }
  .shop-order-row > code:first-child, .shop-order-row > code.shop-order-codes { grid-column: 1 / -1; }
}

/* Dialogs */
dialog { width: min(570px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 8px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(24, 25, 34, .54); backdrop-filter: blur(2px); }
.dialog-body { display: grid; gap: 20px; padding: 23px; }
.dialog-body header, .dialog-body header > div { display: flex; align-items: flex-start; gap: 12px; }
.dialog-body header { justify-content: space-between; }
.dialog-body h2 { font-size: 20px; }
.dialog-body header p { font-size: 12px; }
.dialog-body footer { display: flex; justify-content: flex-end; gap: 9px; padding-top: 2px; }
.dialog-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px; background: var(--primary-soft); }
.dialog-icon.success { background: var(--green-soft); }
.dialog-icon img { width: 20px; height: 20px; }
.close-button { width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--surface); font-size: 20px; line-height: 1; }
.close-button:hover { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.warning-band { display: grid; gap: 4px; padding: 12px 14px; border-left: 3px solid #e2a236; color: var(--amber); background: var(--amber-soft); font-size: 12px; line-height: 1.6; }
.copy-row { display: flex; align-items: stretch; gap: 8px; }
.copy-row input, .copy-row textarea { font-family: Consolas, monospace; font-size: 11px; }
.copy-row button { min-width: 76px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--ink); border-color: var(--line); background: var(--surface); }

.toast { position: fixed; z-index: 100; top: 18px; right: 18px; max-width: min(420px, calc(100vw - 36px)); padding: 12px 15px; border-left: 3px solid var(--green); border-radius: 6px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: .18s; font-size: 13px; }
.toast.show { opacity: 1; transform: none; }
.toast.error { border-left-color: var(--red); }

/* ---- 卡密管理页 ---- */
.summary.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.license-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.license-filters select, .license-filters input { width: auto; min-height: 40px; padding: 8px 12px; font-size: 13px; }
.license-filters input[type="search"] { width: 190px; }
.license-filters .secondary { flex: 0 0 auto; }
.license-table { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; }
.license-table-head, .license-row { display: grid; grid-template-columns: minmax(210px, 1.5fr) 84px 92px minmax(150px, 1.1fr) minmax(170px, 1.1fr) 168px; align-items: center; gap: 14px; }
.license-table-head { min-height: 44px; padding: 0 18px; color: var(--muted); background: var(--surface-soft); font-size: 12px; font-weight: 700; }
.license-table-head span:last-child { text-align: right; }
.license-row { min-height: 76px; padding: 13px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.license-row:hover { background: color-mix(in srgb, var(--primary-soft) 32%, var(--surface)); }
.license-key, .license-machine, .license-expiry { min-width: 0; display: grid; gap: 4px; }
.license-key code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: Consolas, "Courier New", monospace; font-size: 13px; font-weight: 700; letter-spacing: .4px; }
.license-key small, .license-machine small, .license-expiry small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.license-machine code { font-family: Consolas, monospace; font-size: 11px; color: #555a68; background: var(--surface-soft); border-radius: 4px; padding: 3px 7px; width: fit-content; }
:root.dark .license-machine code { color: #c7cad4; }
.license-expiry b { font-size: 12.5px; font-weight: 700; }
.type-badge { width: fit-content; display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 5px; color: var(--primary); background: var(--primary-soft); font-size: 11px; font-weight: 700; }
.status.unused { color: var(--muted); background: var(--surface-soft); }
.status.active { color: var(--green); background: var(--green-soft); }
.status.expired { color: var(--amber); background: var(--amber-soft); }
.status.revoked { color: var(--red); background: var(--red-soft); }
.license-paging { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.license-paging .secondary { min-height: 32px; padding: 0 13px; font-size: 12px; }
.license-paging .secondary:disabled { opacity: .45; cursor: default; }
.license-form-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 14px; }
.row-actions svg { width: 16px; height: 16px; }
.row-actions button { color: var(--muted); }
.row-actions button:hover { color: var(--primary); }
.row-actions button.danger:hover { color: var(--red); }
@media (max-width: 1180px) {
  .summary.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .license-table-head, .license-row { grid-template-columns: minmax(190px, 1.5fr) 80px 88px minmax(150px, 1fr) 150px; }
  .license-table-head span:nth-child(4), .license-machine { display: none; }
}
@media (max-width: 680px) {
  .summary.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .license-filters { width: 100%; }
  .license-filters input[type="search"] { flex: 1 1 130px; width: auto; }
  .license-table { border: 0; overflow: visible; }
  .license-table-head { display: none; }
  .license-list { display: grid; gap: 10px; }
  .license-row { min-height: 0; grid-template-columns: 1fr auto; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 7px; }
  .license-key, .license-expiry { grid-column: 1 / -1; }
  .type-badge { grid-row: 1; grid-column: 2; }
  .status { grid-row: 2; grid-column: 2; }
  .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .license-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1180px) {
  .auth-shell { grid-template-columns: minmax(470px, 1.2fr) minmax(400px, .8fr); }
  .auth-copy { width: min(440px, 58%); }
  .auth-illustration { width: 43%; right: 1%; }
  .instance-table-head, .instance-row { grid-template-columns: minmax(120px, 1fr) minmax(180px, 1.55fr) 98px 130px; gap: 12px; }
  .instance-table-head span:nth-child(4), .metric { display: none; }
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100vh; padding: 80px 28px 62px; }
  .mobile-brand { position: absolute; top: 24px; left: 26px; display: flex; align-items: center; gap: 9px; }
  .mobile-brand img { width: 34px; height: 34px; border-radius: 7px; }
  .mobile-brand b { font-size: 14px; }
  .app-shell { display: block; }
  .workspace { margin-left: 0; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; }
  .sidebar-mask { position: fixed; z-index: 29; inset: 0; display: block; background: rgba(22, 23, 31, .44); opacity: 0; visibility: hidden; transition: .2s; }
  .sidebar.open + .workspace { pointer-events: none; }
  .sidebar-mask.open { opacity: 1; visibility: visible; }
  .menu-button { display: grid; }
  .summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .instance-table-head, .instance-row { grid-template-columns: minmax(120px, 1fr) minmax(180px, 1.5fr) 98px 130px; }
}

@media (max-width: 680px) {
  .topbar { height: 58px; padding: 0 14px; }
  .breadcrumb { display: none; }
  #accountName, #logoutButton { display: none; }
  .account-avatar { width: 32px; height: 32px; }
  .main-content { padding: 16px 12px; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 20px; }
  .page-heading p { max-width: 230px; line-height: 1.55; }
  .page-heading .primary { min-width: 42px; width: 42px; padding: 0; font-size: 0; }
  .page-heading .primary span { font-size: 20px; }
  .summary { grid-template-columns: 1fr; gap: 10px; }
  .stat-card { min-height: 106px; padding: 16px; }
  .stat-card strong { font-size: 25px; }
  .content-section { padding: 15px; }
  .section-heading { align-items: flex-start; }
  .section-heading p { max-width: 220px; }
  #refreshButton { width: 40px; min-width: 40px; padding: 0; font-size: 0; justify-content: center; }
  .instance-table { border: 0; overflow: visible; }
  .instance-table-head { display: none; }
  .instance-list { display: grid; gap: 10px; }
  .instance-row { min-height: 0; grid-template-columns: 1fr auto; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 7px; }
  .instance-url { grid-column: 1 / -1; }
  .status { grid-column: 2; grid-row: 1; }
  .row-actions { grid-column: 1 / -1; justify-content: flex-start; padding-top: 2px; }
  .copy-row { display: grid; }
  .copy-row button { min-height: 38px; }
  .dialog-body { padding: 19px; }
  .toast { left: 14px; right: 14px; top: 14px; max-width: none; }
}
.inline-field{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.inline-field button{height:42px;white-space:nowrap}
