/* ==========================================================================
   幸运轮盘 · 管理后台
   ========================================================================== */
:root {
  --bg: #f5eee2;
  --bg-deep: #efe3d2;
  --card: #fffdf9;
  --line: #eadcc4;
  --line-soft: #f2e8d8;
  --ink: #2f211a;
  --ink-2: #5f4937;
  --muted: #93806a;
  --gold: #c98a2c;
  --gold-strong: #ad6f18;
  --gold-soft: #f5e4c2;
  --red: #d34a45;
  --green: #4d9a64;
  --blue: #4b8fc4;
  --purple: #8d5dba;
  --shadow: 0 8px 26px rgba(88, 59, 31, 0.06);
  --font: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

/* 登录页 */
.login-screen {
  position: relative;
  min-height: 100vh;
  padding: 42px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(231, 167, 79, 0.22), transparent 34%),
    radial-gradient(circle at 84% 78%, rgba(189, 69, 54, 0.24), transparent 38%),
    radial-gradient(circle at 50% 40%, #3a2018 0%, #291411 48%, #1c0d0b 100%);
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    radial-gradient(rgba(255, 221, 154, 0.65) 0.6px, transparent 0.6px),
    radial-gradient(rgba(255, 221, 154, 0.45) 0.5px, transparent 0.5px);
  background-size: 22px 22px, 31px 31px;
  background-position: 0 0, 9px 11px;
  pointer-events: none;
}

.login-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(231, 177, 89, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-1 {
  width: 760px;
  height: 760px;
}

.ring-2 {
  width: 1040px;
  height: 1040px;
  border-style: dashed;
  opacity: 0.7;
}

.ring-3 {
  width: 620px;
  height: 620px;
  border-color: rgba(231, 177, 89, 0.1);
  box-shadow: 0 0 120px rgba(211, 116, 49, 0.1) inset;
}

.login-spark {
  position: absolute;
  color: rgba(255, 219, 138, 0.55);
  animation: login-twinkle 4s ease-in-out infinite;
}

.login-spark.s1 { left: 19%; top: 22%; font-size: 20px; }
.login-spark.s2 { right: 20%; top: 31%; font-size: 13px; animation-delay: 1.2s; }
.login-spark.s3 { left: 27%; bottom: 22%; font-size: 15px; animation-delay: 2.1s; }

@keyframes login-twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 0.9; transform: scale(1.14); }
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(420px, 100%);
  padding: 36px 34px 26px;
  border: 1px solid rgba(236, 197, 126, 0.48);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 240, 207, 0.9), transparent 46%),
    linear-gradient(180deg, #fffdf7, #fbf2e3);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.42),
    inset 0 0 0 5px rgba(255, 255, 255, 0.4);
  animation: login-in 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.12) both;
}

@keyframes login-in {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-brand {
  text-align: center;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px dashed #e7d2ad;
}

.brand-wheel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  margin-bottom: 12px;
  border-radius: 50%;
  color: #b67a21;
  background: radial-gradient(circle, #fff4d4, #f3d79b);
  box-shadow: 0 8px 20px rgba(173, 111, 24, 0.2), inset 0 0 0 1px #fff7e5;
}

.login-eyebrow {
  margin: 0 0 6px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #b28d58;
}

.login-brand h1 {
  margin: 0;
  font-size: 23px;
  letter-spacing: 0.5px;
  font-weight: 900;
  color: #6d3b0d;
}

.login-brand > p:last-child {
  margin: 6px 0 0;
  font-size: 12px;
  color: #9e7d55;
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #7a5a34;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #e5d1af;
  border-radius: 9px;
  background: rgba(255, 254, 250, 0.9);
  padding: 11px 12px;
  font-size: 13px;
  color: #3d2a1b;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #d2a04b;
  box-shadow: 0 0 0 3px rgba(210, 160, 75, 0.13);
}

.field textarea {
  resize: vertical;
  line-height: 1.65;
}

.login-form .field {
  margin-bottom: 15px;
}

.login-form .field input {
  height: 44px;
  background: #fffefb;
  font-size: 13.5px;
}

.login-error {
  margin: -4px 0 11px;
  padding: 8px 10px;
  border: 1px solid #f0c4be;
  border-radius: 7px;
  background: #fff3f1;
  color: #b63a34;
  font-size: 11.5px;
  line-height: 1.5;
}

.login-btn {
  width: 100%;
  height: 45px;
  border: 1px solid #d8a13c;
  border-radius: 9px;
  background: linear-gradient(180deg, #ffd878, #f0b33a 58%, #e09d26);
  color: #5f3402;
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: 2px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.48), 0 8px 18px rgba(176, 109, 12, 0.17);
  transition: filter 0.16s, transform 0.16s;
}

.login-btn:hover {
  filter: brightness(1.03);
}

.login-btn:active {
  transform: scale(0.985);
}

.login-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.login-hint {
  margin: 15px 0 0;
  padding: 9px 10px;
  border-radius: 7px;
  background: rgba(255, 247, 228, 0.7);
  font-size: 10.5px;
  line-height: 1.6;
  color: #98764e;
  text-align: center;
}

.login-hint b {
  color: #7f531c;
  font-family: var(--mono);
}

.login-back {
  display: block;
  margin-top: 15px;
  text-align: center;
  font-size: 11.5px;
  color: #a77d49;
  text-decoration: none;
}

.login-back:hover {
  color: #7f531c;
  text-decoration: underline;
}

.login-foot {
  position: relative;
  z-index: 2;
  margin: 20px 0 0;
  font-size: 9.5px;
  letter-spacing: 1px;
  color: rgba(255, 228, 178, 0.38);
}

/* 管理端结构 */
.admin-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 50;
  left: 0;
  top: 0;
  bottom: 0;
  width: 238px;
  padding: 0 15px 20px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 70% 0%, rgba(207, 130, 56, 0.18), transparent 32%),
    linear-gradient(180deg, #321c16 0%, #2a1512 48%, #1f0e0c 100%);
  border-right: 1px solid rgba(231, 177, 89, 0.18);
  color: #f3e4ca;
  box-shadow: 8px 0 30px rgba(35, 18, 13, 0.16);
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 217, 147, 0.7) 0.55px, transparent 0.55px);
  background-size: 9px 9px;
}

.brand {
  position: relative;
  z-index: 1;
  height: 84px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
  border-bottom: 1px solid rgba(235, 190, 118, 0.14);
}

.brand-mark {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #e4b35c;
  background: radial-gradient(circle, rgba(255, 224, 162, 0.14), rgba(255, 210, 119, 0.04));
  border: 1px solid rgba(231, 177, 89, 0.3);
}

.brand-text {
  min-width: 0;
}

.brand-text strong {
  display: block;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: #ffe8b8;
}

.brand-text span {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: 1.6px;
  color: rgba(244, 218, 173, 0.48);
}

.nav {
  position: relative;
  z-index: 1;
  flex: 1;
  padding-top: 17px;
}

.nav-label {
  margin: 0 10px 8px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(245, 219, 174, 0.34);
}

.nav-label-gap {
  margin-top: 24px;
}

.nav-item {
  position: relative;
  width: 100%;
  height: 43px;
  margin-bottom: 4px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(247, 228, 196, 0.67);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}

.nav-item:hover {
  color: #ffe8b8;
  background: rgba(255, 222, 157, 0.06);
}

.nav-item.active {
  color: #ffe9b9;
  background: linear-gradient(90deg, rgba(230, 171, 73, 0.2), rgba(230, 171, 73, 0.05));
  border-color: rgba(232, 180, 90, 0.22);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #f7d17d, #d9972e);
  box-shadow: 0 0 10px rgba(232, 171, 70, 0.5);
}

.nav-icon {
  width: 19px;
  text-align: center;
  font-size: 14px;
  filter: saturate(0.75);
}

.sidebar-foot {
  position: relative;
  z-index: 1;
  padding: 16px 8px 0;
  border-top: 1px solid rgba(235, 190, 118, 0.12);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.front-link {
  font-size: 10.5px;
  color: #d9b87c;
  text-decoration: none;
}

.front-link:hover {
  color: #ffe2a3;
  text-decoration: underline;
}

.sidebar-foot > span {
  font-size: 8.5px;
  letter-spacing: 0.8px;
  color: rgba(244, 218, 173, 0.3);
}

.main {
  margin-left: 238px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 6%, rgba(255, 235, 198, 0.55), transparent 25%),
    linear-gradient(180deg, #f8f2e8 0%, #f4ecdf 100%);
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 79px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(250, 246, 238, 0.9);
  border-bottom: 1px solid rgba(218, 200, 172, 0.62);
  backdrop-filter: blur(12px);
}

.page-heading h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #35231a;
}

.page-heading p {
  margin: 4px 0 0;
  font-size: 10.5px;
  color: #a08b72;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-chip {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #e6d3b2;
  border-radius: 15px;
  background: rgba(255, 253, 247, 0.8);
  font-size: 10.5px;
  font-weight: 700;
  color: #76583a;
}

.admin-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #58a66c;
  box-shadow: 0 0 0 3px rgba(88, 166, 108, 0.14);
}

.view-content {
  padding: 22px 30px 38px;
}

.view {
  animation: view-in 0.26s ease both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: filter 0.16s, background 0.16s, transform 0.16s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.985);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-primary {
  border-color: #d9a33d;
  background: linear-gradient(180deg, #ffd978, #efb139 60%, #dfa029);
  color: #633903;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 6px 13px rgba(179, 114, 15, 0.13);
}

.btn-primary:hover {
  filter: brightness(1.03);
}

.btn-ghost {
  border-color: #e6d4b7;
  background: rgba(255, 253, 248, 0.8);
  color: #785b39;
}

.btn-ghost:hover {
  background: #fff8ea;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 10.5px;
  border-radius: 7px;
}

.btn-xs {
  height: 27px;
  padding: 0 9px;
  font-size: 9.5px;
  border-radius: 6px;
}

.btn-danger {
  border-color: #ecc5c0;
  background: #fff6f4;
  color: #c1463f;
}

/* 卡片 */
.card {
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.card-head-wrap {
  flex-wrap: wrap;
}

.card-head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: 0.2px;
  color: #3b281d;
}

.card-head p {
  margin: 4px 0 0;
  font-size: 10.5px;
  line-height: 1.55;
  color: #a08a70;
}

.card-head p code {
  padding: 1px 4px;
  border-radius: 3px;
  background: #f6ecd9;
  font-family: var(--mono);
  font-size: 10px;
  color: #9b6c2a;
}

.head-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.link-more {
  flex: none;
  font-size: 10.5px;
  color: #b18142;
  text-decoration: none;
}

.link-more:hover {
  color: #8d5a10;
  text-decoration: underline;
}

/* 概览 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  position: relative;
  min-height: 118px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 19px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -36px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.06;
}

.stat-gold { color: #c08221; }
.stat-green { color: #428c58; }
.stat-red { color: #c34742; }
.stat-blue { color: #397fb5; }

.stat-icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: currentColor;
  font-size: 20px;
  filter: saturate(0.45);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.stat-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.stat-body span {
  font-size: 10.5px;
  font-weight: 700;
  color: #8e7a63;
}

.stat-body strong {
  margin-top: 3px;
  font-size: 29px;
  line-height: 1.1;
  font-weight: 900;
  color: #332218;
  font-variant-numeric: tabular-nums;
}

.stat-body em {
  margin-top: 5px;
  font-style: normal;
  font-size: 9px;
  color: #b09a80;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 15px;
  margin-top: 15px;
}

.dashboard-grid.wide-left {
  grid-template-columns: minmax(0, 1.65fr) minmax(270px, 0.85fr);
}

/* 趋势 */
.trend-chart {
  height: 205px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 8px 6px 0;
  border-bottom: 1px solid #f0e5d2;
}

.trend-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.trend-count {
  margin-bottom: 5px;
  font-size: 9px;
  font-weight: 700;
  color: #a78b69;
  font-variant-numeric: tabular-nums;
}

.bar-track {
  width: min(32px, 60%);
  height: 154px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, rgba(244, 231, 210, 0.22), rgba(244, 231, 210, 0.7));
}

.bar-fill {
  width: 100%;
  min-height: 4px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #f8d483, #e0a331);
  box-shadow: 0 2px 7px rgba(207, 146, 36, 0.24);
  transition: height 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.trend-col:last-child .bar-fill {
  background: linear-gradient(180deg, #f09c74, #d95a44);
}

.trend-label {
  margin-top: 7px;
  font-size: 9px;
  color: #a68d70;
}

/* 分布 */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 6px 2px 13px;
}

.donut {
  position: relative;
  width: 146px;
  height: 146px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(#eee1cc 0 100%);
  box-shadow: inset 0 0 0 1px rgba(214, 194, 162, 0.2);
}

.donut::before {
  content: "";
  position: absolute;
  inset: 19px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 0 0 1px rgba(236, 223, 201, 0.8);
}

.donut-center {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.donut-center b {
  font-size: 24px;
  font-weight: 900;
  color: #3d291d;
  font-variant-numeric: tabular-nums;
}

.donut-center small {
  font-size: 8.5px;
  color: #a48d73;
}

.donut-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  color: #7b644d;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
}

.legend-row b {
  margin-left: auto;
  color: #4b3422;
  font-size: 11px;
}

.legend-row span {
  color: #b19a80;
  font-size: 9px;
  min-width: 34px;
  text-align: right;
}

/* 库存 */
.stock-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 310px;
  overflow-y: auto;
  padding-right: 3px;
}

.stock-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
}

.stock-name {
  font-size: 10.5px;
  font-weight: 700;
  color: #5e4530;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stock-tag {
  font-size: 9px;
  color: #a58a6b;
  font-variant-numeric: tabular-nums;
}

.stock-track {
  grid-column: 1 / -1;
  height: 5px;
  border-radius: 4px;
  background: #f3e8d6;
  overflow: hidden;
}

.stock-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #f2c467, #dd9b2d);
}

.stock-fill.low {
  background: linear-gradient(90deg, #ef8b78, #cf4b43);
}

.stock-fill.unlimited {
  background: linear-gradient(90deg, #9acfa4, #4f9b63);
}

/* 表格 */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

.data-table th {
  padding: 9px 11px;
  text-align: left;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #9d876d;
  background: #faf5eb;
  border-top: 1px solid #f0e5d3;
  border-bottom: 1px solid #f0e5d3;
}

.data-table th:first-child {
  border-radius: 6px 0 0 6px;
}

.data-table th:last-child {
  border-radius: 0 6px 6px 0;
}

.data-table td {
  padding: 10px 11px;
  border-bottom: 1px solid #f4ebdc;
  color: #574231;
  vertical-align: middle;
}

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

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

.data-table.compact td {
  padding: 8px 11px;
}

.cell-time {
  color: #9b846b;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.cell-strong {
  font-weight: 700;
  color: #45301f;
}

.cell-muted {
  color: #a18b72;
  font-size: 10px;
}

.cell-code {
  font-family: var(--mono);
  font-size: 10.5px;
  color: #79532b;
  letter-spacing: 0.1px;
}

.thumb-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.prize-thumb-sm {
  width: 44px;
  height: 32px;
  flex: none;
  border-radius: 5px;
  object-fit: cover;
  background: #fff5ea;
  box-shadow: 0 0 0 1px rgba(219, 185, 148, 0.28);
}

.prize-name-cell b {
  display: block;
  font-size: 11.5px;
  color: #4a3320;
}

.prize-name-cell span {
  display: block;
  margin-top: 1px;
  font-size: 9px;
  color: #ad9579;
}

.rarity-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.rarity-tag.legend { background: #d8494c; }
.rarity-tag.epic { background: #8d5dba; }
.rarity-tag.rare { background: #4b90c4; }
.rarity-tag.common { background: #4a9860; }

.status-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
}

.status-tag.unused { background: #f1e9db; color: #8f7659; }
.status-tag.active { background: #e8f5ea; color: #408552; }
.status-tag.exhausted { background: #f8eee0; color: #b17c2b; }
.status-tag.void { background: #fbe9e6; color: #bb4b43; }
.status-tag.expired { background: #eeecf2; color: #7b7188; }

.row-actions {
  display: flex;
  gap: 5px;
}

.row-action {
  border: 0;
  background: transparent;
  padding: 2px 3px;
  color: #a87634;
  font-size: 10px;
  font-weight: 700;
}

.row-action:hover {
  color: #7d4f12;
  text-decoration: underline;
}

.row-action.danger {
  color: #bc5a51;
}

.table-empty {
  padding: 38px 12px !important;
  text-align: center;
  color: #ac957b;
  font-size: 11px;
}

/* 奖品配置 */
.prob-summary {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 11px 15px;
  border: 1px dashed #e5cc9e;
  border-radius: 9px;
  background: linear-gradient(90deg, #fffaf0, #fff7e7);
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-item span {
  font-size: 9px;
  color: #a08769;
}

.summary-item b {
  font-size: 16px;
  color: #6d4311;
  font-variant-numeric: tabular-nums;
}

.summary-tip {
  flex: 1;
  min-width: 200px;
  font-size: 9.5px;
  line-height: 1.6;
  color: #a48c70;
}

.prize-table td {
  vertical-align: middle;
}

.prize-table .prize-thumb-sm {
  width: 52px;
  height: 38px;
}

.inline-input,
.inline-select {
  height: 29px;
  border: 1px solid #e6d4b6;
  border-radius: 6px;
  background: #fffdf8;
  padding: 0 7px;
  font-size: 11px;
  color: #513923;
  outline: none;
}

.inline-input {
  width: 82px;
  font-family: var(--mono);
}

.inline-input.stock-input {
  width: 66px;
}

.inline-input.display-input {
  width: 74px;
  color: #a25f11;
}

.inline-select {
  width: 76px;
}

.inline-input:focus,
.inline-select:focus {
  border-color: #d1a04a;
  box-shadow: 0 0 0 2px rgba(209, 160, 74, 0.12);
}

.prob-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 61px;
  height: 23px;
  padding: 0 7px;
  border-radius: 12px;
  background: #fff4df;
  color: #b06f12;
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.prob-pill.zero {
  background: #f4efe7;
  color: #a99a88;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 34px;
  height: 20px;
  flex: none;
}

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

.switch-visual {
  width: 34px;
  height: 20px;
  border-radius: 11px;
  background: #e4d7c5;
  transition: background 0.18s;
  position: relative;
  cursor: pointer;
}

.switch-visual::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(72, 47, 24, 0.24);
  transition: transform 0.18s;
}

.switch input:checked + .switch-visual {
  background: #d6a039;
}

.switch input:checked + .switch-visual::after {
  transform: translateX(14px);
}

.table-note {
  margin: 12px 2px 0;
  font-size: 9.5px;
  line-height: 1.6;
  color: #a68f74;
}

/* 生成激活码 */
.generator-card {
  margin-bottom: 15px;
}

.gift-generator-card {
  margin-bottom: 15px;
  border-color: #dfbd7b;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(255, 221, 148, 0.34), transparent 44%),
    var(--card);
}

.gift-generator-form {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) 90px 170px 120px minmax(160px, 1fr) auto;
  gap: 11px;
  align-items: end;
}

.gift-generator-form .compact-field {
  margin-bottom: 0;
}

.gift-generator-form .compact-field .field-label {
  margin-bottom: 5px;
}

.gift-generator-form .compact-field input,
.gift-generator-form .compact-field select {
  height: 36px;
  padding: 0 10px;
  font-size: 11.5px;
}

.code-type-tag {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 6px;
  border-radius: 9px;
  font-size: 8.5px;
  font-weight: 800;
  white-space: nowrap;
}

.code-type-tag.normal {
  background: #f1e9db;
  color: #8f7659;
}

.code-type-tag.gift {
  background: linear-gradient(180deg, #ffe7a3, #f5c04f);
  color: #7b4308;
  border: 1px solid #e7bd63;
}

.gift-name-cell {
  max-width: 130px;
  margin-top: 2px;
  color: #ab7a2a;
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gift-result .gen-result-head b {
  color: #7c4b08;
}

.generator-form {
  display: grid;
  grid-template-columns: 100px 145px minmax(140px, 1fr) 120px minmax(160px, 1.2fr) auto;
  gap: 11px;
  align-items: end;
}

.compact-field {
  margin-bottom: 0;
}

.compact-field .field-label {
  margin-bottom: 5px;
}

.compact-field input,
.compact-field select {
  height: 36px;
  padding: 0 10px;
  font-size: 11.5px;
}

.gen-btn {
  height: 36px;
  min-width: 100px;
}

.gen-result {
  margin-top: 15px;
  padding: 13px 14px;
  border: 1px dashed #ddc08a;
  border-radius: 9px;
  background: #fffaf0;
  animation: view-in 0.25s ease both;
}

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

.gen-result-head b {
  font-size: 11.5px;
  color: #60401f;
}

.gen-result-head span {
  font-size: 9.5px;
  color: #a08666;
}

.gen-code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 6px;
  max-height: 126px;
  overflow-y: auto;
}

.gen-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 6px 7px;
  border-radius: 5px;
  background: #fffdf8;
  border: 1px solid #f0e2ca;
  font-family: var(--mono);
  font-size: 9.5px;
  color: #74502a;
}

.gen-code button {
  border: 0;
  background: transparent;
  color: #b18142;
  font-size: 8.5px;
  padding: 0;
}

.gen-code button:hover {
  color: #855414;
}

/* 筛选与分页 */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.filter-input,
.filter-select {
  height: 33px;
  border: 1px solid #e5d3b5;
  border-radius: 7px;
  background: #fffdf9;
  padding: 0 10px;
  font-size: 11px;
  color: #5a3f26;
  outline: none;
}

.filter-input {
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}

.filter-input:focus,
.filter-select:focus {
  border-color: #d1a04a;
  box-shadow: 0 0 0 2px rgba(209, 160, 74, 0.1);
}

.filter-select {
  min-width: 108px;
}

.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  margin-top: 13px;
  min-height: 25px;
}

.pager button {
  min-width: 27px;
  height: 27px;
  padding: 0 7px;
  border: 1px solid #e6d4b6;
  border-radius: 5px;
  background: #fffdf8;
  font-size: 9.5px;
  color: #75593a;
}

.pager button.active {
  background: #d8a33e;
  border-color: #d8a33e;
  color: #fff;
}

.pager button:disabled {
  opacity: 0.4;
}

.pager span {
  margin-left: 7px;
  font-size: 9px;
  color: #a58d71;
}

/* 设置 */
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 15px;
}

.info-card {
  grid-column: 1 / -1;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-form .field {
  margin-bottom: 0;
}

.settings-form > .btn {
  align-self: flex-start;
  min-width: 108px;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #eee0c9;
  border-radius: 8px;
  background: #fffbf3;
  cursor: pointer;
}

.switch-row > span:first-child {
  flex: 1;
}

.switch-row b {
  display: block;
  font-size: 11px;
  color: #5a3d24;
}

.switch-row small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  color: #a48b6e;
}

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

.switch-input + .switch-visual {
  display: inline-block;
}

.switch-input:checked + .switch-visual {
  background: #d6a039;
}

.switch-input:checked + .switch-visual::after {
  transform: translateX(14px);
}

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

.info-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 2px;
  border-bottom: 1px dashed #f0e2ca;
  font-size: 10.5px;
}

.info-list > div:last-child {
  border-bottom: 0;
}

.info-list span {
  color: #9a8368;
}

.info-list b {
  color: #654527;
  font-weight: 700;
}

.info-note {
  margin: 11px 0 0;
  padding: 9px 10px;
  border-radius: 7px;
  background: #fff8eb;
  font-size: 9.5px;
  line-height: 1.7;
  color: #9e8567;
}

/* 弹窗 / 提示 */
.admin-toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  z-index: 300;
  max-width: min(86vw, 420px);
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(42, 26, 18, 0.94);
  color: #fff7e7;
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 8px 24px rgba(29, 16, 10, 0.24);
}

.admin-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(39, 22, 17, 0.54);
  backdrop-filter: blur(3px);
}

.admin-modal-card {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  max-height: 84vh;
  overflow-y: auto;
  padding: 26px 22px 20px;
  border: 1px solid #e5c994;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf8, #fdf5e8);
  box-shadow: 0 22px 60px rgba(33, 17, 11, 0.35);
  animation: view-in 0.25s ease both;
}

.admin-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #a88a61;
  font-size: 23px;
  line-height: 1;
}

.modal-heading {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: #583511;
}

.modal-copy {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.7;
  color: #92785a;
}

.modal-code {
  margin: 14px 0;
  padding: 11px 12px;
  border: 1px dashed #e3c58d;
  border-radius: 8px;
  background: #fffaf0;
  font-family: var(--mono);
  font-size: 13px;
  color: #70491e;
  text-align: center;
  word-break: break-all;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.modal-actions .btn {
  flex: 1;
}

/* 轮盘选择器 */
.wheel-picker {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid #e3d0b0;
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.9);
}

.wheel-picker-label {
  flex: none;
  font-size: 9px;
  color: #a38a6d;
  letter-spacing: 0.2px;
}

.wheel-picker select {
  max-width: 180px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #69481f;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

/* 轮盘卡片 */
.wheels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 13px;
}

.wheel-card {
  position: relative;
  padding: 16px;
  border: 1px solid #eadcc4;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(255, 236, 200, 0.48), transparent 48%),
    linear-gradient(180deg, #fffdf8, #fdf6e9);
  box-shadow: 0 4px 14px rgba(87, 59, 31, 0.045);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.wheel-card.is-current {
  border-color: #d9ac58;
  box-shadow: 0 6px 20px rgba(172, 115, 31, 0.11), inset 0 0 0 2px rgba(232, 180, 90, 0.12);
}

.wheel-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.wheel-card-title {
  min-width: 0;
}

.wheel-card-title h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  color: #3b281b;
  line-height: 1.35;
}

.wheel-card-title p {
  margin: 3px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  color: #aa8b62;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wheel-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.wheel-badge {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 6px;
  border-radius: 8px;
  font-size: 8.5px;
  font-weight: 800;
  white-space: nowrap;
}

.wheel-badge.default {
  background: #fff2d3;
  color: #a8751d;
  border: 1px solid #edd09b;
}

.wheel-badge.active {
  background: #eaf6ec;
  color: #3e8854;
}

.wheel-badge.paused {
  background: #f7eee1;
  color: #b07b2a;
}

.wheel-hero {
  margin: 12px 0 10px;
  padding: 9px 10px;
  border-radius: 7px;
  background: rgba(255, 250, 239, 0.8);
  border: 1px dashed #eee0c9;
}

.wheel-hero b {
  display: block;
  font-size: 11px;
  color: #6c4725;
}

.wheel-hero span {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  color: #9d8364;
}

.wheel-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 11px;
}

.wheel-stat {
  padding: 7px 8px;
  border-radius: 6px;
  background: rgba(251, 244, 231, 0.75);
}

.wheel-stat span {
  display: block;
  font-size: 8px;
  color: #a78d70;
}

.wheel-stat b {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: #513720;
  font-variant-numeric: tabular-nums;
}

.wheel-url {
  display: flex;
  gap: 5px;
  margin-bottom: 9px;
}

.wheel-url input {
  flex: 1;
  min-width: 0;
  height: 28px;
  border: 1px solid #ecdfca;
  border-radius: 5px;
  background: #fffdf9;
  padding: 0 7px;
  font-family: var(--mono);
  font-size: 9px;
  color: #82613c;
  outline: none;
}

.wheel-url button {
  flex: none;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #e6d4b6;
  border-radius: 5px;
  background: #fffaf0;
  color: #9d7139;
  font-size: 9px;
  font-weight: 700;
}

.wheel-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.wheel-card-actions .btn,
.wheel-card-actions .row-action {
  height: 27px;
  padding: 0 8px;
  font-size: 9px;
}

.wheel-card-actions a {
  text-decoration: none;
}

/* 轮盘表单 */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 14px;
}

.form-grid .field {
  margin-bottom: 0;
}

.form-grid .field.full {
  grid-column: 1 / -1;
}

.field-hint {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.text-editor-details {
  margin-top: 9px;
  border: 1px solid #eadbc5;
  border-radius: 10px;
  background: #fdf8ee;
  overflow: hidden;
}

.text-editor-details summary {
  cursor: pointer;
  padding: 11px 13px;
  color: #7e561e;
  font-size: 12px;
  font-weight: 800;
  user-select: none;
}

.text-editor-details summary:hover {
  background: #fbf1dd;
}

.text-config-grid {
  display: grid;
  gap: 14px;
  padding: 12px 13px 15px;
  border-top: 1px solid #efe2cd;
}

.text-config-group h4 {
  margin: 0 0 8px;
  color: #a97925;
  font-size: 11px;
  letter-spacing: 1px;
}

.text-config-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 11px;
}

.text-config-field {
  display: block;
}

.text-config-field span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9.5px;
}

.text-config-field input {
  width: 100%;
  height: 33px;
  padding: 0 9px;
  border: 1px solid #e4d5bf;
  border-radius: 7px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 11px;
}

.text-config-field input:focus {
  border-color: #c89a4b;
  outline: none;
  box-shadow: 0 0 0 3px rgba(200, 154, 75, 0.12);
}

.form-grid .field input,
.form-grid .field select {
  height: 36px;
  font-size: 11.5px;
}

.form-grid .field textarea {
  font-size: 11.5px;
}

.form-hint {
  margin: 7px 0 0;
  font-size: 9.5px;
  line-height: 1.55;
  color: #a48b6e;
}

.form-hint code {
  padding: 1px 4px;
  border-radius: 3px;
  background: #f6ecd9;
  font-family: var(--mono);
  color: #9b6c2a;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 7px;
  background: #fff9ed;
  border: 1px solid #efe1c8;
  cursor: pointer;
}

.check-row input {
  margin-top: 1px;
  accent-color: #d29c3d;
}

.check-row b {
  display: block;
  font-size: 10.5px;
  color: #60401f;
}

.check-row small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.5;
  color: #a08769;
}

.modal-heading.compact {
  font-size: 15px;
}

.field-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field-split .field {
  margin-bottom: 0;
}

.field-split + .field {
  margin-top: 14px;
}

/* 新增奖品 */
.prize-upload {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 0;
}

.prize-upload-preview {
  width: 74px;
  height: 56px;
  flex: none;
  border: 1px dashed #dfc99f;
  border-radius: 7px;
  background: #fffaf0 center / cover no-repeat;
  display: grid;
  place-items: center;
  color: #b39a7b;
  font-size: 9px;
  overflow: hidden;
}

.prize-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prize-upload-actions {
  flex: 1;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #e3ca9e;
  border-radius: 6px;
  background: #fffaf0;
  color: #96692d;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.upload-btn input {
  display: none;
}

.upload-name {
  margin: 5px 0 0;
  font-size: 9px;
  color: #a99072;
  word-break: break-all;
}


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

  .generator-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gift-generator-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .generator-form .gen-btn {
    width: 100%;
  }
}

@media (max-width: 1060px) {
  .dashboard-grid,
  .dashboard-grid.wide-left {
    grid-template-columns: 1fr;
  }

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

  .info-card {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: 74px;
    padding: 0 8px 16px;
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand-text,
  .nav-label,
  .nav-item span:last-child,
  .sidebar-foot {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .nav-item.active::before {
    left: -8px;
  }

  .nav-icon {
    width: auto;
    font-size: 17px;
  }

  .main {
    margin-left: 74px;
  }

  .admin-topbar {
    padding: 0 20px;
  }

  .view-content {
    padding: 18px 20px 30px;
  }

  .generator-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gift-generator-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .sidebar {
    top: auto;
    bottom: 0;
    width: auto;
    height: 62px;
    padding: 0 6px max(0px, env(safe-area-inset-bottom));
    flex-direction: row;
    border-right: 0;
    border-top: 1px solid rgba(231, 177, 89, 0.2);
  }

  .brand,
  .sidebar-foot {
    display: none;
  }

  .nav {
    display: flex;
    width: 100%;
    padding: 7px 0;
    gap: 3px;
  }

  .nav-item {
    flex: 1;
    height: 48px;
    margin: 0;
    flex-direction: column;
    gap: 2px;
    font-size: 8.5px;
    border-radius: 7px;
  }

  .nav-item span:last-child {
    display: block;
    font-size: 7.5px;
    white-space: nowrap;
    letter-spacing: 0;
    overflow: hidden;
    text-overflow: clip;
  }

  .nav-item.active::before {
    left: 20%;
    right: 20%;
    top: auto;
    bottom: -7px;
    width: auto;
    height: 2px;
    border-radius: 2px 2px 0 0;
  }

  .main {
    margin-left: 0;
    padding-bottom: 70px;
  }

  .admin-topbar {
    height: 66px;
    padding: 0 14px;
  }

  .page-heading h1 {
    font-size: 17px;
  }

  .page-heading p {
    display: none;
  }

  .topbar-actions #topPreviewLink,
  .admin-chip {
    display: none;
  }

  .wheel-picker {
    padding: 0 7px;
  }

  .wheel-picker-label {
    display: none;
  }

  .wheel-picker select {
    max-width: 128px;
    font-size: 10px;
  }

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

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

  .view-content {
    padding: 14px 13px 26px;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .stat-card {
    min-height: 98px;
    padding: 13px;
    gap: 9px;
  }

  .stat-icon {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .stat-body strong {
    font-size: 22px;
  }

  .stat-body em {
    display: none;
  }

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

  .grow-field {
    grid-column: 1 / -1;
  }

  .dashboard-grid {
    gap: 11px;
    margin-top: 11px;
  }

  .card {
    padding: 14px;
  }

  .donut-wrap {
    flex-direction: column;
    gap: 14px;
  }

  .filter-input {
    max-width: none;
  }

  .modal-actions {
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .login-card {
    padding: 28px 20px 22px;
  }

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

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

  .text-config-fields {
    grid-template-columns: 1fr;
  }

  .grow-field {
    grid-column: auto;
  }

  .dashboard-grid,
  .dashboard-grid.wide-left {
    grid-template-columns: 1fr;
  }

  .wheel-picker select {
    max-width: 108px;
  }

  .page-heading h1 {
    font-size: 15px;
  }
}

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