:root {
  --purple: #ff3b30;
  --purple-dark: #d91d18;
  --purple-soft: #fff0ee;
  --red: #ff3b30;
  --orange: #ff6847;
  --yellow: #ffbd14;
  --cream: #ffe0a5;
  --gray: #9da4b2;
  --ink: #171520;
  --muted: #5f6272;
  --line: #ffd2cc;
  --panel: #ffffff;
  --bg: #fff7f5;
  --shadow: 0 18px 46px rgba(255, 59, 48, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 59, 48, 0.14), transparent 20%),
    radial-gradient(circle at 84% 12%, rgba(255, 104, 71, 0.14), transparent 22%),
    linear-gradient(180deg, #fff 0%, #fff7f5 100%);
}

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

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  overflow: hidden;
}

.auth-visual {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(circle at 28% 26%, rgba(255, 59, 48, 0.18), transparent 24%),
    radial-gradient(circle at 70% 68%, rgba(255, 104, 71, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 59, 48, 0.18), transparent 48%),
    linear-gradient(215deg, rgba(255, 150, 106, 0.16), transparent 42%),
    #fff;
}

.auth-logo {
  position: absolute;
  top: 34px;
  right: 52px;
  z-index: 5;
  padding: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 18px 30px rgba(255, 59, 48, 0.22));
}

.ev-cloud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ev-logo {
  position: absolute;
  display: grid;
  place-items: center;
  gap: 10px;
  min-width: 240px;
  min-height: 170px;
  padding: 24px 28px;
  border: 2px solid rgba(255, 59, 48, 0.18);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 28px 60px rgba(255, 59, 48, 0.15);
  color: #181820;
  backdrop-filter: blur(14px);
}

.brand-img {
  display: block;
  width: 196px;
  height: 94px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.brand-fallback {
  display: none;
  place-items: center;
  min-width: 196px;
  min-height: 94px;
  padding: 0 12px;
  border-radius: 16px;
  color: var(--red);
  background: #fff3f1;
  font-size: 30px;
  font-weight: 1000;
}

.ev-logo.no-logo .brand-img {
  display: none;
}

.ev-logo.no-logo .brand-fallback {
  display: grid;
}

.ev-logo strong {
  font-size: 23px;
  font-weight: 1000;
}

.ev-logo.xiaomi .brand-img,
.ev-logo.aito .brand-img {
  width: 122px;
  height: 98px;
}

.ev-logo.tesla .brand-img {
  width: 150px;
  height: 110px;
}

.ev-logo.zeekr .brand-img,
.ev-logo.nio .brand-img,
.ev-logo.xpeng .brand-img {
  width: 216px;
}

.ev-logo.tesla {
  left: 7%;
  top: 21%;
  transform: rotate(-6deg);
}

.ev-logo.xiaomi {
  left: 36%;
  top: 19%;
  transform: rotate(5deg);
}

.ev-logo.aito {
  right: 9%;
  top: 34%;
  transform: rotate(-5deg);
}

.ev-logo.li {
  left: 25%;
  bottom: 11%;
  transform: rotate(4deg);
}

.ev-logo.xpeng {
  right: 23%;
  bottom: 10%;
  transform: rotate(-5deg);
}

.ev-logo.nio {
  left: 53%;
  bottom: 31%;
  transform: rotate(2deg);
}

.ev-logo.zeekr {
  left: 6%;
  bottom: 26%;
  transform: rotate(6deg);
}

.auth-card {
  align-self: center;
  justify-self: center;
  width: min(560px, calc(100vw - 30px));
  margin: 22px;
  padding: 34px 28px 28px;
  border: 2px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--purple);
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(46px, 5.4vw, 72px);
  line-height: 0.95;
  color: var(--purple);
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 50px);
  line-height: 1;
}

h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1;
}

.auth-copy {
  margin: 16px 0 24px;
  color: var(--muted);
  line-height: 1.8;
}

.auth-tabs,
.view-tabs {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--purple-soft);
}

.auth-tabs button,
.view-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  color: var(--purple);
  background: transparent;
  font-weight: 1000;
}

.auth-tabs button.active,
.view-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--purple), #ff6a3b);
  box-shadow: 0 10px 22px rgba(255, 59, 48, 0.22);
}

.auth-form {
  display: none;
  gap: 14px;
  margin-top: 18px;
}

.auth-form.active {
  display: grid;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 1000;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

textarea {
  resize: vertical;
  padding-top: 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.13);
}

.primary-button,
.ghost-button,
.close-dialog {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 1000;
}

.primary-button {
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), #ff6a3b);
  box-shadow: 0 12px 28px rgba(255, 59, 48, 0.24);
}

.ghost-button {
  padding: 0 16px;
  color: var(--purple);
  background: var(--purple-soft);
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.app {
  min-height: 100vh;
  padding: 18px;
}

.app-toolbar {
  width: min(1500px, calc(100vw - 24px));
  margin: 0 auto 14px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(720px, 960px) minmax(76px, 1fr);
  align-items: center;
  gap: 14px;
}

.user-chip {
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(255, 59, 48, 0.08);
}

.mini-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: var(--purple);
  font-weight: 1000;
}

.user-chip strong,
.user-chip span {
  display: block;
}

.user-chip span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.view-tabs {
  justify-self: center;
  width: min(960px, 100%);
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.view-tabs button {
  min-width: 0;
  padding: 0 18px;
  font-size: 16px;
  white-space: nowrap;
}

.app-toolbar .ghost-button {
  justify-self: end;
  min-width: 78px;
}

main {
  width: min(1500px, calc(100vw - 24px));
  margin: 0 auto;
}

.notice {
  min-height: 42px;
  margin-bottom: 12px;
}

.notice:empty {
  display: none;
}

.notice button {
  width: 100%;
  min-height: 42px;
  border: 1px solid #ffb4aa;
  border-radius: 999px;
  color: var(--purple-dark);
  background: #fff0ee;
  font-weight: 1000;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.reward-hero {
  position: relative;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 260px;
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
  padding: 24px;
  border: 2px solid #ffd2cc;
  border-radius: 30px;
  background:
    radial-gradient(circle at 22% 22%, rgba(255, 189, 20, 0.22), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(255, 59, 48, 0.14), transparent 26%),
    linear-gradient(135deg, #fff, #fff4f1);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.reward-hero::after {
  content: "BONUS";
  position: absolute;
  right: 26px;
  bottom: -18px;
  color: rgba(255, 59, 48, 0.07);
  font-size: 96px;
  font-weight: 1000;
}

.cute-avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.cute-avatar {
  position: relative;
  width: 182px;
  height: 182px;
  border: 7px solid #fff;
  border-radius: 38% 44% 42% 36%;
  background: linear-gradient(135deg, #ff3b30, #ffbd14);
  box-shadow: 0 24px 42px rgba(255, 59, 48, 0.22);
  overflow: hidden;
  transform: rotate(-3deg);
}

.cute-avatar::before,
.cute-avatar::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  z-index: 2;
}

.cute-avatar::before {
  left: 18px;
}

.cute-avatar::after {
  right: 18px;
}

.cute-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: saturate(1.1) contrast(1.04);
}

.cute-avatar span {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  color: #fff;
  font-size: 66px;
  font-weight: 1000;
}

.cute-avatar.missing img {
  display: none;
}

.cute-avatar.missing span {
  display: grid;
}

.avatar-sparkle {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: #ff3b30;
  font-weight: 1000;
  box-shadow: 0 12px 22px rgba(255, 59, 48, 0.22);
}

.avatar-sparkle.one {
  top: 8px;
  right: 14px;
}

.avatar-sparkle.two {
  left: 8px;
  bottom: 18px;
  background: #ff8a00;
}

.avatar-sparkle.three {
  right: 18px;
  bottom: 2px;
  background: #d91d18;
}

.reward-main h2 {
  color: var(--ink);
  font-size: clamp(30px, 4vw, 58px);
}

.total-bonus-card {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  background:
    linear-gradient(135deg, #ff3b30, #ff6a3b 56%, #ffbd14);
  box-shadow: 0 26px 54px rgba(255, 59, 48, 0.28);
}

.total-bonus-card span,
.total-bonus-card small {
  display: block;
  font-weight: 900;
}

.total-bonus-card strong {
  position: relative;
  display: block;
  width: fit-content;
  margin: 8px 0;
  font-size: clamp(48px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 5px 18px rgba(121, 18, 14, 0.28);
  transform-origin: left center;
}

.total-bonus-card small {
  opacity: 0.86;
}

.total-bonus-card strong.bonus-rolling {
  animation: bonusNumberPulse 0.36s ease-in-out infinite alternate;
}

.total-bonus-card strong.bonus-rolling::after {
  content: "";
  position: absolute;
  inset: -8px -18px;
  border-radius: 18px;
  background: linear-gradient(105deg, transparent 12%, rgba(255, 255, 255, 0.42) 45%, transparent 72%);
  transform: translateX(-120%);
  animation: bonusShine 0.72s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}

.total-bonus-card strong.bonus-up {
  text-shadow:
    0 0 16px rgba(255, 255, 255, 0.62),
    0 8px 24px rgba(121, 18, 14, 0.28);
}

.total-bonus-card strong.bonus-down {
  opacity: 0.92;
}

.total-bonus-card strong.bonus-settle {
  animation: bonusSettle 0.48s cubic-bezier(0.2, 1.7, 0.28, 0.98);
}

@keyframes bonusNumberPulse {
  from {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }

  to {
    transform: translateY(-3px) scale(1.025);
    filter: brightness(1.12);
  }
}

@keyframes bonusShine {
  0% {
    transform: translateX(-120%);
    opacity: 0;
  }

  30% {
    opacity: 1;
  }

  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

@keyframes bonusSettle {
  0% {
    transform: scale(1);
  }

  55% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

.reward-side {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.reward-side div {
  padding: 14px;
  border: 1px solid #ffd2cc;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
}

.reward-side span,
.reward-side strong {
  display: block;
}

.reward-side span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.reward-side strong {
  margin-top: 6px;
  color: var(--red);
  font-size: 24px;
}

.reward-breakdown-section {
  margin-bottom: 18px;
  padding: 22px;
  border: 2px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.customer-dashboard-section {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  padding: 28px;
  border: 2px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.customer-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: stretch;
}

.customer-board-card {
  min-height: 210px;
  padding: 22px;
  border: 1px solid #ffc1b8;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #fff8f7);
}

.customer-board-card > span,
.task-board-head span {
  color: var(--red);
  font-size: 24px;
  font-weight: 1000;
}

.level-pill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  height: 100%;
}

.level-pill {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 164px;
  padding: 24px;
  border-radius: 18px;
  color: #fff;
  box-shadow: 0 12px 24px rgba(255, 59, 48, 0.16);
}

.level-pill strong {
  font-size: 48px;
  font-weight: 1000;
}

.level-pill em {
  font-style: normal;
  font-size: 30px;
  font-weight: 1000;
}

.level-h {
  background: linear-gradient(135deg, #ff3b30, #ff8a00);
}

.level-b {
  background: linear-gradient(135deg, #ff6a3b, #ffb020);
}

.level-o {
  background: linear-gradient(135deg, #858b9c, #bbc1cd);
}

.task-board-card {
  display: grid;
  gap: 12px;
}

.task-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-board-head strong {
  color: var(--red);
  font-size: 34px;
  font-weight: 1000;
}

.task-list {
  display: grid;
  gap: 12px;
  max-height: 320px;
  overflow: auto;
}

.task-item {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #ffd8d2;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.task-item:hover {
  transform: translateY(-2px);
  border-color: var(--red);
  box-shadow: 0 14px 26px rgba(255, 59, 48, 0.1);
}

.task-item strong,
.task-item span,
.task-item p {
  margin: 0;
}

.task-item strong {
  color: var(--ink);
  font-size: 18px;
}

.task-item span {
  color: var(--red);
  font-size: 14px;
  font-weight: 1000;
}

.task-item p {
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.5;
}

.task-board-card .empty-state {
  display: grid;
  min-height: 126px;
  place-items: center;
  font-size: 18px;
  font-weight: 1000;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

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

.reward-item {
  min-width: 0;
  padding: 14px;
  border: 1px solid #ffd2cc;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #fff8f7);
  box-shadow: 0 10px 24px rgba(255, 59, 48, 0.07);
}

.reward-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #ff6a3b);
  font-weight: 1000;
}

.reward-item span,
.reward-item strong {
  display: block;
}

.reward-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.reward-item strong {
  margin-top: 8px;
  color: var(--ink);
  font-size: 22px;
}

.reward-item small {
  display: block;
  margin-top: 6px;
  color: var(--red);
  font-size: 11px;
  font-weight: 1000;
}

.calc-rule {
  display: grid;
  gap: 18px;
  margin-top: 14px;
  padding: 20px;
  border: 1px solid #ffc1b8;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 59, 48, 0.1), rgba(255, 104, 71, 0.06)),
    #fff;
}

.jump-progress-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.jump-progress-head strong,
.jump-progress-head span,
.jump-progress-head small {
  display: block;
}

.jump-progress-head strong {
  color: var(--red);
  font-size: 17px;
}

.jump-progress-head span {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 1000;
}

.jump-progress-head small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 1000;
  white-space: nowrap;
}

.jump-track {
  position: relative;
  height: 160px;
  margin: 4px 20px 8px;
}

.jump-track::before,
.jump-fill {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 108px;
  height: 12px;
  border-radius: 999px;
}

.jump-track::before {
  background: #ffe3df;
}

.jump-fill {
  right: auto;
  width: var(--progress);
  background: linear-gradient(90deg, var(--red), #ff9f1a);
  box-shadow: 0 10px 24px rgba(255, 59, 48, 0.22);
}

.jump-avatar {
  position: absolute;
  top: 2px;
  z-index: 4;
  width: 96px;
  height: 132px;
  transform: translateX(-50%);
  pointer-events: none;
}

.cartoon-marker {
  display: grid;
  place-items: center;
}

.cartoon-person {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 2;
  width: 88px;
  height: 112px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 14px 18px rgba(255, 59, 48, 0.18));
  transform-origin: 50% 96%;
  animation: cartoonHop 1.18s cubic-bezier(0.2, 0.72, 0.2, 1) infinite;
}

.cartoon-shadow {
  position: absolute;
  left: 25px;
  right: 25px;
  bottom: 18px;
  z-index: 0;
  height: 10px;
  border-radius: 50%;
  background: rgba(23, 21, 32, 0.14);
  filter: blur(1px);
  animation: cartoonShadow 1.18s cubic-bezier(0.2, 0.72, 0.2, 1) infinite;
}

.cartoon-puffs {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  z-index: 1;
  height: 24px;
}

.cartoon-puffs i {
  position: absolute;
  bottom: 0;
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 181, 122, 0.62);
  animation: cartoonPuff 1.18s ease-out infinite;
}

.cartoon-puffs i:nth-child(1) {
  left: 13px;
}

.cartoon-puffs i:nth-child(2) {
  left: 37px;
  width: 12px;
  height: 12px;
  animation-delay: 0.06s;
}

.cartoon-puffs i:nth-child(3) {
  right: 11px;
  animation-delay: 0.11s;
}

.cartoon-fallback {
  display: none;
  place-items: center;
  width: 70px;
  height: 70px;
  border: 5px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(160deg, var(--red), #ff8a00);
  box-shadow: 0 12px 26px rgba(255, 59, 48, 0.25);
  font-size: 24px;
  font-weight: 1000;
}

.runner-dust {
  position: absolute;
  left: 9px;
  right: 4px;
  bottom: 9px;
  height: 30px;
  z-index: 1;
}

.runner-dust i {
  position: absolute;
  bottom: 0;
  display: block;
  border-radius: 50%;
  background: rgba(255, 198, 174, 0.9);
  box-shadow: 0 4px 10px rgba(255, 59, 48, 0.12);
  animation: dustPuff 0.62s ease-out infinite;
}

.runner-dust i:nth-child(1) {
  left: 6px;
  width: 18px;
  height: 18px;
}

.runner-dust i:nth-child(2) {
  left: 24px;
  bottom: 3px;
  width: 24px;
  height: 24px;
  animation-delay: 0.08s;
}

.runner-dust i:nth-child(3) {
  left: 46px;
  width: 16px;
  height: 16px;
  animation-delay: 0.16s;
}

.runner-dust i:nth-child(4) {
  right: 20px;
  bottom: 2px;
  width: 22px;
  height: 22px;
  animation-delay: 0.24s;
}

.runner-dust i:nth-child(5) {
  right: 5px;
  width: 14px;
  height: 14px;
  animation-delay: 0.32s;
}

.runner-shadow {
  position: absolute;
  left: 31px;
  right: 22px;
  bottom: 16px;
  height: 12px;
  border-radius: 50%;
  background: rgba(23, 21, 32, 0.14);
  filter: blur(1px);
  animation: runnerShadow 0.42s ease-in-out infinite;
}

.runner-body {
  position: absolute;
  inset: 0;
  transform-origin: 50% 84%;
  animation: runnerBob 0.48s ease-in-out infinite;
}

.runner-head {
  position: absolute;
  left: 27px;
  top: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 5px solid #fff;
  border-radius: 48% 52% 46% 54% / 53% 51% 49% 47%;
  background: #fff;
  box-shadow:
    0 12px 26px rgba(255, 59, 48, 0.25),
    0 0 0 3px rgba(255, 59, 48, 0.12);
  overflow: hidden;
}

.runner-head::before {
  content: "";
  position: absolute;
  inset: -10px 4px auto;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  z-index: 2;
}

.runner-head img,
.runner-head span {
  width: 100%;
  height: 100%;
}

.runner-head img {
  object-fit: cover;
  filter: saturate(1.12) contrast(1.04);
}

.runner-head span {
  display: none;
  place-items: center;
  color: #fff;
  font-weight: 1000;
}

.runner-torso {
  position: absolute;
  left: 47px;
  top: 68px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  border: 4px solid #fff;
  border-radius: 16px 16px 13px 13px;
  background: linear-gradient(160deg, var(--red), #ff8a00);
  box-shadow: 0 12px 22px rgba(255, 59, 48, 0.2);
  transform: rotate(-7deg);
}

.runner-torso span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--red);
  background: #fff;
  font-size: 13px;
  font-weight: 1000;
}

.runner-arm,
.runner-leg {
  position: absolute;
  z-index: 2;
  display: block;
  border-radius: 999px;
  background: #ff6a3b;
  transform-origin: 50% 10%;
}

.runner-arm {
  left: 61px;
  top: 75px;
  width: 12px;
  height: 43px;
  border: 3px solid #fff;
  border-top: 0;
}

.runner-arm-front {
  z-index: 4;
  background: #ff3b30;
  animation: runnerArmFront 0.48s ease-in-out infinite;
}

.runner-arm-back {
  background: #ff9f1a;
  animation: runnerArmBack 0.48s ease-in-out infinite;
}

.runner-leg {
  left: 61px;
  top: 105px;
  width: 13px;
  height: 40px;
  border: 3px solid #fff;
  border-top: 0;
  transform-origin: 50% 8%;
}

.runner-leg::after {
  content: "";
  position: absolute;
  left: -5px;
  bottom: -4px;
  width: 26px;
  height: 10px;
  border-radius: 999px;
  background: #161520;
}

.runner-leg-front {
  z-index: 4;
  background: #ff3b30;
  animation: runnerLegFront 0.48s ease-in-out infinite;
}

.runner-leg-back {
  background: #ff9f1a;
  animation: runnerLegBack 0.48s ease-in-out infinite;
}

.jump-marker {
  position: absolute;
  top: 103px;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

.jump-marker i {
  width: 22px;
  height: 22px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #ffc7bf;
  box-shadow: 0 6px 14px rgba(255, 59, 48, 0.16);
}

.jump-marker span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 1000;
}

.jump-marker.passed i {
  background: var(--red);
}

.jump-marker.passed span {
  color: #fff;
  background: linear-gradient(135deg, var(--red), #ff6a3b);
}

@keyframes runnerBob {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg) scale(1);
  }

  50% {
    transform: translateY(-8px) rotate(3deg) scale(1.02);
  }
}

@keyframes runnerShadow {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 0.18;
  }

  50% {
    transform: scaleX(0.76);
    opacity: 0.1;
  }
}

@keyframes runnerArmFront {
  0%,
  100% {
    transform: rotate(54deg);
  }

  50% {
    transform: rotate(-52deg);
  }
}

@keyframes runnerArmBack {
  0%,
  100% {
    transform: rotate(-52deg);
  }

  50% {
    transform: rotate(54deg);
  }
}

@keyframes runnerLegFront {
  0%,
  100% {
    transform: rotate(-54deg);
  }

  50% {
    transform: rotate(50deg);
  }
}

@keyframes runnerLegBack {
  0%,
  100% {
    transform: rotate(50deg);
  }

  50% {
    transform: rotate(-54deg);
  }
}

@keyframes dustPuff {
  0% {
    opacity: 0;
    transform: translate(12px, 3px) scale(0.45);
  }

  35% {
    opacity: 0.92;
  }

  100% {
    opacity: 0;
    transform: translate(-22px, -8px) scale(1.22);
  }
}

@keyframes cartoonHop {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) rotate(-1deg) scale(1.04, 0.96);
  }

  16% {
    transform: translateX(-50%) translateY(-4px) rotate(1deg) scale(0.98, 1.03);
  }

  42% {
    transform: translateX(-50%) translateY(-18px) rotate(2.5deg) scale(0.97, 1.04);
  }

  70% {
    transform: translateX(-50%) translateY(-2px) rotate(-1.5deg) scale(1, 1);
  }
}

@keyframes cartoonShadow {
  0%,
  100% {
    opacity: 0.2;
    transform: scaleX(1.12);
  }

  42% {
    opacity: 0.08;
    transform: scaleX(0.72);
  }
}

@keyframes cartoonPuff {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.25);
  }

  12% {
    opacity: 0.72;
  }

  46% {
    opacity: 0;
    transform: translate(var(--puff-x, -10px), -10px) scale(1.25);
  }

  100% {
    opacity: 0;
  }
}

.cartoon-puffs i:nth-child(1) {
  --puff-x: -15px;
}

.cartoon-puffs i:nth-child(2) {
  --puff-x: 0;
}

.cartoon-puffs i:nth-child(3) {
  --puff-x: 15px;
}

@media (prefers-reduced-motion: reduce) {
  .cartoon-person,
  .cartoon-shadow,
  .cartoon-puffs i,
  .runner-dust i,
  .runner-shadow,
  .runner-body,
  .runner-arm-front,
  .runner-arm-back,
  .runner-leg-front,
  .runner-leg-back {
    animation: none;
  }
}

.ranking-section {
  margin-top: 18px;
}

.poster {
  border-radius: 28px;
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.poster-header {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 190px;
  align-items: center;
  gap: 12px;
  padding: 0 6px 10px;
}

.zz-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.zz-logo.right {
  justify-content: flex-end;
}

.zz-mark,
.zz-mark-img {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 16px rgba(255, 59, 48, 0.18));
}

.zz-mark-img {
  display: block;
  border-radius: 24px;
  object-fit: contain;
}

.zz-bg {
  fill: url("#zzGradient");
}

.zz-z {
  fill: #fff;
}

.zz-logo strong {
  font-size: 28px;
  font-weight: 1000;
}

.auth-logo .zz-mark,
.auth-logo .zz-mark-img {
  width: 146px;
  height: 146px;
}

.auth-logo strong {
  font-size: 52px;
}

.auth-card h1 {
  margin-bottom: 28px;
  font-size: 56px;
  line-height: 1.05;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.title-block {
  text-align: center;
}

.title-block p {
  margin: 0 0 2px;
  color: var(--purple);
  font-size: clamp(24px, 4vw, 56px);
  font-weight: 1000;
  line-height: 1;
}

.title-block h2 {
  color: var(--ink);
  font-size: clamp(50px, 6vw, 92px);
  font-weight: 1000;
}

.subtitle {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 8px;
  padding: 0 34px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 1000;
}

.poster-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.tier-board {
  display: grid;
  border: 2px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.tier-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  min-height: 158px;
  border-bottom: 2px solid #ffe0dc;
}

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

.tier-label {
  display: grid;
  place-items: center;
  padding: 12px;
  color: #fff;
  text-align: center;
  font-weight: 1000;
  position: relative;
  overflow: hidden;
}

.tier-label::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
}

.tier-label > div {
  position: relative;
  display: grid;
  gap: 8px;
  place-items: center;
}

.tier-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.95);
  font-size: 40px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.16);
}

.tier-name {
  font-size: 38px;
  line-height: 1;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.14);
}

.tier-champion {
  background: linear-gradient(180deg, #d71919, #9f1111);
}

.tier-king {
  background: linear-gradient(180deg, #ff2727, #ee1b1b);
}

.tier-top {
  background: linear-gradient(180deg, #ff9b16, #ff7500);
}

.tier-human {
  background: linear-gradient(180deg, #ffd02b, #ffb800);
}

.tier-npc {
  color: #222;
  background: linear-gradient(180deg, #ffe8b8, #ffd176);
}

.tier-done {
  background: linear-gradient(180deg, #c7ccd5, #8f97a5);
}

.tier-row-bottom .employee-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.employee-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  padding: 12px 16px;
}

.employee-card {
  position: relative;
  min-width: 0;
  min-height: 134px;
  border: 2px solid #ffd4cf;
  border-radius: 12px;
  padding: 8px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 6px;
  align-items: end;
  background: linear-gradient(180deg, #fff 0%, #fff8f7 100%);
  box-shadow: 0 7px 18px rgba(255, 59, 48, 0.08);
  overflow: hidden;
}

.employee-card.empty {
  visibility: hidden;
}

.employee-card.active-employee {
  border-color: var(--red);
  box-shadow: 0 9px 24px rgba(249, 35, 35, 0.18);
}

.employee-grid > .empty-state {
  grid-column: 1 / -1;
}

.employee-photo {
  position: relative;
  width: 82px;
  height: 112px;
  align-self: center;
  border: 2px solid #ffd4cf;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 9px 18px rgba(255, 59, 48, 0.1);
}

.employee-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.employee-photo span {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #ff6a3b);
  font-size: 32px;
  font-weight: 1000;
}

.employee-photo.missing img {
  display: none;
}

.employee-photo.missing span {
  display: grid;
}

.head {
  position: absolute;
  top: 2px;
  left: 17px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 56px;
  border-radius: 46% 46% 48% 48%;
  color: #231526;
  background: linear-gradient(180deg, #ffe2c7, #ffc29c);
  border: 2px solid rgba(83, 41, 19, 0.18);
  font-size: 22px;
  font-weight: 1000;
  z-index: 2;
}

.hair {
  position: absolute;
  top: -2px;
  left: 14px;
  width: 58px;
  height: 26px;
  border-radius: 50% 50% 42% 40%;
  background: #1d1a1c;
  z-index: 3;
}

.body {
  position: absolute;
  left: 15px;
  bottom: 14px;
  width: 58px;
  height: 50px;
  border-radius: 18px 18px 10px 10px;
  background: linear-gradient(180deg, #ff4a38, #d91d18);
  z-index: 1;
}

.body::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 9px;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 2px solid rgba(255, 255, 255, 0.72);
}

.gesture {
  position: absolute;
  right: -7px;
  top: 8px;
  z-index: 4;
  font-size: 24px;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.12));
}

.feet {
  position: absolute;
  left: 10px;
  bottom: 8px;
  width: 72px;
  height: 14px;
  border-radius: 50%;
  background: rgba(46, 39, 90, 0.16);
}

.emp-info {
  min-width: 0;
  padding-bottom: 2px;
}

.emp-info strong {
  display: block;
  font-size: 19px;
  font-weight: 1000;
  line-height: 1.1;
}

.score-line {
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.jump-badge {
  display: inline-flex;
  max-width: 100%;
  min-height: 28px;
  margin-top: 7px;
  padding: 0 10px;
  align-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #ff4d00);
  font-size: 14px;
  font-weight: 1000;
  white-space: nowrap;
}

.jump-badge.off {
  color: #454757;
  background: #eceef5;
}

.rules-panel {
  position: relative;
  min-height: 100%;
  padding: 20px;
  border-radius: 28px;
  border: 8px solid #ff5b4d;
  background:
    linear-gradient(180deg, rgba(255, 59, 48, 0.1), rgba(255, 59, 48, 0.02)),
    #fff;
  box-shadow: 0 18px 36px rgba(255, 59, 48, 0.18);
  overflow: hidden;
}

.rules-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.rules-title p {
  margin: 0 0 6px;
  color: var(--purple);
  font-size: 18px;
  font-weight: 1000;
}

.rules-title h3 {
  color: var(--purple-dark);
}

.cup {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #ffbd14, #ff7b00);
  font-size: 38px;
}

.jump-list {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.jump-item {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 98px;
}

.jump-no {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  color: #fff;
  font-size: 28px;
  font-weight: 1000;
  box-shadow: 0 10px 18px rgba(255, 59, 48, 0.18);
}

.jump-body {
  min-height: 88px;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px;
  display: grid;
  align-content: center;
  background: #fff;
  box-shadow: 0 9px 20px rgba(255, 59, 48, 0.08);
}

.jump-body strong {
  display: block;
  font-size: 21px;
  line-height: 1.2;
}

.jump-body span {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 1000;
}

.jump-body em {
  color: var(--red);
  font-style: normal;
  font-size: 26px;
}

.rules-car {
  position: absolute;
  right: 8px;
  bottom: 2px;
  width: 160px;
  opacity: 0.92;
}

.rules-car svg {
  fill: #ff5a42;
  stroke: #b51614;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rules-car circle {
  fill: #fff;
}

.rank-rule-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.rank-rule-list article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff8f7;
}

.rank-rule-list strong,
.rank-rule-list span {
  display: block;
}

.rank-rule-list strong {
  color: var(--red);
  font-size: 17px;
}

.rank-rule-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.poster-footer {
  display: flex;
  justify-content: center;
  padding: 14px 0 2px;
  color: var(--purple);
  font-size: 20px;
  font-weight: 1000;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
  gap: 16px;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
}

.admin-members-panel {
  min-width: 0;
}

.panel {
  border: 2px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.order-form,
.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.order-form .primary-button,
.admin-form .wide {
  grid-column: 1 / -1;
}

.customer-page {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 16px;
}

.customer-entry-panel,
.customer-table-panel {
  min-width: 0;
}

.customer-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.customer-entry-panel .locked-note {
  display: block;
}

.customer-period-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.customer-period-stats article {
  display: grid;
  gap: 6px;
  min-height: 76px;
  align-content: center;
  padding: 12px;
  border: 1px solid #ffc1b8;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fff8f7);
}

.customer-period-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
}

.customer-period-stats strong {
  color: var(--red);
  font-size: 30px;
  line-height: 1;
  font-weight: 1000;
}

.customer-form .customer-remark-field,
.customer-form .primary-button {
  grid-column: 1 / -1;
}

.customer-admin-tools {
  display: none;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed #ffb4aa;
  border-radius: 18px;
  background: #fff8f7;
}

.customer-admin-tools.active {
  display: grid;
}

.customer-table-wrap {
  overflow-x: auto;
  border: 1px solid #ffc1b8;
  border-radius: 18px;
  background: #fff8f7;
}

.customer-table {
  width: 100%;
  min-width: 1420px;
  border-collapse: collapse;
}

.customer-table th,
.customer-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #ffd8d2;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  vertical-align: top;
}

.customer-table th {
  color: var(--red);
  background: #fff0ee;
  white-space: nowrap;
}

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

.customer-row {
  cursor: pointer;
}

.customer-row:hover td {
  background: #fff4f2;
}

.customer-row.customer-closed td {
  color: #8f96a3;
  background: #f5f5f6;
}

.customer-row.customer-closed:hover td {
  background: #eeeeef;
}

.customer-level-badge {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 30px;
  border-radius: 999px;
  color: #fff;
  font-weight: 1000;
}

.customer-status-badge {
  display: inline-grid;
  place-items: center;
  min-width: 72px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-weight: 1000;
  white-space: nowrap;
}

.status-contact {
  color: var(--red);
  background: #fff0ee;
}

.status-hot {
  background: linear-gradient(135deg, var(--red), #ff951f);
}

.status-long {
  color: #6b7280;
  background: #f0f2f5;
}

.status-closed {
  color: #777f8d;
  background: #e5e7eb;
}

.customer-table td:nth-child(8),
.customer-table td:nth-child(10) {
  min-width: 220px;
  line-height: 1.6;
}

.task-cell {
  display: grid;
  gap: 4px;
  min-width: 170px;
}

.task-cell strong {
  color: var(--red);
  font-size: 12px;
}

.task-cell span,
.muted-cell {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.table-action {
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--red);
  background: #fff0ee;
  font-weight: 1000;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-action.danger {
  color: #9b1c18;
  background: #ffe4e0;
}

.secondary-button {
  min-height: 42px;
  border: 1px solid #ffc1b8;
  border-radius: 14px;
  color: var(--red);
  background: #fff0ee;
  font-size: 14px;
  font-weight: 1000;
}

.customer-detail-modal {
  position: relative;
  width: min(980px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  overflow: auto;
  padding: 24px;
  border: 2px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.lesson-modal {
  position: relative;
  width: min(1180px, calc(100vw - 32px));
  max-height: min(900px, calc(100vh - 32px));
  overflow: auto;
  padding: 28px;
  border: 2px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.lesson-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding-right: 52px;
}

.lesson-head h3 {
  font-size: clamp(32px, 4vw, 58px);
}

.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.lesson-meta span {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--red);
  background: #fff0ee;
  font-size: 12px;
  font-weight: 1000;
}

.lesson-original-link {
  display: inline-grid;
  place-items: center;
  min-width: 128px;
  padding: 0 16px;
  text-decoration: none;
}

.lesson-doc-body {
  display: grid;
  gap: 12px;
  margin: 22px 0;
  padding: 22px;
  border: 1px solid #ffc1b8;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #fff8f7);
}

.docx-paragraph {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.72;
}

.docx-heading {
  margin-top: 10px;
  color: var(--red);
  font-size: 22px;
  font-weight: 1000;
}

.docx-list-item::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--red);
  vertical-align: middle;
}

.docx-empty {
  min-height: 8px;
}

.docx-figure {
  margin: 8px 0;
  padding: 12px;
  border: 1px solid #ffe1dd;
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.docx-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(23, 21, 32, 0.08);
}

.docx-table-wrap {
  overflow: auto;
  border: 1px solid #ffc1b8;
  border-radius: 16px;
  background: #fff;
}

.docx-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.docx-table td {
  padding: 10px 12px;
  border: 1px solid #ffe1dd;
  vertical-align: top;
}

.lesson-actions {
  position: sticky;
  bottom: -28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px) minmax(180px, 220px);
  gap: 12px;
  align-items: center;
  padding: 16px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 24%);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--red);
  background: #fff0ee;
  font-size: 26px;
  font-weight: 1000;
}

.customer-detail-modal h3 {
  padding-right: 46px;
  font-size: 42px;
}

.quiz-modal {
  position: relative;
  width: min(1080px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  overflow: auto;
  padding: 28px;
  border: 2px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.quiz-modal h3 {
  padding-right: 48px;
  font-size: clamp(30px, 4vw, 54px);
}

.quiz-note,
.quiz-progress-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 1000;
}

.quiz-note {
  color: #9b1c18;
  background: #fff0ee;
}

.quiz-progress-note {
  color: var(--muted);
  background: #fff8f7;
}

.quiz-form {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.quiz-question {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 18px;
  border: 1px solid #ffc1b8;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #fff8f7);
}

.quiz-question legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 1000;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px;
  border: 1px solid #ffd2cc;
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.quiz-option:has(input:checked) {
  border-color: var(--red);
  color: var(--red);
  background: #fff0ee;
}

.customer-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 16px;
}

.customer-detail-meta span {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: #fff4f2;
  font-size: 12px;
  font-weight: 1000;
}

.customer-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.customer-detail-grid section,
.customer-log-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #ffc1b8;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #fff8f7);
}

.customer-detail-grid h4,
.customer-log-section h4 {
  margin: 0;
  color: var(--red);
  font-size: 18px;
}

.customer-log-section {
  margin-top: 14px;
}

.customer-log-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #ffd8d2;
  border-radius: 14px;
  background: #fff;
}

.customer-log-item strong {
  color: var(--red);
  font-size: 12px;
}

.customer-log-item p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.7;
}

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

.customer-summary-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fff8f7);
}

.customer-summary-card strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 1000;
}

.customer-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.customer-summary-card em {
  color: var(--red);
  font-style: normal;
  font-size: 16px;
  font-weight: 1000;
}

.inventory-panel {
  min-height: 640px;
}

.inventory-search {
  margin: 18px 0 10px;
}

.inventory-search input {
  width: 100%;
  min-height: 58px;
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 0 18px;
  color: var(--ink);
  background: #fff;
  font-size: 18px;
  font-weight: 900;
  outline: none;
}

.inventory-search input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 5px rgba(255, 59, 48, 0.08);
}

.inventory-count {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

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

.inventory-empty {
  grid-column: 1 / -1;
}

.inventory-card {
  display: grid;
  gap: 14px;
  min-height: 210px;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #fff8f7);
  box-shadow: 0 16px 34px rgba(255, 59, 48, 0.08);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.inventory-card:hover {
  transform: translateY(-3px);
  border-color: var(--red);
  box-shadow: 0 22px 44px rgba(255, 59, 48, 0.13);
}

.inventory-card-head {
  display: grid;
  gap: 8px;
}

.inventory-card-head strong {
  font-size: 20px;
  line-height: 1.25;
}

.inventory-card-head span {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--red);
  background: #fff0ee;
  font-size: 12px;
  font-weight: 1000;
}

.inventory-vin {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
}

.inventory-vin span,
.inventory-card-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.inventory-vin b {
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 0;
}

.inventory-vin em {
  color: var(--red);
  font-style: normal;
  font-size: 13px;
  font-weight: 1000;
}

.inventory-card-meta {
  display: grid;
  gap: 6px;
}

.playbook-panel {
  min-height: 640px;
}

.playbook-grid {
  display: grid;
  gap: 18px;
}

.training-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.training-overview-card,
.playbook-card {
  border: 2px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #fff8f7);
  box-shadow: 0 16px 34px rgba(255, 59, 48, 0.08);
}

.training-overview-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.training-overview-card span,
.playbook-card-head span {
  color: var(--red);
  font-size: 13px;
  font-weight: 1000;
}

.training-overview-card strong {
  font-size: 24px;
  line-height: 1.2;
}

.training-overview-card em {
  color: var(--muted);
  font-style: normal;
  font-weight: 1000;
}

.training-meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #ffe4e0;
}

.training-meter i {
  display: block;
  width: var(--meter);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #ff9b1a);
}

.training-card-list {
  display: grid;
  gap: 16px;
}

.playbook-card {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.playbook-card.done {
  border-color: rgba(255, 59, 48, 0.42);
  box-shadow: 0 18px 40px rgba(255, 59, 48, 0.13);
}

.playbook-card-head {
  display: grid;
  gap: 8px;
}

.playbook-card-head strong {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
}

.playbook-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.7;
}

.playbook-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.playbook-meta span {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--red);
  background: #fff0ee;
  font-size: 12px;
  font-weight: 1000;
}

.key-point-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.key-point-list li {
  padding: 12px 14px;
  border: 1px dashed #ffc1b8;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.55;
}

.playbook-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 12px;
  align-items: center;
}

.playbook-button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.training-status {
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--muted);
  background: #fff;
  font-weight: 1000;
}

.training-status.passed {
  color: var(--red);
  background: #fff0ee;
}

.training-admin-matrix {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #fff8f7);
}

.training-admin-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
}

.training-admin-head span {
  color: var(--red);
  font-size: 13px;
  font-weight: 1000;
}

.training-admin-head strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  line-height: 1.1;
}

.training-admin-head em {
  color: var(--muted);
  font-style: normal;
  font-weight: 1000;
}

.training-admin-table-wrap {
  overflow: auto;
}

.training-admin-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid #ffc1b8;
  border-radius: 16px;
  background: #fff;
}

.training-admin-table th,
.training-admin-table td {
  padding: 12px;
  border-bottom: 1px solid #ffe1dd;
  text-align: left;
  font-weight: 1000;
}

.training-admin-table th {
  color: var(--red);
  background: #fff0ee;
  font-size: 13px;
}

.training-admin-table small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.training-admin-status {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #f3f4f6;
  font-size: 12px;
}

.training-admin-status.read {
  color: #9b4b00;
  background: #fff4dc;
}

.training-admin-status.passed {
  color: var(--red);
  background: #fff0ee;
}

.inventory-detail-card {
  position: relative;
  width: min(1180px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  overflow: auto;
  padding: 28px;
  border: 2px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.inventory-detail-card h3 {
  padding-right: 52px;
  font-size: clamp(30px, 4vw, 54px);
}

.inventory-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 22px;
}

.inventory-detail-tags span {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--red);
  background: #fff0ee;
  font-size: 13px;
  font-weight: 1000;
}

.inventory-detail-section {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.inventory-detail-section h4 {
  margin: 0;
  color: var(--red);
  font-size: 22px;
}

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

.inventory-detail-field {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #ffd0ca;
  border-radius: 14px;
  background: #fff8f7;
  min-width: 0;
}

.inventory-detail-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
}

.inventory-detail-field strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.inventory-section-list {
  display: grid;
  gap: 12px;
}

.inventory-source-section {
  border: 1px solid #ffc1b8;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.inventory-source-section summary {
  padding: 13px 14px;
  color: var(--red);
  background: #fff0ee;
  font-size: 14px;
  font-weight: 1000;
  cursor: pointer;
}

.inventory-source-section .inventory-detail-grid {
  padding: 12px;
}

.bulk-box,
.excel-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #ffc1b8;
  border-radius: 18px;
  background: #fff8f7;
}

.bulk-box h3,
.excel-box h3 {
  font-size: 24px;
}

.bulk-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.7;
}

.bulk-box textarea {
  min-height: 190px;
  font-size: 13px;
  line-height: 1.6;
}

.excel-box input[type="file"] {
  padding: 12px;
  border: 1px dashed #ffb4aa;
  background: #fff;
}

.import-result {
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.6;
}

.my-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.my-stats div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff8f7;
}

.my-stats span,
.my-stats strong {
  display: block;
}

.my-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.my-stats strong {
  margin-top: 8px;
  color: var(--purple);
  font-size: 26px;
}

.recent-list,
.member-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.recent-item,
.member-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff8f7;
}

.member-editor {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.member-editor-head {
  grid-column: 1 / -1;
}

.member-editor label {
  gap: 5px;
  font-size: 12px;
}

.member-editor .admin-password-field {
  grid-column: span 2;
}

.member-editor input {
  min-height: 38px;
  border-radius: 10px;
  padding: 0 10px;
}

.permission-toggle {
  align-content: end;
}

.permission-toggle input[type="checkbox"] {
  width: 24px;
  min-height: 24px;
  accent-color: var(--red);
}

.permission-status {
  display: grid;
  gap: 5px;
  align-content: end;
  min-height: 38px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.permission-status strong {
  color: var(--red);
  font-size: 15px;
}

.formula-status {
  display: grid;
  gap: 3px;
  align-content: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #ffd0ca;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.formula-status strong {
  color: var(--red);
  font-size: 18px;
}

.formula-status small {
  color: var(--muted);
  font-size: 10px;
}

.auto-bonus-preview {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px dashed #ffb6ae;
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.auto-bonus-preview span {
  color: var(--red);
}

.auto-bonus-preview strong {
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff2ef;
  color: var(--black);
}

.self-permission-note {
  padding: 18px;
  background: #fff;
}

.save-member {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  padding: 0 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), #ff6a3b);
  font-weight: 1000;
}

.recent-item strong,
.member-item strong,
.recent-item span,
.member-item span {
  display: block;
}

.recent-item span,
.member-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.locked-note {
  display: none;
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  color: #7b1111;
  background: #ffecec;
  font-weight: 900;
}

.admin-locked .locked-note {
  display: block;
}

.admin-locked .admin-form,
.admin-locked .bulk-box,
.admin-locked .excel-box {
  opacity: 0.36;
  pointer-events: none;
}

dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(23, 21, 32, 0.45);
}

.result-card {
  position: relative;
  width: min(520px, calc(100vw - 30px));
  padding: 26px;
  border: 3px solid var(--purple);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.close-dialog {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  padding: 0;
  color: var(--purple);
  background: var(--purple-soft);
  font-size: 25px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.result-grid div {
  padding: 16px;
  border-radius: 16px;
  background: #fff8f7;
  border: 1px solid var(--line);
}

.result-grid span,
.result-grid strong {
  display: block;
}

.result-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.result-grid strong {
  margin-top: 8px;
  color: var(--red);
  font-size: 30px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  padding: 14px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), #ff6a3b);
  box-shadow: var(--shadow);
  font-weight: 1000;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  background: #fff8f7;
}

@media (max-width: 1180px) {
  .app-toolbar {
    grid-template-columns: minmax(180px, 1fr) minmax(0, 760px) minmax(70px, 1fr);
  }

  .view-tabs {
    grid-template-columns: repeat(5, minmax(88px, 1fr));
  }

  .view-tabs button {
    padding: 0 10px;
    font-size: 14px;
  }

  .poster-header {
    grid-template-columns: 1fr;
  }

  .zz-logo.right {
    display: none;
  }

  .poster-layout,
  .two-column,
  .customer-page,
  .customer-dashboard-grid,
  .admin-dashboard,
  .reward-hero,
  .training-overview,
  .auth-screen {
    grid-template-columns: 1fr;
  }

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

  .jump-progress-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .jump-progress-head small {
    white-space: normal;
  }

  .auth-visual {
    min-height: 340px;
  }

  .auth-logo {
    top: 18px;
    right: 18px;
  }

  .auth-logo .zz-mark,
  .auth-logo .zz-mark-img {
    width: 96px;
    height: 96px;
  }

  .auth-logo strong {
    font-size: 34px;
  }

  .auth-card h1 {
    font-size: 42px;
  }

  .ev-logo {
    min-width: 122px;
    min-height: 82px;
    padding: 10px 12px;
  }

  .brand-img,
  .brand-fallback {
    width: 92px;
    height: 44px;
  }

  .brand-fallback {
    min-width: 92px;
    min-height: 44px;
    font-size: 18px;
  }

  .ev-logo strong {
    font-size: 14px;
  }

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

  .playbook-actions,
  .playbook-button-row,
  .lesson-head,
  .lesson-actions,
  .quiz-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app {
    padding: 10px;
  }

  .app-toolbar {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .view-tabs {
    justify-self: stretch;
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(112px, 1fr));
    scrollbar-width: none;
  }

  .view-tabs::-webkit-scrollbar {
    display: none;
  }

  .app-toolbar .ghost-button {
    justify-self: stretch;
  }

  main {
    width: 100%;
  }

  .poster {
    padding: 10px;
    border-radius: 18px;
  }

  .subtitle {
    padding: 0 16px;
  }

  .tier-row {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .tier-name {
    font-size: 24px;
  }

  .tier-icon {
    width: 42px;
    height: 42px;
    font-size: 28px;
  }

  .employee-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .employee-card.empty {
    display: none;
  }

  .rules-panel {
    border-width: 4px;
  }

  .order-form,
  .admin-form,
  .customer-form,
  .customer-detail-grid,
  .customer-summary-grid,
  .my-stats,
  .result-grid,
  .member-editor,
  .reward-hero,
  .reward-grid {
    grid-template-columns: 1fr;
  }

  .reward-hero {
    padding: 16px;
  }

  .cute-avatar {
    width: 150px;
    height: 150px;
  }
}
