/* ============================================================
   卡序 KAXU · 运营后台
   ============================================================ */

body.admin-body {
  background: #070b10;
  overflow-x: hidden;
}

/* ============================== 登录 ============================== */

.login-view {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(440px, 0.94fr);
  min-height: 100vh;
}

.login-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 44px 56px;
  background:
    radial-gradient(800px 620px at 18% 8%, rgba(46, 230, 161, 0.09), transparent 62%),
    radial-gradient(600px 500px at 90% 90%, rgba(111, 152, 255, 0.05), transparent 65%),
    linear-gradient(160deg, #0b1118, #070b10);
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.login-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.027) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.027) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 30% 30%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 30% 30%, #000, transparent 72%);
  pointer-events: none;
}

.login-brand-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  width: min(540px, 100%);
}

.login-copy {
  margin-top: auto;
  padding-top: 56px;
}

.login-copy h1 {
  margin-top: 6px;
  font-size: clamp(38px, 4vw, 54px);
  font-weight: 620;
  letter-spacing: -0.055em;
  line-height: 1.16;
}

.login-copy p {
  max-width: 420px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

.login-art {
  position: relative;
  margin-top: 40px;
  padding-right: 20px;
}

.login-art-glow {
  position: absolute;
  top: -50px;
  right: 0;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 230, 161, 0.13), transparent 65%);
  filter: blur(20px);
}

.mini-engine {
  position: relative;
  width: min(430px, 100%);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: linear-gradient(155deg, #121b24, #0a1016);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: rotate(-1.6deg);
}

.mini-engine-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--text-soft);
}

.mini-engine-head span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.mini-engine-head i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(111, 242, 191, 0.08);
}

.mini-engine-head b {
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.mini-order-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.mini-ic {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #1677ff;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.mini-order-row div {
  min-width: 0;
  flex: 1;
}

.mini-order-row strong {
  display: block;
  font-size: 10.5px;
  font-weight: 550;
}

.mini-order-row small {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.mini-ok {
  color: var(--mint);
  font-size: 8.5px;
  white-space: nowrap;
}

.mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 46px;
  margin-top: 16px;
  padding: 0 2px;
}

.mini-bars span {
  flex: 1;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, rgba(111, 242, 191, 0.45), rgba(111, 242, 191, 0.06));
}

.mini-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(13, 19, 27, 0.9);
  color: var(--text-soft);
  font-size: 9.5px;
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.mini-chip svg {
  color: var(--mint);
}

.chip-stock {
  top: 14px;
  right: -16px;
}

.chip-safe {
  bottom: -14px;
  left: -18px;
}

.login-points {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: auto;
  padding-top: 46px;
  color: var(--muted-2);
  font-size: 10px;
}

.login-points span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.login-points svg {
  color: var(--mint);
}

.login-form-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #070b10;
}

.login-card {
  width: min(392px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.01));
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.35);
  animation: fade-up 0.5s var(--ease) both;
}

.login-card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  border: 1px solid rgba(111, 242, 191, 0.18);
  border-radius: 13px;
  background: rgba(111, 242, 191, 0.06);
  color: var(--mint);
}

.login-card h2 {
  font-size: 24px;
  font-weight: 620;
  letter-spacing: -0.035em;
}

.login-sub {
  margin-top: 7px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 11.5px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon > span:first-child {
  position: absolute;
  left: 13px;
  z-index: 1;
  display: inline-flex;
  color: var(--muted-2);
  pointer-events: none;
}

.input-with-icon .input {
  height: 46px;
  padding-left: 38px;
  padding-right: 40px;
  background: rgba(0, 0, 0, 0.2);
}

.input-eye {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  color: var(--muted-2);
  transition: 0.2s;
}

.input-eye:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
}

.login-submit {
  margin-top: 22px;
  height: 47px;
}

.login-error {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 122, 133, 0.22);
  border-radius: 8px;
  background: rgba(255, 122, 133, 0.06);
  color: #ff9ca4;
  font-size: 11px;
}

.login-error svg {
  flex-shrink: 0;
}

.login-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 9.5px;
}

.login-meta a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  transition: 0.2s;
}

.login-meta a:hover {
  color: var(--mint);
}

.login-secure {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-2);
}

.login-footer {
  margin-top: 26px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
}

/* ============================== 后台框架 ============================== */

.admin-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: 252px;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #090e14 0%, #070b10 100%);
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 22px;
}

.sidebar-env {
  margin-left: auto;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.14em;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.side-label {
  padding: 16px 10px 7px;
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.side-label:first-child {
  padding-top: 4px;
}

.side-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 450;
  transition: 0.2s;
}

.side-link svg {
  color: var(--muted-2);
  transition: color 0.2s;
}

.side-link:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
}

.side-link:hover svg {
  color: var(--text-soft);
}

.side-link.is-active {
  border-color: rgba(111, 242, 191, 0.13);
  background: linear-gradient(90deg, rgba(111, 242, 191, 0.1), rgba(111, 242, 191, 0.02));
  color: var(--text);
}

.side-link.is-active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 9px;
  bottom: 9px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--mint);
}

.side-link.is-active svg {
  color: var(--mint);
}

.side-badge {
  min-width: 18px;
  height: 17px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(255, 197, 110, 0.13);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  line-height: 17px;
  text-align: center;
}

.side-stock {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.side-stock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.side-stock-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 7px;
}

.side-stock-row strong {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1;
}

.side-stock-row span {
  color: var(--muted-2);
  font-size: 9px;
}

.side-stock-bar {
  height: 3px;
  margin-top: 11px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.side-stock-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint-strong), var(--mint));
  transition: width 0.8s var(--ease);
}

.side-stock p {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.5;
}

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 8px 0;
  border-top: 1px solid var(--line);
}

.side-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 1px solid rgba(111, 242, 191, 0.2);
  border-radius: 50%;
  background: rgba(111, 242, 191, 0.08);
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.side-user-info {
  min-width: 0;
  flex: 1;
}

.side-user-info strong {
  display: block;
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
}

.side-user-info span {
  display: block;
  color: var(--muted-2);
  font-size: 8.5px;
}

.side-user .icon-btn {
  width: 30px;
  height: 30px;
  border-color: transparent;
  background: transparent;
}

.side-user .icon-btn:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.admin-main {
  min-height: 100vh;
  margin-left: 252px;
  background:
    radial-gradient(800px 500px at 75% -6%, rgba(46, 230, 161, 0.04), transparent 62%),
    #070b10;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 16, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.topbar-left h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.topbar-left p {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
}

.topbar-menu {
  display: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 9.5px;
}

.system-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(111, 242, 191, 0.08);
}

.topbar-store {
  height: 32px;
  padding: 0 11px;
  font-size: 10px;
}

.topbar-right > .icon-btn {
  width: 32px;
  height: 32px;
}

.topbar-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(111, 242, 191, 0.17);
  border-radius: 50%;
  background: rgba(111, 242, 191, 0.07);
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}

.admin-content {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 26px 30px 64px;
}

.sidebar-mask {
  display: none;
}

/* ============================== 留言中心 ============================== */

.support-list {
  display: flex;
  flex-direction: column;
}

.support-item {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.support-item:last-child {
  border-bottom: 0;
}

.support-item.is-new {
  background: rgba(111, 242, 191, 0.025);
  box-shadow: inset 2px 0 0 rgba(111, 242, 191, 0.55);
}

.support-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted-2);
  font-size: 9.5px;
}

.support-dot {
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--muted-2);
}

.support-item.is-new .support-dot {
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(111, 242, 191, 0.08);
}

.support-meta strong {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
}

.support-meta time {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.support-meta .tag {
  height: 20px;
  font-size: 8.5px;
  font-style: normal;
}

.support-message {
  margin-top: 9px;
  color: var(--text-soft);
  font-size: 11.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.support-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

/* ============================== 通道控制 ============================== */

.channels-view {
  max-width: 1100px;
}

.channels-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

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

.product-edit-modal {
  width: min(620px, 100%);
  padding: 26px;
}

.product-edit-head {
  padding-right: 34px;
}

.product-edit-head .eyebrow {
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.product-edit-head h3 {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.product-edit-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
}

.product-edit-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 20px;
}

.product-edit-form .span-2 {
  grid-column: span 2;
}

.product-edit-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

@media (max-width: 620px) {
  .product-edit-modal {
    padding: 20px;
  }

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

  .product-edit-form .span-2 {
    grid-column: span 1;
  }
}

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

.qr-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
}

.qr-tile strong {
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 600;
}

.qr-preview {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  padding: 6px;
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}

.qr-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-preview.is-empty {
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted-2);
  font-size: 10px;
}

.selfhost-gateway {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.selfhost-gateway .field {
  max-width: 320px;
}

@media (max-width: 720px) {
  .qr-grid {
    grid-template-columns: 1fr;
  }
}

.testpay-wrap {
  max-width: 620px;
}

.testpay-result {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.testpay-result.is-ok,
.testpay-result.is-info {
  border-color: rgba(111, 242, 191, 0.24);
  background: rgba(111, 242, 191, 0.05);
}

.testpay-result.is-fail {
  border-color: rgba(255, 122, 133, 0.24);
  background: rgba(255, 122, 133, 0.05);
}

.testpay-result-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.testpay-result.is-ok .testpay-result-head {
  color: var(--mint);
}

.testpay-result.is-fail .testpay-result-head {
  color: #ff9ca4;
}

.testpay-result-msg {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.testpay-meta {
  display: grid;
  gap: 7px;
  margin: 14px 0;
}

.testpay-meta > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testpay-meta dt {
  width: 60px;
  flex-shrink: 0;
  color: var(--muted-2);
  font-size: 10px;
}

.testpay-meta dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 11px;
}

.testpay-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.channel-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
}

.channel-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  transition: opacity 0.2s, border-color 0.2s;
}

.channel-card.is-off {
  opacity: 0.5;
}

.channel-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.channel-icon.alipay {
  background: #1677ff;
}

.channel-icon.wechat {
  background: #07c160;
}

.channel-icon.qq {
  background: #12b7f5;
}

.channel-info {
  flex: 1;
  min-width: 0;
}

.channel-info strong {
  display: block;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
}

.channel-info span {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
}

.channel-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 20px 4px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 197, 110, 0.17);
  border-radius: 9px;
  background: rgba(255, 197, 110, 0.04);
  color: var(--amber);
  font-size: 9.5px;
  line-height: 1.6;
}

.channel-note svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.channels-view .form-actions {
  margin-top: 0;
  padding: 16px 20px 20px;
  border-top: 0;
}

.channel-help {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.channel-help li {
  position: relative;
  padding-left: 13px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.channel-help li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(111, 242, 191, 0.45);
}

/* ============================== 仪表盘 ============================== */

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 197, 110, 0.17);
  border-radius: 11px;
  background: rgba(255, 197, 110, 0.04);
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.6;
}

.banner svg {
  flex-shrink: 0;
  color: var(--amber);
}

.banner .btn {
  margin-left: auto;
  flex-shrink: 0;
}

.banner-info {
  border-color: rgba(121, 184, 255, 0.17);
  background: rgba(121, 184, 255, 0.035);
}

.banner-info svg {
  color: var(--blue);
}

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

.stat-card {
  position: relative;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.033), rgba(255, 255, 255, 0.008));
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -40px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--stat-accent, var(--mint)), transparent 65%);
  opacity: 0.06;
}

.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--stat-accent, var(--mint));
}

.stat-value {
  margin-top: 12px;
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1;
}

.stat-value small {
  margin-right: 2px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.stat-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  color: var(--muted-2);
  font-size: 9px;
}

.stat-meta b {
  color: var(--stat-accent, var(--mint));
  font-weight: 500;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.027), rgba(255, 255, 255, 0.008));
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel-title svg {
  color: var(--muted-2);
}

.panel-sub {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 400;
}

.panel-body {
  padding: 20px;
}

.panel-body-flush {
  padding: 0;
}

.chart-wrap {
  padding: 22px 20px 16px;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 168px;
  padding-top: 10px;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 100% 42px;
  background-position: 0 9px;
}

.chart-col {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 8px;
}

.chart-bar {
  position: relative;
  width: min(34px, 72%);
  min-height: 3px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, rgba(111, 242, 191, 0.75), rgba(46, 230, 161, 0.12));
  transition: height 0.7s var(--ease);
}

.chart-col:last-child .chart-bar {
  background: linear-gradient(180deg, var(--mint), rgba(46, 230, 161, 0.3));
  box-shadow: 0 0 24px rgba(46, 230, 161, 0.15);
}

.chart-bar:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #111a23;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 8.5px;
  white-space: nowrap;
}

.chart-label {
  color: var(--muted-2);
  font-size: 8.5px;
  white-space: nowrap;
}

.low-stock-list {
  display: flex;
  flex-direction: column;
}

.low-stock-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.low-stock-item:last-child {
  border-bottom: 0;
}

.low-stock-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.low-stock-item div {
  min-width: 0;
  flex: 1;
}

.low-stock-item strong {
  display: block;
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.low-stock-item span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.stock-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.stock-num.low {
  color: var(--amber);
}

.stock-num.zero {
  color: var(--danger);
}

.recent-panel .data-table td {
  padding-top: 11px;
  padding-bottom: 11px;
}

/* ============================== 通用数据表 ============================== */

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.data-table th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: var(--text-soft);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.15s;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.022);
}

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

.cell-strong {
  color: var(--text);
  font-weight: 550;
}

.cell-muted {
  color: var(--muted-2);
  font-size: 10px;
}

.cell-mono {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  white-space: nowrap;
}

.cell-note {
  max-width: 140px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.cell-params {
  max-width: 320px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.55;
  word-break: break-all;
}

.empty-cell {
  padding: 36px 18px !important;
  color: var(--muted-2);
  font-size: 11px;
  text-align: center;
}

.order-code {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 130px;
}

.product-cell-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--mint);
}

.product-cell-icon svg {
  width: 14px;
  height: 14px;
}

.product-cell div {
  min-width: 0;
}

.product-cell strong {
  display: block;
  overflow: hidden;
  max-width: 180px;
  font-size: 10.5px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-cell span {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
}

.status-pill i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.status-delivered,
.status-available {
  border-color: rgba(111, 242, 191, 0.2);
  background: rgba(111, 242, 191, 0.07);
  color: var(--mint);
}

.status-pending,
.status-reserved {
  border-color: rgba(255, 197, 110, 0.2);
  background: rgba(255, 197, 110, 0.06);
  color: var(--amber);
}

.status-paid_pending {
  border-color: rgba(255, 122, 133, 0.22);
  background: rgba(255, 122, 133, 0.07);
  color: #ff9ca4;
}

.status-closed,
.status-sold {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
}

.status-sold {
  border-color: rgba(180, 156, 255, 0.18);
  background: rgba(180, 156, 255, 0.06);
  color: var(--violet);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.row-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 9px;
  transition: 0.2s;
}

.row-btn:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.row-btn.danger:hover {
  border-color: rgba(255, 122, 133, 0.25);
  color: #ff9ca4;
  background: rgba(255, 122, 133, 0.06);
}

.row-btn.is-off {
  border-color: rgba(111, 242, 191, 0.22);
  color: var(--mint);
}

.row-btn.is-off:hover {
  border-color: rgba(111, 242, 191, 0.42);
  color: var(--mint);
  background: rgba(111, 242, 191, 0.07);
}

.row-btn svg {
  width: 12px;
  height: 12px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
}

.pagination-info {
  color: var(--muted-2);
  font-size: 9px;
}

.pagination-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  display: grid;
  place-items: center;
  min-width: 27px;
  height: 27px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  transition: 0.2s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--text);
}

.page-btn.is-active {
  border-color: rgba(111, 242, 191, 0.3);
  background: rgba(111, 242, 191, 0.09);
  color: var(--mint);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ============================== 工具栏 ============================== */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.toolbar-spacer {
  flex: 1;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: min(260px, 100%);
}

.search-box > span {
  position: absolute;
  left: 11px;
  display: inline-flex;
  color: var(--muted-2);
  pointer-events: none;
}

.search-box .input {
  height: 34px;
  padding-left: 33px;
  font-size: 10.5px;
  background: rgba(0, 0, 0, 0.16);
}

.input-sm {
  height: 34px;
  font-size: 10.5px;
}

.filter-chips {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.chip-btn {
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
  transition: 0.2s;
}

.chip-btn:hover {
  color: var(--text-soft);
}

.chip-btn.is-active {
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
}

.toolbar .select {
  width: auto;
  min-width: 130px;
  height: 34px;
  font-size: 10.5px;
}

.toolbar .btn {
  height: 34px;
  font-size: 10.5px;
  padding: 0 12px;
}

/* ============================== 卡密售出 ============================== */

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

.sales-head h2 {
  font-size: 21px;
  font-weight: 620;
  letter-spacing: -0.035em;
}

.sales-head p {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.sales-stats {
  display: flex;
  gap: 22px;
}

.sales-stat {
  text-align: right;
}

.sales-stat strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.sales-stat span {
  color: var(--muted-2);
  font-size: 8.5px;
}

/* 订单详情弹窗 */

.admin-modal {
  width: min(660px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #0d141c;
  box-shadow: var(--shadow);
  animation: pop-in 0.25s var(--ease) both;
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.modal-head p {
  margin-top: 3px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
}

.modal-head .modal-close {
  position: static;
  flex-shrink: 0;
}

.modal-body {
  padding: 22px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.14);
}

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

.detail-item span {
  display: block;
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-item strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-section {
  margin-top: 20px;
}

.detail-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 550;
}

.detail-secrets {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.detail-secret-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.detail-secret-row:last-child {
  border-bottom: 0;
}

.detail-secret-row code {
  flex: 1;
  overflow-wrap: anywhere;
  color: var(--text-soft);
  font-size: 10.5px;
}

.detail-note {
  padding: 10px 12px;
  border: 1px solid rgba(255, 197, 110, 0.18);
  border-radius: 8px;
  background: rgba(255, 197, 110, 0.045);
  color: var(--amber);
  font-size: 9.5px;
  line-height: 1.6;
}

/* ============================== 卡密补充 ============================== */

.restock-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.picker-list {
  max-height: 560px;
  overflow-y: auto;
}

.pick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  transition: 0.18s;
}

.pick-item:last-child {
  border-bottom: 0;
}

.pick-item:hover {
  background: rgba(255, 255, 255, 0.025);
}

.pick-item.is-active {
  background: rgba(111, 242, 191, 0.06);
  box-shadow: inset 2px 0 0 var(--mint);
}

.pick-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--pick-accent, var(--mint));
}

.pick-icon svg {
  width: 16px;
  height: 16px;
}

.pick-info {
  min-width: 0;
  flex: 1;
}

.pick-info strong {
  display: block;
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pick-info span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.pick-stock {
  flex-shrink: 0;
  text-align: right;
}

.pick-stock strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--mint);
}

.pick-stock span {
  display: block;
  color: var(--muted-2);
  font-size: 8px;
}

.restock-form {
  padding: 22px;
}

.restock-product-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.restock-product-head .pick-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
}

.restock-product-head h3 {
  font-size: 14px;
  font-weight: 600;
}

.restock-product-head p {
  margin-top: 2px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
}

.restock-product-head .stock-badge {
  margin-left: auto;
  padding: 5px 9px;
  border: 1px solid rgba(111, 242, 191, 0.2);
  border-radius: 7px;
  background: rgba(111, 242, 191, 0.06);
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 9px;
  white-space: nowrap;
}

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

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.form-label-row .field-label {
  display: inline-flex;
}

.counter {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.textarea-cards {
  min-height: 220px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: 0.01em;
}

.form-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.6;
}

.form-hint svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.batch-history {
  margin-top: 16px;
}

.batch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 9.5px;
}

.batch-row:last-child {
  border-bottom: 0;
}

.batch-row code {
  flex: 1;
  color: var(--text-soft);
  font-size: 9.5px;
}

.batch-row span {
  color: var(--muted-2);
  white-space: nowrap;
}

.batch-row b {
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 9.5px;
}

/* ============================== 卡密管理 ============================== */

.checkbox-cell {
  width: 34px;
  padding-right: 0 !important;
}

.table-check {
  width: 14px;
  height: 14px;
  accent-color: var(--mint-strong);
  cursor: pointer;
}

.secret-cell {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 180px;
}

.secret-cell code {
  flex: 1;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secret-cell code.is-masked {
  color: var(--muted-2);
  letter-spacing: 0.08em;
}

.secret-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.mini-icon-btn {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  color: var(--muted-2);
  transition: 0.18s;
}

.mini-icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
}

.mini-icon-btn svg {
  width: 12px;
  height: 12px;
}

.selection-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(111, 242, 191, 0.035);
  font-size: 10px;
  color: var(--muted);
}

.selection-bar strong {
  color: var(--mint);
  font-family: var(--font-mono);
}

.selection-bar .btn {
  margin-left: auto;
}

/* ============================== 卡密创建 ============================== */

.create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 16px;
  align-items: start;
}

.create-form {
  padding: 22px;
}

.create-aside {
  position: sticky;
  top: 94px;
}

.preview-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.product-preview {
  --accent: var(--mint);
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  overflow: hidden;
}

.product-preview::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -50px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent), transparent 66%);
  opacity: 0.09;
  filter: blur(14px);
}

.preview-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.preview-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

.preview-flag {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
  font-size: 9px;
}

.preview-cat {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.preview-name {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.preview-desc {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.preview-features {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.preview-features span {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 8.5px;
}

.preview-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.preview-price {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.preview-price small {
  margin-right: 2px;
  font-size: 10px;
  font-weight: 500;
}

.preview-stock {
  color: var(--muted-2);
  font-size: 8.5px;
}

.preview-note {
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.6;
  text-align: center;
}

.icon-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.icon-choice {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  transition: 0.2s;
}

.icon-choice:hover {
  border-color: var(--line-strong);
  color: var(--text-soft);
}

.icon-choice.is-active {
  border-color: rgba(111, 242, 191, 0.35);
  background: rgba(111, 242, 191, 0.08);
  color: var(--mint);
}

.accent-picker {
  display: flex;
  gap: 7px;
}

.accent-choice {
  width: 24px;
  height: 24px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: 0.2s;
}

.accent-choice:hover {
  transform: scale(1.1);
}

.accent-choice.is-active {
  border-color: #0b1118;
  box-shadow: 0 0 0 2px var(--swatch);
}

.product-table-wrap {
  margin-top: 16px;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch i {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  transition: 0.2s;
}

.switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  transition: 0.2s var(--ease);
}

.switch input:checked + i {
  background: rgba(111, 242, 191, 0.3);
}

.switch input:checked + i::after {
  left: 17px;
  background: var(--mint);
}

/* ============================== 确认弹窗 ============================== */

.confirm-modal {
  width: min(400px, 100%);
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  background: #0d141c;
  box-shadow: var(--shadow);
  animation: pop-in 0.22s var(--ease) both;
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 122, 133, 0.2);
  border-radius: 11px;
  background: rgba(255, 122, 133, 0.07);
  color: #ff9ca4;
}

.confirm-modal h3 {
  font-size: 16px;
  font-weight: 600;
}

.confirm-modal p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.confirm-backdrop {
  z-index: 200;
}

/* ============================== 提示 / 空状态 / 加载 ============================== */

.admin-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 320px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.admin-loading .spinner {
  width: 22px;
  height: 22px;
}

.admin-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 54px 24px;
  text-align: center;
}

.admin-empty svg {
  width: 30px;
  height: 30px;
  margin-bottom: 4px;
  color: var(--muted-2);
  opacity: 0.7;
}

.admin-empty strong {
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 550;
}

.admin-empty p {
  color: var(--muted-2);
  font-size: 9.5px;
}

.view-enter {
  animation: fade-up 0.35s var(--ease) both;
}

/* ============================== 响应式 ============================== */

@media (max-width: 1240px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }

  .create-grid {
    grid-template-columns: 1fr;
  }

  .create-aside {
    position: static;
  }

  .restock-grid {
    grid-template-columns: 290px minmax(0, 1fr);
  }
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.4);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-mask.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(2, 5, 8, 0.65);
    backdrop-filter: blur(4px);
  }

  .admin-main {
    margin-left: 0;
  }

  .topbar-menu {
    display: grid;
  }

  .login-view {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 0.9fr);
  }

  .login-brand-panel {
    padding: 36px;
  }

  .login-art {
    display: none;
  }

  .login-copy {
    padding-top: 40px;
  }
}

@media (max-width: 860px) {
  .login-view {
    grid-template-columns: 1fr;
  }

  .channels-grid {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    display: none;
  }

  .login-form-panel {
    min-height: 100vh;
    padding: 24px;
  }

  .restock-grid {
    grid-template-columns: 1fr;
  }

  .picker-list {
    display: flex;
    max-height: none;
    overflow-x: auto;
    border-bottom: 0;
  }

  .pick-item {
    min-width: 210px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .pick-item.is-active {
    box-shadow: inset 0 -2px 0 var(--mint);
  }

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

  .sales-stats {
    width: 100%;
    justify-content: space-between;
  }

  .sales-stat {
    text-align: left;
  }

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

@media (max-width: 640px) {
  .admin-topbar {
    height: 64px;
    padding: 0 16px;
  }

  .admin-content {
    padding: 16px 14px 52px;
  }

  .topbar-left h1 {
    font-size: 16px;
  }

  .topbar-left p {
    display: none;
  }

  .system-status,
  .topbar-store-text,
  .topbar-avatar {
    display: none;
  }

  .topbar-store {
    width: 32px;
    padding: 0;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 22px;
  }

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

  .form-grid .span-2 {
    grid-column: auto;
  }

  .toolbar {
    padding: 12px;
    gap: 8px;
  }

  .search-box {
    width: 100%;
  }

  .filter-chips {
    width: 100%;
    overflow-x: auto;
  }

  .filter-chips .chip-btn {
    flex: 1;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }

  .pagination {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .modal-backdrop {
    padding: 8px;
  }

  .admin-modal {
    max-height: calc(100vh - 16px);
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .modal-foot {
    flex-wrap: wrap;
  }

  .modal-foot > span[style] {
    display: none;
  }

  .modal-foot .btn {
    flex: 1 1 42%;
  }

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

  .login-card {
    padding: 26px 22px;
  }

  .restock-form,
  .create-form {
    padding: 16px;
  }

  .product-preview {
    padding: 18px;
  }

  .banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .banner .btn {
    margin-left: 26px;
  }
}

@media (max-width: 350px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .login-form-panel {
    padding: 14px;
  }

  .login-card {
    border-radius: 18px;
  }
}

@media (max-height: 760px) and (min-width: 1025px) {
  .login-brand-panel {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .login-art {
    display: none;
  }

  .login-copy {
    padding-top: 30px;
  }

  .login-points {
    padding-top: 28px;
  }
}

/* ============================== 公告 ============================== */

.announce-admin {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.announce-admin .panel {
  padding: 22px;
}

.announce-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
}

.announce-toggle input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--mint);
  flex-shrink: 0;
}

.announce-toggle strong {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.announce-toggle small {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.6;
}

.announce-preview-panel {
  position: sticky;
  top: 18px;
}

.announce-preview-card {
  margin-top: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background: linear-gradient(180deg, #121a23 0%, #0c1219 100%);
  box-shadow: var(--shadow);
}

.announce-preview-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.announce-preview-card h3 {
  margin: 14px 0 0;
  color: var(--text);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.announce-preview-card p {
  margin: 12px 0 18px;
  max-height: 220px;
  overflow: auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.announce-preview-card .btn-block {
  margin-top: 0;
}

@media (max-width: 980px) {
  .announce-admin {
    grid-template-columns: 1fr;
  }

  .announce-preview-panel {
    position: static;
  }
}
