:root {
  --bg: #eef3ff;
  --bg-2: #f8fbff;
  --ink: #1b2430;
  --muted: #6b7a92;
  --select-arrow: #6b7a92;
  --primary: #2f7bff;
  --primary-2: #4bd1ff;
  --accent: #00c38a;
  --danger: #ff5a5f;
  --card: #ffffff;
  --line: rgba(41, 72, 125, 0.12);
  --shadow: 0 20px 40px rgba(31, 47, 78, 0.08);
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --bg-2: #0f1a2e;
  --ink: #e7eefb;
  --muted: #9fb0cc;
  --select-arrow: #9fb0cc;
  --primary: #4c8dff;
  --primary-2: #66e0ff;
  --accent: #1ad2a1;
  --danger: #ff6b6b;
  --card: #0f192a;
  --line: rgba(255, 255, 255, 0.14);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  outline: 0;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(47, 123, 255, 0.45) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(47, 123, 255, 0.55), rgba(75, 209, 255, 0.55));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(47, 123, 255, 0.8), rgba(75, 209, 255, 0.8));
  background-clip: padding-box;
}

:root[data-theme="dark"] * {
  scrollbar-color: rgba(102, 224, 255, 0.55) transparent;
}

:root[data-theme="dark"] *::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(102, 224, 255, 0.7), rgba(76, 141, 255, 0.7));
  background-clip: padding-box;
}

body {
  margin: 0 !important;
  padding: 0 !important;
  font-family: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

html {
  margin: 0 !important;
  padding: 0 !important;
}
}

body.auth-page {
  min-height: 100vh;
  width: 100%;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  background: radial-gradient(circle at 15% 20%, rgba(47, 123, 255, 0.2), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(75, 209, 255, 0.2), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(0, 195, 138, 0.18), transparent 50%);
}

.auth-shell {
  width: min(420px, 92vw);
  padding: 24px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) !important;
}

.auth-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(47, 123, 255, 0.15);
  box-shadow: 0 20px 40px rgba(31, 47, 78, 0.12);
  padding: 24px;
  display: grid;
  gap: 16px;
}

.auth-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-head.auth-head-center {
  justify-content: center;
  text-align: center;
}

.auth-brand.auth-brand-center {
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.auth-brand.auth-brand-center .brand-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 22px;
}

.auth-brand.auth-brand-center .auth-title,
.auth-brand.auth-brand-center .auth-sub {
  text-align: center;
}

.auth-title {
  font-size: 18px;
  font-weight: 600;
}

.auth-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.invite-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.invite-inline input {
  flex: 1;
}

.invite-clear {
  width: auto;
  padding: 6px 12px;
  font-size: 12px;
}

@media (max-width: 640px) {
  .invite-inline {
    flex-direction: column;
    align-items: stretch;
  }
}

.auth-submit {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(120deg, #2f7bff, #4bd1ff);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 22px rgba(47, 123, 255, 0.25);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-submit.secondary {
  background: linear-gradient(120deg, #00c38a, #27e0b0);
  box-shadow: 0 10px 22px rgba(0, 195, 138, 0.25);
}

.auth-submit.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(47, 123, 255, 0.4);
  box-shadow: none;
}

.auth-submit:hover {
  transform: translateY(-1px);
}

.auth-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-tabs {
  justify-content: center;
  margin-top: 6px;
  margin-bottom: 8px;
}

.auth-tabs .tab-btn {
  font-size: 13px;
  padding: 6px 14px;
  background: rgba(47, 123, 255, 0.1);
  color: #2451b2;
  border: 1px solid rgba(47, 123, 255, 0.28);
  box-shadow: none;
  background-image: none;
}

.auth-tabs .tab-btn.active {
  background: #3a86ff;
  color: #fff;
  border-color: #3a86ff;
  box-shadow: 0 10px 20px rgba(58, 134, 255, 0.2);
  background-image: none;
}

.captcha-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.captcha-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.captcha-box input {
  flex: 1;
}
.captcha-box img {
  width: 120px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #f7f8fb;
}
:root[data-theme="dark"] .captcha-box img {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
}


.captcha-refresh {
  width: auto;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(47, 123, 255, 0.12);
  color: #2451b2;
  border: 1px solid rgba(47, 123, 255, 0.25);
  box-shadow: none;
}

.captcha-refresh:hover {
  transform: translateY(-1px);
}

:root[data-theme="dark"] .captcha-refresh {
  background: rgba(255, 255, 255, 0.12);
  color: #e7eefb;
  border-color: rgba(255, 255, 255, 0.2);
}

:root[data-theme="dark"] .auth-card {
  background: #0f192a;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

a {
  color: inherit;
  text-decoration: none;
}

.app {
  min-height: 100vh;
  display: flex;
  position: relative;
  overflow: hidden;
}

.app::before {
  content: "";
  position: fixed;
  inset: -20%;
  background: radial-gradient(circle at 20% 20%, rgba(47, 123, 255, 0.18), transparent 40%),
    radial-gradient(circle at 80% 10%, rgba(75, 209, 255, 0.2), transparent 45%),
    radial-gradient(circle at 60% 90%, rgba(0, 195, 138, 0.18), transparent 45%);
  z-index: -2;
  animation: floatBg 16s ease-in-out infinite;
}

.app::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(47, 123, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 123, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: -1;
}

:root[data-theme="dark"] .app::before {
  background: radial-gradient(circle at 20% 20%, rgba(76, 141, 255, 0.18), transparent 40%),
    radial-gradient(circle at 80% 10%, rgba(102, 224, 255, 0.18), transparent 45%),
    radial-gradient(circle at 60% 90%, rgba(26, 210, 161, 0.18), transparent 45%);
}

:root[data-theme="dark"] .app::after {
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

@keyframes floatBg {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-2%, 2%, 0); }
}

.sidebar {
  width: 250px;
  background: linear-gradient(160deg, #2f7bff 0%, #2a5bd7 50%, #163e9a 100%);
  color: #fff;
  padding: 24px 18px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 10px 0 30px rgba(15, 39, 92, 0.25);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.35);
  position: relative;
  overflow: hidden;
}

.brand-icon::after {
  content: "";
  position: absolute;
  width: 70%;
  height: 70%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  transform: rotate(15deg);
}

.brand-icon.has-logo::after {
  display: none;
}

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
  font-size: 14px;
}

.nav a.nav-active {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(4px);
}

.nav .nav-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.nav .nav-cta {
  margin-top: 10px;
  background: linear-gradient(120deg, #4bd1ff, #2f7bff);
  color: #fff;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(47, 123, 255, 0.3);
}

.content {
  flex: 1;
  padding: 28px 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-left: 250px;
}

.public-content {
  margin-left: 0;
  max-width: 1200px;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

:root[data-theme="dark"] .topbar {
  background: rgba(15, 25, 42, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
}

.topbar-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar .top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.user-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  min-width: 120px;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(47, 123, 255, 0.12);
  color: #2f7bff;
  font-weight: 600;
}

:root[data-theme="dark"] .user-avatar {
  background: rgba(102, 224, 255, 0.18);
  color: #9fd7ff;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-name {
  font-size: 12px;
  color: var(--muted);
}

main {
  display: grid;
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.5s ease both;
}

.progress-card {
  overflow-x: hidden;
  overflow-y: visible;
  min-width: 0;
}

:root[data-theme="dark"] .card {
  background: #0f192a;
  border-color: rgba(255, 255, 255, 0.08);
}

.card::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(47, 123, 255, 0.12), transparent 70%);
  opacity: 0.7;
}

.order-card::before {
  display: none;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.order-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.order-actions button {
  width: auto;
  min-width: 200px;
}

.shop-card .shop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.shop-card .shop-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.shop-body {
  display: grid;
  gap: 16px;
  grid-template-columns: 280px 1fr;
  align-items: stretch;
}

.shop-left, .shop-right {
  background: var(--bg-2);
  border-radius: 16px;
  padding: 12px;
  border: 1px dashed rgba(47, 123, 255, 0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

:root[data-theme="dark"] .shop-left,
:root[data-theme="dark"] .shop-right {
  background: #0c1628;
  border-color: rgba(255, 255, 255, 0.1);
}

.shop-left h3, .shop-right h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.shop-left-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shop-right-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.product-search {
  max-width: 220px;
}

.pill-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 420px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(47, 123, 255, 0.3);
  background: #fff;
  color: #24408f;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

:root[data-theme="dark"] .pill {
  background: #111f36;
  color: #d7e3ff;
  border-color: rgba(102, 224, 255, 0.25);
}

.pill.active {
  background: linear-gradient(120deg, #2f7bff, #4bd1ff);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(47, 123, 255, 0.25);
}

:root[data-theme="dark"] .pill.active {
  background: linear-gradient(120deg, #3b7cff, #5ad9ff);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(76, 141, 255, 0.35);
}

.product-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  height: 420px;
  max-height: 60vh;
  overflow: auto;
  padding-right: 6px;
}

.product-wrap {
  position: relative;
}

.product-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: grid;
  gap: 6px;
}

:root[data-theme="dark"] .product-card {
  background: #111f36;
  border-color: rgba(255, 255, 255, 0.08);
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(31, 47, 78, 0.12);
}

.product-card.active {
  border-color: rgba(47, 123, 255, 0.6);
  box-shadow: 0 12px 24px rgba(47, 123, 255, 0.2);
}

:root[data-theme="dark"] .product-card.active {
  border-color: rgba(102, 224, 255, 0.65);
  box-shadow: 0 14px 26px rgba(102, 224, 255, 0.18);
  background: linear-gradient(180deg, rgba(17, 31, 54, 0.95), rgba(14, 26, 44, 0.95));
}

.product-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  max-height: 36px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-price {
  color: #1f5cff;
  font-weight: 600;
}

.product-id {
  color: var(--muted);
  font-size: 12px;
}

.product-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.product-desc {
  color: var(--muted);
  font-size: 12px;
  max-height: 36px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.desc-box {
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: #2d3b50;
  font-size: 13px;
  line-height: 1.6;
}

:root[data-theme="dark"] .desc-box {
  background: #111f36;
  color: var(--ink);
}

.hidden {
  display: none;
}

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.avatar-settings {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(47, 123, 255, 0.08);
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 600;
  color: #2f7bff;
  overflow: hidden;
}

:root[data-theme="dark"] .avatar-preview {
  background: rgba(102, 224, 255, 0.12);
  color: #9fd7ff;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-form {
  display: grid;
  gap: 8px;
  max-width: 360px;
}

.product-line {
  grid-template-columns: minmax(320px, 2.2fr) minmax(160px, 0.9fr) minmax(160px, 0.9fr);
}

.product-line .product-main {
  min-width: 320px;
}

@media (max-width: 980px) {
  .product-line {
    grid-template-columns: 1fr;
  }
}

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

input, select, textarea, button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  transition: all 0.2s ease;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--select-arrow) 50%),
    linear-gradient(135deg, var(--select-arrow) 50%, transparent 50%),
    linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0));
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    100% 0;
  background-size: 6px 6px, 6px 6px, 2.6em 100%;
  background-repeat: no-repeat;
  padding-right: 38px;
}

select[multiple],
select[size] {
  background-image: none;
  padding-right: 12px;
}

select:focus {
  border-color: rgba(47, 123, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(47, 123, 255, 0.18);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  background: #111f36;
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.12);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(47, 123, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(47, 123, 255, 0.15);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

button {
  background: linear-gradient(120deg, #2f7bff, #4bd1ff);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 22px rgba(47, 123, 255, 0.25);
}

button.secondary {
  background: linear-gradient(120deg, #00c38a, #27e0b0);
  box-shadow: 0 10px 22px rgba(0, 195, 138, 0.25);
}

button.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(47, 123, 255, 0.4);
  box-shadow: none;
}

button:hover {
  transform: translateY(-1px);
}

.pay-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pay-option {
  width: auto;
  min-width: 140px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: none;
  position: relative;
}

.pay-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.4);
  border-style: dashed;
}

.pay-option.disabled .pay-icon {
  background: rgba(120, 120, 120, 0.12);
  color: #8891a1;
}

.pay-disabled-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: rgba(255, 120, 120, 0.18);
  color: #b33838;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 120, 120, 0.4);
  pointer-events: none;
}

.pay-option .pay-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(47, 123, 255, 0.1);
  color: #2f7bff;
}

.pay-option .pay-icon svg {
  width: 18px;
  height: 18px;
}

.pay-option.pay-option-active,
.pay-option.active {
  border-color: rgba(47, 123, 255, 0.6);
  box-shadow: 0 10px 20px rgba(47, 123, 255, 0.18);
  background: linear-gradient(120deg, rgba(47, 123, 255, 0.12), rgba(75, 209, 255, 0.12));
}

.pay-option .pay-alipay {
  color: #1677ff;
  background: rgba(22, 119, 255, 0.12);
}

.pay-option .pay-wxpay {
  color: #07c160;
  background: rgba(7, 193, 96, 0.12);
}

.pay-option .pay-balance {
  color: #6b7a92;
  background: rgba(107, 122, 146, 0.12);
}

.pay-option .pay-qqpay {
  color: #12b7f5;
  background: rgba(18, 183, 245, 0.12);
}

.pay-option .pay-bank {
  color: #ff8a00;
  background: rgba(255, 138, 0, 0.12);
}

.pay-option .pay-jdpay {
  color: #e60012;
  background: rgba(230, 0, 18, 0.12);
}

.pay-option .pay-paypal {
  color: #00457c;
  background: rgba(0, 69, 124, 0.12);
}

.pay-option .pay-generic {
  color: #2f7bff;
  background: rgba(47, 123, 255, 0.12);
}

.dashboard-wheels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.wheel-card {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
}

.wheel {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background:
    conic-gradient(var(--accent, #3c8aff) calc(var(--value) * 1%), rgba(15, 25, 46, 0.12) 0);
  display: grid;
  place-items: center;
  position: relative;
}

.wheel::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.wheel-inner {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  text-align: center;
}

.wheel-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
}

.wheel-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.ticket-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-top: 14px;
  background: #fff;
}

.ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ticket-messages {
  display: grid;
  gap: 10px;
}

.ticket-msg {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(47, 123, 255, 0.08);
  border: 1px solid rgba(47, 123, 255, 0.12);
}

.ticket-msg.from-admin {
  background: rgba(56, 211, 159, 0.12);
  border-color: rgba(56, 211, 159, 0.22);
}

.ticket-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.ticket-reply {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.ticket-reply textarea {
  min-height: 70px;
}

.ticket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ticket-detail {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

:root[data-theme="dark"] .ticket-detail {
  background: rgba(8, 14, 26, 0.7);
  border-color: rgba(102, 224, 255, 0.2);
}

.ticket-detail-head {
  margin-bottom: 12px;
  display: grid;
  gap: 6px;
}

.ticket-table td {
  white-space: nowrap;
}

.ticket-table td:nth-child(4) {
  white-space: normal;
  min-width: 220px;
}

.order-search {
  position: relative;
}

.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 25, 45, 0.12);
  max-height: 280px;
  overflow-y: auto;
  z-index: 1200;
  display: none;
}

.search-results.active {
  display: block;
}

.search-item {
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid rgba(47, 123, 255, 0.08);
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover {
  background: rgba(47, 123, 255, 0.08);
}

:root[data-theme="dark"] .search-results {
  background: rgba(9, 16, 30, 0.98);
  border-color: rgba(102, 224, 255, 0.22);
  box-shadow: 0 12px 40px rgba(2, 8, 18, 0.6);
}

:root[data-theme="dark"] .search-item {
  border-bottom-color: rgba(102, 224, 255, 0.1);
}

:root[data-theme="dark"] .search-item:hover {
  background: rgba(102, 224, 255, 0.12);
}

.ticket-image img {
  max-width: 260px;
  border-radius: 10px;
  margin-top: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: block;
}

:root[data-theme="dark"] .ticket-image img {
  border-color: rgba(255, 255, 255, 0.12);
}

:root[data-theme="dark"] .ticket-card {
  background: #0f1a2a;
  border-color: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .ticket-msg {
  background: rgba(47, 123, 255, 0.15);
  border-color: rgba(47, 123, 255, 0.24);
}

:root[data-theme="dark"] .ticket-msg.from-admin {
  background: rgba(56, 211, 159, 0.16);
  border-color: rgba(56, 211, 159, 0.28);
}

:root[data-theme="dark"] .wheel {
  background:
    conic-gradient(var(--accent, #3c8aff) calc(var(--value) * 1%), rgba(255, 255, 255, 0.08) 0);
}

:root[data-theme="dark"] .wheel::after {
  background: #0f1a2a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .pay-option {
  background: #111f36;
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}

:root[data-theme="dark"] .pay-option.disabled {
  opacity: 0.45;
  border-color: rgba(255, 255, 255, 0.08);
  background: #0b1626;
}

:root[data-theme="dark"] .pay-disabled-badge {
  background: rgba(255, 120, 120, 0.15);
  color: #ff9a9a;
  border-color: rgba(255, 120, 120, 0.35);
}

:root[data-theme="dark"] .pay-option.active {
  border-color: rgba(102, 224, 255, 0.6);
  box-shadow: 0 10px 20px rgba(102, 224, 255, 0.18);
  background: linear-gradient(120deg, rgba(102, 224, 255, 0.12), rgba(76, 141, 255, 0.12));
}

.theme-toggle {
  width: auto;
  padding: 6px 10px;
  font-size: 12px;
  background: rgba(47, 123, 255, 0.12);
  color: #2451b2;
  border: 1px solid rgba(47, 123, 255, 0.25);
  box-shadow: none;
  letter-spacing: 0;
}

:root[data-theme="dark"] .theme-toggle {
  background: rgba(255, 255, 255, 0.12);
  color: #e7eefb;
  border-color: rgba(255, 255, 255, 0.2);
}

.theme-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99;
  width: auto;
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(47, 123, 255, 0.9);
  color: #fff;
  border: none;
  box-shadow: 0 10px 20px rgba(31, 47, 78, 0.25);
}

:root[data-theme="dark"] .theme-fab {
  background: rgba(76, 141, 255, 0.9);
}

.result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(47, 123, 255, 0.25);
  background: rgba(47, 123, 255, 0.05);
  white-space: pre-wrap;
  font-family: "Fira Mono", "Cascadia Mono", monospace;
  font-size: 12px;
  color: #1f2c3b;
}

:root[data-theme="dark"] .result {
  border-color: rgba(102, 224, 255, 0.2);
  background: rgba(102, 224, 255, 0.06);
  color: var(--ink);
}

.inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px;
  border: 1px dashed rgba(47, 123, 255, 0.25);
  border-radius: 12px;
  background: rgba(47, 123, 255, 0.04);
}

:root[data-theme="dark"] .choice-group {
  border-color: rgba(102, 224, 255, 0.2);
  background: rgba(102, 224, 255, 0.04);
}

.choice-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

:root[data-theme="dark"] .choice-item {
  background: #111f36;
  border-color: rgba(255, 255, 255, 0.12);
}

.choice-item:hover {
  border-color: rgba(47, 123, 255, 0.45);
  box-shadow: 0 8px 16px rgba(47, 123, 255, 0.12);
}

.choice-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(47, 123, 255, 0.12);
  color: #2451b2;
  font-size: 12px;
}

:root[data-theme="dark"] .badge {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}

.badge.badge-danger {
  background: rgba(255, 90, 95, 0.14);
  color: #b13c3f;
}

:root[data-theme="dark"] .badge.badge-danger {
  background: rgba(255, 107, 107, 0.2);
  color: #ffb4b4;
}

.badge.badge-success {
  background: rgba(0, 195, 138, 0.16);
  color: #1a7b5f;
}

:root[data-theme="dark"] .badge.badge-success {
  background: rgba(26, 210, 161, 0.18);
  color: #b4ffe7;
}

.batch-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(47, 123, 255, 0.25);
  background: rgba(47, 123, 255, 0.04);
  display: grid;
  gap: 10px;
}

:root[data-theme="dark"] .batch-box {
  border-color: rgba(102, 224, 255, 0.18);
  background: rgba(102, 224, 255, 0.04);
}

.batch-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.is-hidden {
  display: none;
}

.course-panel {
  border: 1px dashed rgba(47, 123, 255, 0.25);
  background: rgba(47, 123, 255, 0.04);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 10px;
}

:root[data-theme="dark"] .course-panel {
  border-color: rgba(102, 224, 255, 0.2);
  background: rgba(102, 224, 255, 0.04);
}

.course-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.course-actions .inline-actions {
  flex-wrap: nowrap;
}

.course-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-height: 220px;
  overflow: auto;
  padding-right: 6px;
}

.course-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

:root[data-theme="dark"] .course-item {
  background: #111f36;
  border-color: rgba(255, 255, 255, 0.12);
}

.course-item:hover {
  border-color: rgba(47, 123, 255, 0.45);
  box-shadow: 0 10px 18px rgba(47, 123, 255, 0.12);
}

.course-check {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.course-body {
  display: grid;
  gap: 2px;
}

.course-title {
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.35;
  max-height: 34px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.course-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}

.progress-list {
  display: grid;
  gap: 10px;
}

.progress-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

:root[data-theme="dark"] .progress-item {
  background: #111f36;
  border-color: rgba(255, 255, 255, 0.12);
}

.progress-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.progress-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.progress-line {
  font-size: 12px;
  color: #2d3b50;
}

:root[data-theme="dark"] .progress-line {
  color: var(--ink);
}

.progress-panel {
  margin-top: 12px;
}

.account-card {
  display: grid;
  gap: 14px;
}

.account-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.account-head h2 {
  margin: 0;
}

.account-head .muted {
  margin: 6px 0 0;
  font-size: 12px;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(47, 123, 255, 0.08), rgba(75, 209, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

:root[data-theme="dark"] .stat-card {
  background: linear-gradient(120deg, rgba(102, 224, 255, 0.08), rgba(76, 141, 255, 0.12));
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
  margin-top: 6px;
}

.account-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.invite-row {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(200px, 1fr) minmax(280px, 2fr);
}

@media (max-width: 720px) {
  .invite-row {
    grid-template-columns: 1fr;
  }
}

.account-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.account-link {
  word-break: break-all;
  color: #1f5cff;
}

:root[data-theme="dark"] .account-link {
  color: #7ab3ff;
}

.account-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-link-row .account-link {
  flex: 1;
  min-width: 220px;
}

.qr-body {
  display: grid;
  gap: 10px;
  text-align: center;
}

.qr-body img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  margin: 0 auto;
  background: #fff;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
}

:root[data-theme="dark"] .qr-body img {
  background: #0b1220;
}

.copyable {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.copyable:hover {
  color: #1f5cff;
}

.modal-card.modal-lg {
  width: min(760px, 100%);
}

.tab-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tab-btn {
  width: auto;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(47, 123, 255, 0.3);
  background: rgba(47, 123, 255, 0.08);
  color: #2451b2;
  box-shadow: none;
}

.tab-btn.active {
  background: linear-gradient(120deg, #2f7bff, #4bd1ff);
  color: #fff;
  border-color: transparent;
}

:root[data-theme="dark"] .tab-btn {
  background: rgba(102, 224, 255, 0.12);
  border-color: rgba(102, 224, 255, 0.35);
  color: #cfe6ff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.level-list {
  display: grid;
  gap: 12px;
}

.level-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.level-item {
  position: relative;
  display: block;
  cursor: pointer;
  --tier-accent: #2f7bff;
  --tier-accent-2: #6aa7ff;
  --tier-soft: rgba(47, 123, 255, 0.18);
  --tier-glow: rgba(47, 123, 255, 0.25);
}

.level-item[data-tier="1"] {
  --tier-accent: #f4b41b;
  --tier-accent-2: #ffe29a;
  --tier-soft: rgba(244, 180, 27, 0.22);
  --tier-glow: rgba(244, 180, 27, 0.32);
}

.level-item[data-tier="2"] {
  --tier-accent: #4fc3f7;
  --tier-accent-2: #a5e8ff;
  --tier-soft: rgba(79, 195, 247, 0.22);
  --tier-glow: rgba(79, 195, 247, 0.32);
}

.level-item[data-tier="3"] {
  --tier-accent: #ff9f1c;
  --tier-accent-2: #ffd166;
  --tier-soft: rgba(255, 159, 28, 0.2);
  --tier-glow: rgba(255, 159, 28, 0.25);
}

.level-item[data-tier="4"] {
  --tier-accent: #ff6b6b;
  --tier-accent-2: #ff9aa2;
  --tier-soft: rgba(255, 107, 107, 0.2);
  --tier-glow: rgba(255, 107, 107, 0.25);
}

.level-item[data-tier="5"] {
  --tier-accent: #8a5cff;
  --tier-accent-2: #b892ff;
  --tier-soft: rgba(138, 92, 255, 0.2);
  --tier-glow: rgba(138, 92, 255, 0.25);
}

.level-item[data-tier="6"] {
  --tier-accent: #3d5a80;
  --tier-accent-2: #98c1d9;
  --tier-soft: rgba(61, 90, 128, 0.18);
  --tier-glow: rgba(61, 90, 128, 0.25);
}


.level-item.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.level-item.is-disabled .level-card {
  box-shadow: none;
  transform: none;
}

.level-item.is-disabled:hover .level-card {
  transform: none;
  box-shadow: none;
}

.level-badge.current {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(47, 123, 255, 0.12);
  color: #2b5cff;
}

:root[data-theme="dark"] .level-badge.current {
  background: rgba(255, 255, 255, 0.12);
  color: #bcd3ff;
}

.level-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.level-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
  border-radius: 16px;
  padding: 14px 14px 16px;
  display: grid;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 10px 22px rgba(31, 47, 78, 0.08);
}

.level-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 18%, var(--tier-soft), transparent 60%);
  opacity: 0.9;
}

.level-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  background: linear-gradient(120deg, var(--tier-accent), var(--tier-accent-2));
}

:root[data-theme="dark"] .level-card {
  background: linear-gradient(180deg, rgba(17, 31, 54, 0.98), rgba(14, 26, 44, 0.95));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 24px rgba(4, 12, 26, 0.45);
}

:root[data-theme="dark"] .level-card::before {
  opacity: 0.6;
}

.level-item:hover .level-card {
  transform: translateY(-2px);
  box-shadow: 0 16px 26px rgba(31, 47, 78, 0.14);
}

.level-item input:checked + .level-card {
  border-color: var(--tier-accent);
  box-shadow: 0 18px 30px var(--tier-glow);
  transform: translateY(-3px);
}

.level-item.selected-anim .level-card {
  animation: levelPop 0.35s ease;
}

@keyframes levelPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.level-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.level-title {
  font-weight: 600;
  font-size: 15px;
}

.level-price {
  font-weight: 700;
  font-size: 14px;
  color: var(--tier-accent);
}

.level-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.level-tag {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--tier-soft);
  color: var(--tier-accent);
}

:root[data-theme="dark"] .level-tag {
  background: rgba(255, 255, 255, 0.12);
  color: #e7eefb;
}

.level-meta {
  font-size: 12px;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.progress-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.progress-tools label {
  font-size: 12px;
  color: var(--muted);
  margin-right: 6px;
}

.progress-tools .select-wrap {
  position: relative;
  display: inline-block;
}

.progress-tools .select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #4c8dff;
  transform: translateY(-10%);
  pointer-events: none;
}

:root[data-theme="dark"] .progress-tools .select-wrap::after {
  border-top-color: #66e0ff;
}

.progress-tools select {
  height: 40px;
  min-width: 88px;
  border-radius: 14px;
  border: 1px solid rgba(76, 141, 255, 0.35);
  background-color: #ffffff;
  color: #1b2b46;
  padding: 0 32px 0 12px;
  appearance: none;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(76, 141, 255, 0.14);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  background-image: none;
  background-repeat: no-repeat;
}

.progress-tools select::-ms-expand {
  display: none;
}

:root[data-theme="dark"] .progress-tools select {
  appearance: none;
}

:root[data-theme="dark"] .progress-tools select::-webkit-listbox {
  background: #0f1a2d;
}

:root[data-theme="dark"] .progress-tools select option {
  background: #0f1a2d;
  color: #e7eefb;
}

:root:not([data-theme="dark"]) .progress-tools select option {
  background: #fff;
  color: #1b2b46;
}

:root:not([data-theme="dark"]) .progress-tools select:hover {
  border-color: rgba(76, 141, 255, 0.55);
  box-shadow: 0 12px 24px rgba(76, 141, 255, 0.2);
  transform: translateY(-1px);
}

:root:not([data-theme="dark"]) .progress-tools select:focus {
  outline: none;
  border-color: rgba(76, 141, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(76, 141, 255, 0.2), 0 12px 24px rgba(76, 141, 255, 0.2);
}

:root[data-theme="dark"] .progress-tools select {
  border-color: rgba(255, 255, 255, 0.2);
  background-color: #0f1a2d;
  color: #e7eefb;
  box-shadow: 0 10px 18px rgba(4, 12, 26, 0.45);
  background-image: none;
}

:root[data-theme="dark"] .progress-tools select option {
  background: #0f192a;
  color: #e7eefb;
}

:root[data-theme="dark"] .progress-tools select:hover {
  border-color: rgba(102, 224, 255, 0.5);
  box-shadow: 0 12px 22px rgba(4, 12, 26, 0.6);
  transform: translateY(-1px);
}

:root[data-theme="dark"] .progress-tools select:focus {
  outline: none;
  border-color: rgba(102, 224, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(102, 224, 255, 0.2), 0 12px 22px rgba(4, 12, 26, 0.6);
}

.progress-tools .pager-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-tools #progressPageInfo {
  min-width: 80px;
  text-align: center;
  color: var(--muted);
}


.progress-table-wrap {
  position: relative;
  border: 1px dashed rgba(47, 123, 255, 0.25);
  border-radius: 14px;
  background: rgba(47, 123, 255, 0.04);
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

:root[data-theme="dark"] .progress-table-wrap {
  border-color: rgba(102, 224, 255, 0.2);
  background: rgba(102, 224, 255, 0.04);
}

.progress-table-scroll {
  overflow: visible;
  width: 100%;
  display: block;
}

.progress-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 12.5px;
}

.progress-table th,
.progress-table td {
  border-bottom: 1px solid rgba(47, 123, 255, 0.1);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  background: rgba(255, 255, 255, 0.8);
  white-space: normal;
}

.progress-table thead th {
  color: var(--muted);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.95);
}

:root[data-theme="dark"] .progress-table th,
:root[data-theme="dark"] .progress-table td {
  background: rgba(17, 31, 54, 0.85);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.progress-table tbody tr:hover td {
  background: rgba(47, 123, 255, 0.06);
}

:root[data-theme="dark"] .progress-table tbody tr:hover td {
  background: rgba(102, 224, 255, 0.08);
}

@media (max-width: 900px) {
  .progress-table-wrap {
    overflow-x: auto;
  }

  .progress-table {
    min-width: 960px;
    width: max-content;
  }

  .progress-table th,
  .progress-table td {
    white-space: nowrap;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .table-wrap table {
    min-width: 960px;
    width: max-content;
  }

  .table-wrap th,
  .table-wrap td {
    white-space: nowrap;
  }
}

.td-strong {
  font-weight: 600;
}

.td-muted {
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(47, 123, 255, 0.12);
  color: #2451b2;
  white-space: nowrap;
}

.status-success {
  background: rgba(0, 195, 138, 0.16);
  color: #1a7b5f;
}

.status-info {
  background: rgba(47, 123, 255, 0.16);
  color: #2451b2;
}

.status-warn {
  background: rgba(255, 180, 0, 0.16);
  color: #9a6b00;
}

.status-danger {
  background: rgba(255, 90, 95, 0.18);
  color: #b13c3f;
}

.progress-ring {
  --p: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(#2f7bff calc(var(--p) * 1%), rgba(47, 123, 255, 0.12) 0);
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #2451b2;
}

.progress-ring span {
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

:root[data-theme="dark"] .progress-ring {
  background: conic-gradient(#66e0ff calc(var(--p) * 1%), rgba(102, 224, 255, 0.12) 0);
  color: #c8ecff;
}

:root[data-theme="dark"] .progress-ring span {
  background: #0f192a;
}

.action-wrap {
  position: relative;
}

.action-btn {
  width: auto;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 10px;
  background: rgba(47, 123, 255, 0.12);
  color: #2451b2;
  border: 1px solid rgba(47, 123, 255, 0.25);
  box-shadow: none;
}

.action-menu {
  position: absolute;
  top: 36px;
  right: 0;
  display: none;
  min-width: 140px;
  width: 160px;
  max-width: calc(100vw - 16px);
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(15, 35, 70, 0.18);
  z-index: 500;
  box-sizing: border-box;
}

.action-menu.action-menu-floating {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  z-index: 9999;
}

.action-menu.open {
  display: grid;
  gap: 6px;
}

.action-menu button {
  width: 100%;
  padding: 6px 8px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 12px;
  color: var(--ink);
  box-shadow: none;
}

.action-menu button:hover {
  background: rgba(47, 123, 255, 0.08);
}

:root[data-theme="dark"] .action-menu {
  background: #111f36;
  border-color: rgba(255, 255, 255, 0.12);
}

.progress-toast {
  display: none !important;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(47, 123, 255, 0.12);
  color: #2451b2;
  font-size: 12px;
  margin-bottom: 10px;
  white-space: pre-line;
  text-align: left;
}

.progress-toast:not(:empty) {
  display: inline-flex !important;
}

.progress-toast.success {
  background: rgba(0, 195, 138, 0.16);
  color: #1a7b5f;
}

.progress-toast.danger {
  background: rgba(255, 90, 95, 0.18);
  color: #b13c3f;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 42, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-card {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

:root[data-theme="dark"] .modal-card {
  background: #0f192a;
  border-color: rgba(255, 255, 255, 0.12);
}

.modal-head {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.modal-body {
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}



.rich-editor {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
  overflow: hidden;
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(47, 123, 255, 0.06);
}

.rich-toolbar button {
  width: auto;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink);
  box-shadow: none;
}

.rich-body {
  min-height: 140px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
}

.rich-body:focus {
  outline: none;
}

.notice-modal .notice-card {
  max-width: 720px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  border-radius: 20px;
  border: 1px solid rgba(47, 123, 255, 0.12);
  box-shadow: 0 20px 45px rgba(31, 47, 78, 0.18);
}

:root[data-theme="dark"] .notice-modal .notice-card {
  background: linear-gradient(180deg, #0f192a 0%, #0c1626 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

.notice-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px dashed var(--line);
  background: linear-gradient(120deg, rgba(47, 123, 255, 0.12), rgba(75, 209, 255, 0.08));
}

:root[data-theme="dark"] .notice-hero {
  background: linear-gradient(120deg, rgba(76, 141, 255, 0.18), rgba(102, 224, 255, 0.12));
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.notice-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(47, 123, 255, 0.16);
  color: #2451b2;
}

:root[data-theme="dark"] .notice-badge {
  background: rgba(102, 224, 255, 0.18);
  color: #cfe6ff;
}

.notice-hero-text {
  flex: 1;
  min-width: 0;
}

.notice-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.notice-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.notice-body {
  padding: 14px 18px 6px;
}

.notice-rich {
  white-space: pre-line;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

:root[data-theme="dark"] .notice-rich {
  background: #0f1a2d;
  border-color: rgba(255, 255, 255, 0.08);
}

.notice-rich h1,
.notice-rich h2,
.notice-rich h3 {
  margin: 0.4em 0;
}

.notice-rich p {
  margin: 0 0 0.6em;
}

.notice-rich ul,
.notice-rich ol {
  margin: 0.4em 0 0.6em 1.2em;
}

.notice-rich img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin: 8px 0;
}

.notice-rich table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.notice-rich th,
.notice-rich td {
  border-bottom: 1px dashed var(--line);
  padding: 10px 6px;
  text-align: left;
  font-size: 13px;
}

.notice-rich th {
  color: var(--muted);
  font-weight: 600;
}

.notice-list {
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  margin-top: 6px;
}

.notice-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

.notice-row:last-child {
  border-bottom: none;
}

.notice-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.notice-right {
  color: var(--muted);
}

.notice-tip {
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(47, 123, 255, 0.08);
  border: 1px dashed rgba(47, 123, 255, 0.4);
  font-size: 13px;
}

.notice-foot {
  display: flex;
  justify-content: center;
  gap: 12px;
}

@media (max-width: 640px) {
  .notice-row {
    grid-template-columns: 1fr;
  }

  .notice-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .notice-hero .modal-close {
    align-self: flex-end;
  }
}

.modal-foot {
  padding: 12px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  line-height: 1;
  width: auto;
  box-shadow: none;
  color: var(--muted);
}

.modal-form label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  display: block;
}

.detail-grid {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 rgba(47, 123, 255, 0); }
  50% { box-shadow: 0 0 12px rgba(47, 123, 255, 0.25); }
}

.table-wrap {
  overflow-x: auto;
  width: 100%;
  display: block;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  width: 100%;
  min-width: 0;
}

.table-wrap th,
.table-wrap td {
  white-space: normal;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  border-bottom: 1px solid rgba(47, 123, 255, 0.12);
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
}

tr.dragging {
  opacity: 0.6;
}

.drag-handle {
  cursor: grab;
  color: var(--muted);
  font-size: 16px;
  user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

.loading-tip {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.loading-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  pointer-events: none;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(47, 123, 255, 0.2);
  border-top-color: rgba(47, 123, 255, 0.85);
  animation: spin 0.9s linear infinite;
}


.switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.switch input {
  width: auto;
}

.settings-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 16px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.settings-grid .span-2 {
  grid-column: 1 / -1;
}

:root[data-theme="dark"] .loading-overlay {
  background: rgba(9, 16, 30, 0.6);
}

:root[data-theme="dark"] .loading-spinner {
  border-color: rgba(102, 224, 255, 0.2);
  border-top-color: rgba(102, 224, 255, 0.85);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 195, 138, 0.12);
  color: #0b7a5b;
  font-size: 12px;
}

:root[data-theme="dark"] .tag {
  background: rgba(26, 210, 161, 0.15);
  color: #9ff2db;
}

@media (max-width: 980px) {
  .sidebar {
    width: 88px;
    padding: 18px 12px;
  }
  .content {
    padding: 20px;
    margin-left: 88px;
  }
  .brand span,
  .nav .nav-text {
    display: none;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .shop-body {
    grid-template-columns: 1fr;
  }
  .shop-right-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .product-search {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 720px) {
  .app {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
    gap: 8px;
  }
  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .nav a {
    padding: 8px 10px;
    font-size: 13px;
  }
  .content {
    margin-left: 0;
    padding-top: 16px;
  }
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  overflow: visible;
}
.user-actions form {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  margin: 0;
  overflow: visible;
}
.user-actions input,
.user-actions select {
  height: 34px;
  width: auto;
}
.user-actions select {
  min-width: 120px;
  padding: 0 28px 0 10px;
  line-height: 32px;
}
.user-actions select option {
  white-space: nowrap;
}
.user-actions input {
  min-width: 90px;
}
.user-actions button {
  white-space: nowrap;
  width: auto !important;
}

.delete-user-btn {
  width: auto !important;
  max-width: fit-content !important;
}

/* 移动端优化 */
@media (max-width: 768px) {
  /* 登录页面优化 */
  .auth-shell {
    width: 95vw;
    padding: 16px;
    margin-top: 0;
    transform: none;
  }
  
  .auth-card {
    padding: 18px;
    gap: 12px;
  }
  
  .auth-brand {
    gap: 10px;
  }
  
  .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }
  
  .auth-title {
    font-size: 16px;
  }
  
  .auth-sub {
    font-size: 11px;
  }
  
  .auth-tabs .tab-btn {
    font-size: 12px;
    padding: 5px 10px;
  }
  
  .captcha-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .captcha-box {
    justify-content: space-between;
  }
  
  .captcha-box img {
    width: 100px;
    height: 36px;
  }
  
  /* 主内容区优化 */
  .content {
    padding: 16px;
  }
  
  .topbar {
    padding: 14px 16px;
    border-radius: 14px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  
  .topbar h1 {
    font-size: 18px;
  }
  
  .topbar p {
    font-size: 12px;
  }
  
  .topbar-right {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    width: auto;
  }
  
  .top-actions {
    width: auto;
    justify-content: flex-end;
    gap: 6px;
  }
  
  .top-actions button,
  .top-actions .badge {
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
  }
  
  .user-block {
    min-width: auto;
    gap: 4px;
  }
  
  .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .user-name {
    font-size: 11px;
  }
  
  /* 卡片优化 */
  .card {
    padding: 14px;
    border-radius: 14px;
  }
  
  .card h2 {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  /* 账户信息优化 */
  .account-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .account-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }
  
  .account-actions .badge {
    justify-content: center;
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
    text-align: center;
  }
  
  .account-summary {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .stat-card {
    padding: 12px;
  }
  
  .stat-label {
    font-size: 11px;
  }
  
  .stat-value {
    font-size: 18px;
  }
  
  .account-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .invite-row {
    grid-template-columns: 1fr;
  }
  
  .account-link-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .account-link {
    font-size: 11px;
    word-break: break-all;
  }
  
  /* 表格优化 */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  table {
    min-width: 600px;
    font-size: 12px;
  }
  
  table th,
  table td {
    padding: 8px 6px;
  }
  
  /* 模态框优化 */
  .modal-card {
    width: 95vw;
    max-width: 95vw;
    margin: 10px;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .modal-card.modal-lg {
    width: 95vw;
    max-width: 95vw;
  }
  
  .modal-head {
    padding: 14px 16px;
  }
  
  .modal-head h3 {
    font-size: 16px;
  }
  
  .modal-body {
    padding: 16px;
  }
  
  .modal-foot {
    padding: 12px 16px;
    gap: 8px;
  }
  
  .modal-foot button {
    flex: 1;
    padding: 10px 8px;
    font-size: 13px;
  }
  
  /* 等级列表优化 */
  .level-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .level-card {
    padding: 12px;
  }
  
  .level-title {
    font-size: 14px;
  }
  
  .level-price {
    font-size: 16px;
  }
  
  .level-tags {
    gap: 6px;
  }
  
  .level-tag {
    font-size: 11px;
    padding: 3px 8px;
  }
  
  .level-meta {
    font-size: 11px;
  }
  
  /* 支付选项优化 */
  .pay-options {
    gap: 8px;
  }
  
  .pay-option {
    min-width: calc(50% - 4px);
    padding: 8px 10px;
    font-size: 12px;
  }
  
  .pay-option .pay-icon {
    width: 24px;
    height: 24px;
  }
  
  /* 表单优化 */
  input, select, textarea, button {
    font-size: 14px;
    padding: 9px 10px;
  }
  
  label {
    font-size: 11px;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  /* 头像设置优化 */
  .avatar-settings {
    flex-direction: column;
    align-items: center;
  }
  
  .avatar-preview {
    width: 72px;
    height: 72px;
    font-size: 22px;
  }
  
  .avatar-form {
    width: 100%;
    max-width: 100%;
  }
  
  /* 商品网格优化 */
  .product-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .product-card {
    padding: 10px;
  }
  
  /* 仪表盘优化 */
  .dashboard-wheels {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .wheel {
    width: 120px;
    height: 120px;
  }
  
  .wheel-value {
    font-size: 22px;
  }
  
  /* Tab优化 */
  .tab-row {
    gap: 6px;
  }
  
  .tab-btn {
    font-size: 12px;
    padding: 7px 10px;
  }
  
  /* 结果提示优化 */
  .result {
    font-size: 12px;
    padding: 10px;
  }
  
  /* 进度提示优化 */
  .progress-toast {
    font-size: 12px;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  /* 超小屏幕优化 */
  .auth-shell {
    width: 98vw;
    padding: 12px;
  }
  
  .auth-card {
    padding: 16px;
  }
  
  .auth-tabs .tab-btn {
    font-size: 11px;
    padding: 5px 8px;
  }
  
  .account-summary {
    grid-template-columns: 1fr;
  }
  
  .account-actions .badge {
    min-width: 100%;
  }
  
  .pay-option {
    min-width: 100%;
  }
  
  .dashboard-wheels {
    grid-template-columns: 1fr;
  }
  
  .wheel {
    width: 140px;
    height: 140px;
  }
  
  .modal-card {
    width: 98vw;
    margin: 5px;
  }
  
  .topbar {
    padding: 12px;
    flex-wrap: wrap;
  }
  
  .topbar-title {
    flex: 1;
    min-width: 0;
  }
  
  .topbar h1 {
    font-size: 16px;
  }
  
  .topbar-right {
    flex-shrink: 0;
  }
  
  .top-actions {
    gap: 4px;
  }
  
  .top-actions button,
  .top-actions .badge {
    padding: 5px 8px;
    font-size: 11px;
  }
  
  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  
  .content {
    padding: 12px;
  }
  
  .card {
    padding: 12px;
  }
  
  table {
    font-size: 11px;
  }
  
  table th,
  table td {
    padding: 6px 4px;
  }
}

/* 横屏优化 */
@media (max-width: 768px) and (orientation: landscape) {
  .auth-page {
    min-height: auto;
    padding: 20px 0;
  }
  
  .auth-shell {
    margin-top: 0;
  }
  
  .modal-card {
    max-height: 85vh;
  }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
  button,
  .pay-option,
  .level-item,
  .tab-btn,
  .badge {
    min-height: 44px;
  }
  
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* 额外的移动端顶部栏优化 */
@media (max-width: 640px) {
  .topbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
  }
  
  .topbar-title {
    flex: 0 1 auto;
    min-width: 0;
    margin-right: 8px;
  }
  
  .topbar-title h1 {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }
  
  .topbar-title p {
    display: none;
  }
  
  .topbar-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  
  .top-actions {
    display: flex;
    flex-direction: row;
    gap: 4px;
  }
  
  .user-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
}

/* 修复导航栏间隙 */
@media (max-width: 720px) {
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
  }
  
  .app {
    min-height: 100vh;
    margin: 0;
    padding: 0;
  }
  
  .app::before,
  .app::after {
    display: none;
  }
  
  .sidebar {
    margin: 0;
    padding-top: 12px;
    box-shadow: 0 2px 8px rgba(15, 39, 92, 0.15);
  }
  
  .brand {
    margin-right: auto;
  }
}

/* 余额显示优化 */
.balance-badge::before {
  content: '¥';
  margin-right: 2px;
}

@media (max-width: 640px) {
  .balance-badge {
    font-weight: 600;
  }
}

/* 强制移除所有badge动画和阴影 */
.badge,
.account-actions .badge,
a.badge,
button.badge {
  animation: none !important;
  box-shadow: none !important;
  transition: none !important;
}

/* 移动端账户操作按钮强化间距 */
@media (max-width: 768px) {
  .account-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100%;
  }
  
  .account-actions .badge {
    width: 100%;
    margin: 0 !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    box-sizing: border-box;
    display: block !important;
    text-align: center;
  }
}

/* 彻底解决移动端顶部缝隙问题 - 往上提内容 */
@media (max-width: 768px) {
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: var(--bg) !important;
  }
  
  .app {
    margin-top: 0 !important;
  }
  
  .sidebar {
    margin: 0 !important;
    padding: 12px !important;
  }
  
  .content {
    margin-top: 0 !important;
    padding-top: 12px !important;
    gap: 12px !important;
  }
  
  .topbar {
    margin-top: 0 !important;
  }
  
  /* 让第一个元素紧贴 */
  main {
    gap: 12px !important;
  }
  
  main > *:first-child {
    margin-top: 0 !important;
  }
}

/* 移动端auth页面优化 */
@media (max-width: 768px) {
  .auth-page {
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* 强制移动端从顶部开始 */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari */
  @media (max-width: 768px) {
    html {
      height: -webkit-fill-available;
    }
    
    body {
      min-height: 100vh;
      min-height: -webkit-fill-available;
    }
  }
}

/* 移动端强制无缝隙 */
@media (max-width: 768px) {
  html {
    overflow-x: hidden;
  }
  
  body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }
  
  .app,
  .auth-page,
  .sidebar {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
}

:root[data-theme="dark"] body.auth-page {
  background: radial-gradient(circle at 20% 20%, rgba(76, 141, 255, 0.18), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(102, 224, 255, 0.18), transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(26, 210, 161, 0.16), transparent 50%),
    linear-gradient(180deg, #0b1220, #0f1a2e);
}
