: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;
}

* {
  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;
  font-family: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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;
}

.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);
}

.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;
}

.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;
}

: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;
}

.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);
}

: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.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;
  animation: glow 2.4s ease-in-out infinite;
}

: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-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding-right: 6px;
}

.course-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  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: 4px;
}

.course-title {
  font-weight: 600;
  font-size: 13px;
}

.course-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

@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;
}

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;
}

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;
}

: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;
  }
  .nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .content {
    margin-left: 0;
  }
}
