:root {
  color-scheme: light;
  --ink: #102a43;
  --body: #334155;
  --muted: #64748b;
  --line: #dfe8ee;
  --paper: #ffffff;
  --page: #f5fbfa;
  --soft: #eefbf8;
  --teal: #12bfb3;
  --teal-dark: #008f86;
  --gold: #ffb020;
  --red: #ef4444;
  --shadow: 0 18px 44px rgba(15, 42, 67, 0.1);
  --shadow-soft: 0 10px 28px rgba(15, 42, 67, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 24% 12%, rgba(18, 191, 179, 0.14), transparent 28%),
    linear-gradient(135deg, #f7fbfb 0%, #eefaf8 100%);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  font-size: 15px;
  line-height: 1.48;
}

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

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.login-screen[hidden],
.affiliate-app[hidden],
.auth-panel[hidden],
.account-completion-panel[hidden],
[data-account-phone-fields][hidden],
[data-sms-login-field][hidden],
[data-local-dev-login-field][hidden] {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  padding: clamp(24px, 5vw, 72px);
  display: grid;
  place-items: center;
}

.login-card {
  width: min(980px, 100%);
  display: grid;
  gap: 18px;
}

.login-brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 820;
}

.login-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.affiliate-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid rgba(223, 232, 238, 0.78);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
}

.brand {
  width: 104px;
  margin: 0 10px;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav__item {
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 680;
}

.side-nav__item:hover,
.side-nav__item.is-active {
  color: var(--teal-dark);
  border-color: rgba(18, 191, 179, 0.22);
  background: rgba(18, 191, 179, 0.09);
}

.sidebar__notice {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(18, 191, 179, 0.2);
  border-radius: 8px;
  background: #f2fffc;
}

.sidebar__notice span,
.sidebar__notice strong {
  display: block;
}

.sidebar__notice span {
  color: var(--muted);
  font-size: 12px;
}

.sidebar__notice strong {
  margin-top: 4px;
  color: var(--teal-dark);
  font-size: 16px;
}

.workspace {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 28px clamp(22px, 4vw, 48px) 56px;
}

.topbar {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow,
.panel__label {
  margin: 0 0 5px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.12;
}

.account {
  min-width: 190px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.account span,
.account strong {
  display: block;
}

.account span {
  color: var(--muted);
  font-size: 12px;
}

.account strong {
  color: var(--ink);
  font-size: 16px;
}

.account__logout {
  margin-top: 8px;
}

.auth-panel {
  margin-bottom: 20px;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 20px;
  align-items: center;
  border: 1px solid rgba(18, 191, 179, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.auth-panel h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.auth-panel p {
  margin-bottom: 0;
  color: var(--body);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.auth-divider[hidden],
.wechat-login-action[hidden] {
  display: none !important;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  background: var(--line);
  content: "";
}

.wechat-login-action {
  min-height: 46px;
  border: 1px solid rgba(7, 193, 96, 0.32);
  border-radius: 8px;
  color: #087f45;
  background: #f1fff7;
  font-weight: 760;
}

.wechat-login-action:hover {
  border-color: rgba(7, 193, 96, 0.55);
  background: #e8fff1;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--body);
  font-size: 14px;
  font-weight: 680;
}

.auth-form label > small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

.auth-form input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f8fcfb;
}

.login-screen .auth-panel {
  min-height: 432px;
  margin-bottom: 0;
  padding: clamp(24px, 4vw, 38px);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 410px);
  gap: clamp(24px, 5vw, 54px);
  border-color: rgba(18, 191, 179, 0.2);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(15, 42, 67, 0.14);
}

.login-screen .auth-panel h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
}

.login-screen .auth-panel p {
  max-width: 380px;
  font-size: 15px;
  line-height: 1.8;
}

.login-screen .auth-form {
  padding: 18px;
  border: 1px solid rgba(223, 232, 238, 0.9);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.auth-form .remember-device {
  min-height: 54px;
  padding: 12px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  border: 1px solid rgba(18, 191, 179, 0.18);
  border-radius: 8px;
  background: #f2fffc;
}

.platform-legal-consent {
  min-height: 44px;
  padding: 10px 12px;
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px !important;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcfb;
  font-size: 12px !important;
  font-weight: 560 !important;
  line-height: 1.6;
}

.platform-legal-consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--teal);
}

.platform-legal-consent a {
  color: var(--teal-dark);
  font-weight: 720;
  text-decoration: none;
}

.platform-legal-consent a:hover {
  text-decoration: underline;
}

.account-completion-panel [data-account-phone-fields] {
  display: grid;
  gap: 12px;
}

.auth-form .remember-device input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--teal);
}

.remember-device span {
  display: grid;
  gap: 3px;
}

.remember-device strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.remember-device small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.45;
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.primary-action:disabled,
.secondary-action:disabled {
  cursor: not-allowed;
  color: #8aa1af;
  background: #e6f2f0;
  box-shadow: none;
}

.hero-panel {
  min-height: 300px;
  margin-bottom: 20px;
  padding: clamp(22px, 3.4vw, 34px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: center;
  gap: clamp(24px, 4vw, 44px);
  border: 1px solid rgba(223, 232, 238, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 255, 252, 0.96) 100%),
    #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-panel.is-hidden {
  display: none;
}

.status-pill {
  width: fit-content;
  min-height: 28px;
  padding: 4px 11px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(18, 191, 179, 0.12);
  font-size: 12px;
  font-weight: 740;
}

.status-pill--word {
  color: #1d4ed8;
  background: #e8f0ff;
}

.hero-panel h2 {
  max-width: 690px;
  margin: 12px 0 12px;
  font-size: clamp(28px, 4.3vw, 46px);
  line-height: 1.1;
  font-weight: 820;
}

.hero-panel p {
  max-width: 650px;
  margin-bottom: 20px;
  color: var(--body);
  font-size: 16px;
}

.hero-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-action,
.secondary-action {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 760;
}

.primary-action {
  color: #ffffff;
  background: var(--teal);
  box-shadow: 0 16px 32px rgba(18, 191, 179, 0.24);
}

.primary-action:hover {
  background: var(--teal-dark);
}

.secondary-action {
  color: var(--ink);
  border-color: var(--line);
  background: #ffffff;
}

.secondary-action:disabled {
  cursor: not-allowed;
  color: #8aa1af;
  background: #eef5f4;
}

.primary-action--small,
.secondary-action--small {
  min-height: 36px;
  padding: 0 13px;
}

.hero-card,
.panel,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.hero-card {
  padding: 22px;
}

.hero-card__head,
.hero-card__code,
.hero-card__stats {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.hero-card__head {
  align-items: flex-start;
}

.hero-card__head span,
.hero-card__code span,
.hero-card__stats span,
.metric-card span,
.metric-card em,
.profile-list dt {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.hero-card__head strong {
  font-size: 26px;
  line-height: 1.15;
}

.hero-card__code {
  margin-top: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-card__code span:last-child,
.table__row strong {
  color: var(--teal-dark);
}

.hero-card__meter {
  height: 8px;
  margin: 18px 0;
  border-radius: 999px;
  background: rgba(18, 191, 179, 0.12);
  overflow: hidden;
}

.hero-card__meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.hero-card__stats div {
  width: 48%;
  padding: 12px;
  border-radius: 8px;
  background: #f6fbfa;
}

.hero-card__stats--compact {
  margin-top: 12px;
}

.hero-card__stats strong {
  display: block;
  font-size: 22px;
}

.screen-section {
  display: none;
}

.screen-section.is-active {
  display: block;
}

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

.earnings-summary-grid {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.earnings-forecast {
  margin-bottom: 20px;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  gap: 18px;
  align-items: start;
  background:
    linear-gradient(135deg, rgba(232, 255, 251, 0.96), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.earnings-forecast h3 {
  margin-bottom: 7px;
  font-size: 23px;
  line-height: 1.2;
}

.earnings-forecast p {
  max-width: 620px;
  margin: 0;
  color: var(--body);
  font-size: 13px;
  line-height: 1.65;
}

.earnings-forecast > strong {
  justify-self: end;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
}

.earnings-forecast__breakdown {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.earnings-forecast__breakdown div {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.earnings-forecast__breakdown span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.earnings-forecast__breakdown em {
  color: var(--ink);
  font-size: 16px;
  font-style: normal;
  font-weight: 820;
}

.metric-card {
  min-height: 122px;
  padding: 18px;
}

.metric-card strong {
  display: block;
  margin: 5px 0 7px;
  overflow-wrap: anywhere;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.1;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 18px;
}

.panel {
  padding: 20px;
}

.panel--wide {
  min-height: 330px;
}

.panel__head {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel__head h3 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.24;
}

.panel__tag {
  min-height: 28px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(18, 191, 179, 0.1);
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
}

.panel__tag--neutral {
  color: #607584;
  background: #eef5f4;
}

.panel__tag--warning {
  color: #9a5f00;
  background: rgba(255, 176, 32, 0.16);
}

.panel__tag--success {
  color: var(--teal-dark);
  background: rgba(18, 191, 179, 0.14);
}

.panel__tag--danger {
  color: #b42318;
  background: #fff1f0;
}

.text-action {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(18, 191, 179, 0.18);
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(18, 191, 179, 0.08);
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.text-action:hover {
  background: rgba(18, 191, 179, 0.14);
}

.panel__head select,
.search-input {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--body);
  background: #ffffff;
}

.chart {
  height: 220px;
  padding: 18px 14px 14px;
  display: grid;
  grid-template-columns: repeat(8, minmax(24px, 1fr));
  gap: 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fcfb 0%, #effaf8 100%);
}

.chart__item {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 18px;
  align-items: end;
  gap: 8px;
}

.chart__bar {
  width: 100%;
  min-height: 28px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #16c8bd 0%, #8be8df 100%);
  box-shadow: 0 12px 24px rgba(18, 191, 179, 0.18);
}

.chart__item small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart .empty-state {
  grid-column: 1 / -1;
  align-self: center;
}

.product-preview img {
  width: 210px;
  max-height: 300px;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(16, 42, 67, 0.16));
}

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

.code-card {
  min-height: 84px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.code-card.is-closed {
  background: rgba(248, 252, 251, 0.78);
}

.code-card.is-closed .code-card__name,
.code-card.is-closed p {
  color: var(--muted);
}

.code-card__name {
  display: block;
  margin-bottom: 4px;
  font-size: 21px;
  font-weight: 820;
}

.code-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.code-card strong {
  white-space: nowrap;
  color: var(--teal-dark);
}

.code-card__side {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 10px;
}

.code-card.is-pending strong {
  color: var(--gold);
}

.code-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  user-select: none;
}

.code-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.code-toggle__control {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 999px;
  background: #d9e5e2;
  transition:
    background 180ms ease,
    border-color 180ms ease;
}

.code-toggle__control::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 42, 67, 0.18);
  transition: transform 180ms ease;
}

.code-toggle input:checked + .code-toggle__control {
  border-color: rgba(18, 191, 179, 0.52);
  background: var(--teal);
}

.code-toggle input:checked + .code-toggle__control::after {
  transform: translateX(18px);
}

.code-toggle input:focus-visible + .code-toggle__control {
  outline: 3px solid rgba(18, 191, 179, 0.2);
  outline-offset: 2px;
}

.code-toggle.is-disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.word-game-overview {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 246, 255, 0.92)),
    #ffffff;
}

.word-game-overview__copy h3 {
  margin: 12px 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
}

.word-game-overview__copy p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--body);
  font-size: 15px;
  line-height: 1.7;
}

.word-game-overview__status {
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 7px;
  border: 1px solid rgba(29, 78, 216, 0.18);
  border-radius: 8px;
  background: #f8fbff;
}

.word-game-overview__status span {
  color: var(--muted);
  font-size: 12px;
}

.word-game-overview__status strong {
  color: #1d4ed8;
  font-size: 22px;
  line-height: 1.2;
}

.word-game-overview__status p {
  margin: 0;
  color: var(--body);
  font-size: 13px;
  line-height: 1.6;
}

.word-game-overview__status.is-ready {
  border-color: rgba(18, 191, 179, 0.22);
  background: #f2fffc;
}

.word-game-overview__status.is-ready strong {
  color: var(--teal-dark);
}

.word-game-overview__status.is-warning {
  border-color: rgba(255, 176, 32, 0.24);
  background: #fffaf0;
}

.word-game-overview__status.is-warning strong {
  color: #9a5f00;
}

.word-game-overview__status.is-error {
  border-color: rgba(239, 68, 68, 0.2);
  background: #fff5f5;
}

.word-game-overview__status.is-error strong {
  color: #b42318;
}

.word-game-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.word-game-code-list,
.word-game-redemption-list {
  display: grid;
  gap: 12px;
}

.word-game-code-card {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.word-game-code-card__main {
  min-width: 0;
}

.word-game-code-card__label {
  width: fit-content;
  min-height: 24px;
  padding: 4px 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #1d4ed8;
  background: #e8f0ff;
  font-size: 11px;
  font-weight: 820;
}

.word-game-code-card__main strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 22px;
  line-height: 1.18;
}

.word-game-code-card__main p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.word-game-code-card__stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.word-game-code-card__stats div {
  min-width: 0;
  padding: 11px;
  border-radius: 8px;
  background: #f8fcfb;
}

.word-game-code-card__stats dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.word-game-code-card__stats dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 820;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.word-game-redemption-item {
  min-height: 66px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.word-game-redemption-item strong,
.word-game-redemption-item span {
  display: block;
}

.word-game-redemption-item strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.word-game-redemption-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.word-game-redemption-item em {
  min-width: 88px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(18, 191, 179, 0.1);
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
  text-align: center;
  white-space: nowrap;
}

.word-game-code-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.word-game-code-form-grid__wide {
  grid-column: 1 / -1;
}

.benefit-summary {
  margin: -2px 0 12px;
  padding: 12px;
  border: 1px solid rgba(18, 191, 179, 0.18);
  border-radius: 8px;
  background: #f2fffc;
}

.benefit-summary span,
.benefit-summary p {
  color: var(--muted);
  font-size: 12px;
}

.benefit-summary strong {
  display: block;
  margin: 4px 0;
  color: var(--ink);
  font-size: 15px;
}

.benefit-summary p {
  margin-bottom: 0;
}

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

.campaign-card {
  padding: 16px;
  border: 1px solid rgba(18, 191, 179, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(242, 255, 252, 0.9), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.campaign-card__main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.campaign-card__label {
  width: fit-content;
  min-height: 26px;
  padding: 4px 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(18, 191, 179, 0.12);
  font-size: 11px;
  font-weight: 780;
}

.campaign-card h4 {
  margin: 9px 0 4px;
  font-size: 20px;
  line-height: 1.25;
}

.campaign-card p {
  margin-bottom: 7px;
  color: var(--muted);
}

.campaign-card__reward {
  min-width: 150px;
  padding: 14px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.campaign-card__reward span,
.campaign-card__foot {
  color: var(--muted);
  font-size: 13px;
}

.campaign-card__reward strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.12;
}

.progress-line {
  height: 10px;
  margin: 18px 0 10px;
  border-radius: 999px;
  background: rgba(18, 191, 179, 0.12);
  overflow: hidden;
}

.progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.campaign-card__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.table {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table__row {
  min-width: 940px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1fr 0.8fr 1fr 0.8fr;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.table__row:last-child {
  border-bottom: 0;
}

.table__row--head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  background: #f6fbfa;
}

.table__row--empty {
  min-width: 0;
  grid-template-columns: 1fr;
  color: var(--muted);
}

.withdraw-layout {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
}

.withdraw-card {
  display: grid;
  align-content: start;
}

.withdraw-summary {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(18, 191, 179, 0.16);
  border-radius: 8px;
  background: #f6fbfa;
}

.withdraw-summary span,
.record-item span {
  color: var(--muted);
  font-size: 12px;
}

.withdraw-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.1;
}

.withdraw-summary p {
  margin: 10px 0 0;
  color: var(--body);
  font-size: 13px;
}

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

.withdraw-breakdown div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcfb;
}

.withdraw-breakdown span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.withdraw-breakdown strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
}

.record-list,
.compact-list {
  display: grid;
  gap: 10px;
}

.empty-state {
  min-height: 96px;
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px dashed rgba(100, 116, 139, 0.24);
  border-radius: 8px;
  color: var(--muted);
  background: #f8fcfb;
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  font-size: 16px;
}

.empty-state span {
  color: var(--muted);
  font-size: 13px;
}

.record-item,
.compact-list article {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.record-item strong,
.compact-list strong {
  display: block;
  font-size: 18px;
}

.record-item em {
  min-width: 68px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(18, 191, 179, 0.1);
  font-size: 12px;
  font-style: normal;
  font-weight: 720;
  text-align: center;
}

.compact-list article {
  align-items: flex-start;
  flex-direction: column;
}

.compact-list span {
  color: var(--muted);
  font-size: 13px;
}

.profile-layout {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.profile-layout[hidden],
.partner-state-panel[hidden],
.application-panel[hidden] {
  display: none !important;
}

.profile-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-list div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcfb;
}

.profile-list dd {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 760;
  word-break: break-word;
}

.profile-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.payout-status-card {
  min-height: 140px;
  padding: 16px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(18, 191, 179, 0.16);
  border-radius: 8px;
  background: #f6fbfa;
}

.payout-status-card > strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
}

.payout-status-card > p {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

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

.payout-profile-summary div,
.payout-tax-preview {
  padding: 12px;
  border: 1px solid rgba(223, 232, 238, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.payout-profile-summary dt,
.payout-tax-preview span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.payout-profile-summary dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  word-break: break-word;
}

.payout-tax-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.payout-tax-preview strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.payout-tax-preview em {
  color: var(--teal-dark);
  font-size: 13px;
  font-style: normal;
  font-weight: 820;
  white-space: nowrap;
}

.identity-card__note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.primary-action--compact {
  width: fit-content;
  min-height: 38px;
  padding: 0 18px;
  font-size: 13px;
}

.partner-state-panel {
  margin-bottom: 20px;
  border-color: rgba(18, 191, 179, 0.18);
  background: rgba(255, 255, 255, 0.96);
}

.partner-state-panel p {
  max-width: 760px;
  margin-bottom: 14px;
  color: var(--body);
  line-height: 1.7;
}

.partner-state-panel--limited {
  border-color: rgba(239, 68, 68, 0.2);
  background: #fffafa;
}

.state-detail-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.4fr) minmax(0, 1fr);
  gap: 12px;
}

.state-detail-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcfb;
}

.state-detail-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.state-detail-grid strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

.application-panel {
  margin-bottom: 20px;
}

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

.form-field {
  display: grid;
  gap: 7px;
  color: var(--body);
  font-size: 14px;
  font-weight: 680;
}

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

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f8fcfb;
}

.form-field input {
  height: 40px;
  padding: 0 12px;
}

.form-field textarea {
  min-height: 94px;
  padding: 12px;
  resize: vertical;
}

.agreement-card {
  margin-top: 16px;
  padding: 16px;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(18, 191, 179, 0.2);
  border-radius: 8px;
  background: #f2fffc;
}

.agreement-card h4 {
  margin: 0 0 6px;
  font-size: 18px;
}

.agreement-card p {
  margin-bottom: 0;
  color: var(--body);
}

.agreement-status {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(18, 191, 179, 0.16);
  border-radius: 8px;
  background: #ffffff;
}

.agreement-status span {
  color: var(--muted);
  font-size: 12px;
}

.agreement-status strong {
  color: var(--teal-dark);
  font-size: 14px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-weight: 760;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--teal);
  flex: 0 0 auto;
}

.submit-application {
  margin-top: 16px;
}

.submit-application:disabled {
  cursor: not-allowed;
  color: #8aa1af;
  background: #e6f2f0;
  box-shadow: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}

.modal.is-open {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 42, 67, 0.42);
  backdrop-filter: blur(12px);
}

.modal__sheet {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  padding: 24px;
  overflow: auto;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 30px 70px rgba(16, 42, 67, 0.24);
  animation: sheetIn 220ms ease-out both;
}

.modal__sheet--wide {
  width: min(720px, 100%);
}

.modal__sheet--agreement {
  width: min(860px, 100%);
  max-height: min(820px, calc(100vh - 36px));
  padding: 24px;
}

.modal__sheet h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

.modal__intro {
  max-width: 680px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
}

.modal__sheet label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--body);
  font-size: 14px;
  font-weight: 680;
}

.modal__sheet label.check-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.modal__sheet input,
.modal__sheet textarea,
.modal__sheet select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f8fcfb;
}

.modal__sheet input,
.modal__sheet select {
  height: 40px;
  padding: 0 12px;
}

.modal__sheet textarea {
  min-height: 88px;
  padding: 12px;
  resize: vertical;
}

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

.profile-form-hint {
  margin: 4px 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(18, 191, 179, 0.16);
  border-radius: 8px;
  color: var(--body);
  background: #f6fbfa;
  font-size: 13px;
  line-height: 1.6;
}

.field-note {
  display: block;
  margin-top: 7px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.5;
}

.field-note[hidden] {
  display: none;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: #ffffff;
  font-size: 22px;
  line-height: 1;
}

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

.agreement-sign-layout {
  display: grid;
  gap: 12px;
}

.agreement-step-card {
  padding: 14px;
  border: 1px solid rgba(223, 232, 238, 0.92);
  border-radius: 8px;
  background: #fbfefe;
}

.agreement-step-card header {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.agreement-step-card header span {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--teal-dark);
  background: rgba(18, 191, 179, 0.12);
  font-size: 12px;
  font-weight: 820;
}

.agreement-step-card header strong {
  font-size: 15px;
}

.agreement-step-card label {
  min-width: 0;
  margin-bottom: 0;
}

.agreement-preview {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.agreement-preview dl {
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(223, 232, 238, 0.86);
  border-radius: 8px;
  background: #f7fcfb;
}

.agreement-preview__wide {
  grid-column: 1 / -1;
}

.agreement-preview dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.agreement-preview dd {
  min-height: 20px;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.agreement-document {
  background: #ffffff;
}

.agreement-document__body {
  max-height: 360px;
  padding: 14px;
  overflow: auto;
  border: 1px solid rgba(18, 191, 179, 0.18);
  border-radius: 8px;
  color: var(--body);
  background: #f8fcfb;
  font-size: 13px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.agreement-document__body h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 16px;
}

.agreement-document__body h5 {
  margin: 16px 0 8px;
  color: var(--ink);
  font-size: 14px;
}

.agreement-document__body p {
  margin-bottom: 10px;
}

.agreement-version {
  color: var(--muted);
  font-size: 12px;
}

.agreement-important {
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font-weight: inherit;
}

.agreement-document__body ol {
  margin: 0;
  padding-left: 20px;
}

.agreement-document__body li + li {
  margin-top: 8px;
}

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

.confirm-read-agreement {
  margin-top: 12px;
}

.agreement-actions {
  position: sticky;
  bottom: -24px;
  margin: 16px -24px -24px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.agreement-read-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.agreement-text {
  margin: 6px 0 14px;
  padding: 14px;
  border: 1px solid rgba(18, 191, 179, 0.16);
  border-radius: 8px;
  background: #f6fbfa;
}

.agreement-text strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.agreement-text p {
  margin-bottom: 0;
  color: var(--body);
  font-size: 13px;
}

.sign-agreement {
  margin-top: 10px;
}

.sign-agreement:disabled {
  cursor: not-allowed;
  color: #8aa1af;
  background: #e6f2f0;
  box-shadow: none;
}

.agreement-modal--view .agreement-step-card--form,
.agreement-modal--view .agreement-step-card--preview,
.agreement-modal--view .agreement-actions,
.agreement-modal--view .agreement-scroll-hint,
.agreement-modal--view .confirm-read-agreement {
  display: none !important;
}

.agreement-modal--view .agreement-sign-layout {
  grid-template-columns: 1fr;
}

.agreement-modal--view .agreement-document {
  display: block;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  max-width: min(420px, calc(100vw - 48px));
  padding: 12px 16px;
  border: 1px solid rgba(18, 191, 179, 0.24);
  border-radius: 8px;
  color: var(--teal-dark);
  background: #f2fffc;
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 720;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--error {
  border-color: rgba(239, 68, 68, 0.22);
  color: #b42318;
  background: #fff5f5;
}

.reveal {
  animation: revealUp 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.metrics-grid .metric-card:nth-child(2) {
  animation-delay: 80ms;
}

.metrics-grid .metric-card:nth-child(3) {
  animation-delay: 150ms;
}

.metrics-grid .metric-card:nth-child(4) {
  animation-delay: 220ms;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sheetIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
  }

  .side-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: auto;
  }

  .side-nav__item {
    min-width: 88px;
    text-align: center;
  }

  .sidebar__notice {
    display: none;
  }

  .hero-panel,
  .auth-panel,
  .login-screen .auth-panel,
  .content-grid,
  .earnings-forecast,
  .word-game-overview,
  .word-game-layout {
    grid-template-columns: 1fr;
  }

  .login-screen {
    place-items: start center;
  }

  .login-screen .auth-panel {
    min-height: auto;
  }

  .earnings-forecast > strong {
    justify-self: start;
  }

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

  .earnings-summary-grid,
  .profile-layout,
  .withdraw-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .workspace {
    padding: 22px 16px 44px;
  }

  .login-screen {
    padding: 22px 16px;
  }

  .login-card {
    gap: 14px;
  }

  .login-brand {
    font-size: 16px;
  }

  .login-brand img {
    width: 34px;
    height: 34px;
  }

  .login-screen .auth-panel {
    padding: 18px;
    gap: 18px;
  }

  .login-screen .auth-panel h1 {
    font-size: 30px;
  }

  .login-screen .auth-panel p {
    max-width: none;
    font-size: 14px;
    line-height: 1.7;
  }

  .login-screen .auth-form {
    padding: 14px;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .side-nav__item {
    min-width: 0;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .account {
    width: 100%;
  }

  .hero-panel {
    padding: 22px;
  }

  .auth-code-row {
    grid-template-columns: 1fr;
  }

  .hero-panel h2 {
    font-size: 32px;
  }

  .metrics-grid,
  .earnings-summary-grid,
  .earnings-forecast__breakdown,
	  .state-detail-grid,
	  .profile-list,
	  .payout-profile-summary,
	  .application-grid,
	  .agreement-form,
	  .payout-profile-grid,
	  .word-game-code-form-grid,
	  .word-game-code-card,
	  .word-game-code-card__stats,
	  .withdraw-breakdown {
	    grid-template-columns: 1fr;
	  }

  .word-game-redemption-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .payout-tax-preview {
    align-items: flex-start;
    flex-direction: column;
  }

  .payout-tax-preview em {
    white-space: normal;
  }

  .campaign-card__main,
  .campaign-card__foot {
    flex-direction: column;
  }

  .campaign-card__reward {
    min-width: 0;
  }

  .record-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .code-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal {
    align-items: flex-start;
    padding: 18px;
  }

  .modal__sheet--agreement {
    max-height: calc(100vh - 36px);
    padding: 18px;
  }

  .agreement-preview {
    grid-template-columns: 1fr;
  }

  .agreement-document__body {
    max-height: 240px;
  }

  .agreement-actions {
    bottom: -18px;
    margin: 14px -18px -18px;
    padding: 12px 18px;
    align-items: stretch;
    flex-direction: column;
  }

  .agreement-actions .primary-action {
    width: 100%;
  }
}

/* Affiliate web UI v1: unified login, manual-review gate and promotion tasks. */
.phone-login-panel[hidden],
.phone-login-toggle[hidden],
.ui-preview-banner[hidden],
[data-access-gate][hidden],
[data-application-nav][hidden],
[data-active-partner-only][hidden],
[data-profile-stage][hidden],
[data-promotion-task-empty][hidden],
[data-promotion-submission-empty][hidden],
[data-reapplication-allowed][hidden],
[data-reapplication-denied][hidden],
[data-ui-preview-only][hidden] {
  display: none !important;
}

.login-screen {
  padding: clamp(24px, 4vw, 52px);
  background:
    radial-gradient(circle at 22% 18%, rgba(67, 210, 197, 0.11), transparent 30%),
    radial-gradient(circle at 78% 82%, rgba(18, 191, 179, 0.08), transparent 24%),
    #f7faf9;
}

.login-card {
  width: min(1160px, 100%);
}

.login-screen .auth-panel {
  min-height: min(656px, calc(100vh - 64px));
  padding: clamp(32px, 5vw, 64px);
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.75fr);
  gap: clamp(40px, 7vw, 88px);
  border-color: rgba(214, 226, 226, 0.86);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 253, 251, 0.96)),
    #ffffff;
  box-shadow: 0 30px 80px rgba(23, 54, 66, 0.11);
}

.login-story {
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.login-brand {
  width: 112px;
  min-height: 76px;
  display: block;
}

.login-brand img {
  width: 112px;
  height: 76px;
  object-fit: contain;
  object-position: left center;
}

.login-story__copy {
  margin-top: clamp(24px, 5vh, 54px);
}

.login-story__copy .panel__label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
}

.login-screen .login-story__copy h1 {
  max-width: 500px;
  margin-bottom: 16px;
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -0.035em;
  line-height: 1.16;
}

.login-screen .login-story__copy p {
  max-width: 500px;
  color: #6b7d88;
  font-size: 16px;
  line-height: 1.85;
}

.login-story__visual {
  position: relative;
  width: min(390px, 90%);
  min-height: 184px;
  margin-top: auto;
  overflow: hidden;
  border: 1px solid rgba(18, 191, 179, 0.12);
  border-radius: 24px;
  background:
    radial-gradient(circle at 28% 44%, rgba(131, 231, 219, 0.34), transparent 27%),
    linear-gradient(135deg, rgba(237, 252, 249, 0.96), rgba(249, 253, 252, 0.96));
}

.login-story__visual img {
  position: absolute;
  left: 28px;
  bottom: -144px;
  width: 132px;
  max-height: none;
  border: 6px solid rgba(255, 255, 255, 0.94);
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(25, 75, 80, 0.14);
}

.login-story__visual > div {
  position: absolute;
  top: 50%;
  right: 28px;
  width: 180px;
  transform: translateY(-50%);
}

.login-story__visual strong,
.login-story__visual span {
  display: block;
}

.login-story__visual strong {
  margin-bottom: 8px;
  font-size: 20px;
}

.login-story__visual span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.login-screen .auth-form {
  width: 100%;
  padding: 30px;
  align-self: center;
  gap: 14px;
  border-color: rgba(218, 228, 230, 0.94);
  border-radius: 24px;
  box-shadow: 0 20px 54px rgba(20, 60, 67, 0.1);
}

.auth-form__heading {
  margin-bottom: 4px;
}

.auth-form__heading strong,
.auth-form__heading span {
  display: block;
}

.auth-form__heading strong {
  margin-bottom: 6px;
  font-size: 21px;
}

.auth-form__heading span {
  color: var(--muted);
  font-size: 13px;
}

.login-screen .platform-legal-consent {
  padding: 8px 2px;
  border: 0;
  background: transparent;
}

.login-screen .wechat-login-action {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #55bdb4, #3ca99f);
  box-shadow: 0 12px 24px rgba(40, 158, 148, 0.18);
}

.login-screen .wechat-login-action:hover {
  border: 0;
  background: linear-gradient(135deg, #49b4ab, #329c93);
}

.phone-login-toggle {
  min-height: 34px;
  padding: 0;
  border: 0;
  color: var(--teal-dark);
  background: transparent;
  font-size: 13px;
  font-weight: 760;
}

.phone-login-toggle:hover {
  text-decoration: underline;
}

.phone-login-panel {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.auth-form__note {
  margin: 0;
  color: #7d8e98;
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
}

.brand {
  width: auto;
  min-height: 86px;
  margin: 0 8px;
  padding-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #edf2f3;
  text-decoration: none;
}

.brand img {
  width: 84px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
}

.brand span {
  padding-left: 12px;
  border-left: 1px solid #dfe9e9;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  white-space: nowrap;
}

.side-nav__item {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 12px;
}

.ui-preview-banner {
  margin-bottom: 18px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 176, 32, 0.3);
  border-radius: 10px;
  color: #855400;
  background: #fff9eb;
  font-size: 13px;
  line-height: 1.6;
}

.access-gate {
  display: grid;
  gap: 20px;
}

.access-gate__hero {
  padding: clamp(28px, 4vw, 46px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.86fr);
  gap: 42px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(18, 191, 179, 0.17);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 16%, rgba(122, 228, 216, 0.22), transparent 29%),
    linear-gradient(135deg, #ffffff, #f1fbf9);
  box-shadow: var(--shadow-soft);
}

.access-gate__hero h2 {
  max-width: 640px;
  margin: 14px 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.access-gate__hero p {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--body);
  font-size: 15px;
  line-height: 1.78;
}

.access-steps {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}

.access-steps li {
  min-height: 90px;
  padding: 16px;
  border: 1px solid rgba(18, 191, 179, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.access-steps span,
.access-steps strong {
  display: block;
}

.access-steps span {
  margin-bottom: 10px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 820;
}

.access-steps strong {
  font-size: 15px;
}

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

.access-benefits article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 26px rgba(15, 42, 67, 0.045);
}

.access-benefits span,
.access-benefits strong {
  display: block;
}

.access-benefits span {
  margin-bottom: 9px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.access-benefits strong {
  margin-bottom: 8px;
  font-size: 17px;
}

.access-benefits p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.access-gate .application-panel {
  border-radius: 18px;
}

.review-state {
  display: flex;
  align-items: center;
  gap: 20px;
}

.review-state__mark {
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #9a5f00;
  background: #fff4d8;
  font-size: 14px;
  font-weight: 820;
}

.review-state__mark--limited {
  color: #a63c35;
  background: #fff0ee;
}

.review-state h3 {
  margin-bottom: 8px;
  font-size: 24px;
}

.review-state p {
  margin-bottom: 0;
  color: var(--body);
  line-height: 1.7;
}

.promotion-task-intro {
  margin-bottom: 18px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 10%, rgba(111, 225, 212, 0.2), transparent 30%),
    #ffffff;
}

.promotion-task-intro h3 {
  margin-bottom: 8px;
  font-size: 26px;
}

.promotion-task-intro p {
  max-width: 680px;
  margin: 0;
  color: var(--body);
  line-height: 1.7;
}

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

.task-summary-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(15, 42, 67, 0.045);
}

.task-summary-grid span,
.task-summary-grid strong,
.task-summary-grid em {
  display: block;
}

.task-summary-grid span {
  color: var(--muted);
  font-size: 12px;
}

.task-summary-grid strong {
  margin: 6px 0;
  font-size: 28px;
}

.task-summary-grid em {
  color: #84939d;
  font-size: 12px;
  font-style: normal;
}

.task-list-head {
  align-items: flex-start;
}

.task-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.task-filters button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.task-filters button.is-active {
  border-color: rgba(18, 191, 179, 0.26);
  color: var(--teal-dark);
  background: rgba(18, 191, 179, 0.09);
}

.task-service-state {
  min-height: 136px;
  padding: 24px;
  display: grid;
  place-content: center;
  border: 1px dashed #cfdcde;
  border-radius: 14px;
  text-align: center;
  background: #f9fcfb;
}

.task-service-state strong {
  margin-bottom: 7px;
  font-size: 16px;
}

.task-service-state p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.promotion-task-preview-list {
  display: grid;
  gap: 12px;
}

.promotion-task-card {
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.promotion-task-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8a98a1;
  font-size: 12px;
}

.promotion-task-card h4 {
  margin: 12px 0 8px;
  font-size: 20px;
}

.promotion-task-card p {
  margin-bottom: 16px;
  color: var(--body);
  line-height: 1.65;
}

.promotion-task-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.promotion-task-card dl div {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f6fbfa;
}

.promotion-task-card dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
}

.promotion-task-card dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 670;
  line-height: 1.55;
}

.promotion-task-card__side {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}

.promotion-task-card__side > span {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.promotion-task-detail-grid,
.task-materials-preview {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.promotion-task-detail-grid section,
.task-materials-preview > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fcfb;
}

.promotion-task-detail-grid span,
.promotion-task-detail-grid strong,
.task-materials-preview span,
.task-materials-preview strong {
  display: block;
}

.promotion-task-detail-grid span,
.task-materials-preview span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.promotion-task-detail-grid strong,
.task-materials-preview strong {
  font-size: 13px;
  line-height: 1.65;
}

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

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

.promotion-submit-grid__wide {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .login-screen .auth-panel,
  .access-gate__hero {
    grid-template-columns: 1fr;
  }

  .login-screen .auth-panel {
    min-height: auto;
  }

  .login-story__visual {
    display: none;
  }

  .access-benefits,
  .task-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .login-screen .auth-panel {
    padding: 24px 18px;
    border-radius: 20px;
  }

  .login-story__copy {
    margin-top: 18px;
  }

  .login-screen .login-story__copy h1 {
    font-size: 34px;
  }

  .login-screen .auth-form {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .brand {
    min-height: 68px;
    padding-bottom: 12px;
  }

  .brand img {
    width: 74px;
    height: 48px;
  }

  .access-gate__hero {
    padding: 24px;
    gap: 24px;
    border-radius: 18px;
  }

  .access-steps,
  .access-benefits,
  .task-summary-grid,
  .promotion-task-card,
  .promotion-task-card dl,
  .promotion-task-detail-grid,
  .task-materials-preview,
  .promotion-submit-grid {
    grid-template-columns: 1fr;
  }

  .review-state,
  .promotion-task-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-state__mark {
    width: 70px;
    height: 70px;
  }

  .promotion-task-card__side {
    align-items: stretch;
  }

  .promotion-submit-grid__wide {
    grid-column: auto;
  }
}

/* Affiliate web UI v3: match the current BaoFlow H5 login and review-state previews. */
.login-screen {
  padding: 32px 40px;
  background: #f7faf9;
}

.login-card {
  width: min(1160px, calc(100vw - 80px));
}

.login-screen .auth-panel {
  min-height: min(760px, calc(100vh - 64px));
  padding: 54px 64px;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.85fr);
  gap: 72px;
  align-items: start;
  border: 1px solid rgba(15, 118, 110, 0.1);
  border-radius: 28px;
  background:
    radial-gradient(circle at 28% 28%, rgba(0, 200, 184, 0.12), transparent 260px),
    linear-gradient(145deg, #ffffff 0%, #f2fbf9 52%, #ffffff 100%);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.09);
}

.login-story {
  align-self: start;
}

.login-brand {
  width: 126px;
  min-height: 86px;
}

.login-brand img {
  width: 126px;
  height: auto;
  object-fit: contain;
  object-position: left top;
}

.login-story__copy {
  margin-top: 30px;
  text-align: left;
}

.login-screen .login-story__copy h1 {
  max-width: 520px;
  margin-bottom: 12px;
  color: #102a43;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.28;
}

.login-screen .login-story__copy p {
  max-width: 520px;
  color: #64748b;
  font-size: 17px;
  line-height: 1.55;
}

.login-story__visual {
  position: static;
  width: min(100%, 310px);
  min-height: 0;
  height: auto;
  margin-top: 34px;
  display: block;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.login-screen .auth-form {
  align-self: center;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 34px;
  gap: 9px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.login-screen .platform-legal-consent {
  min-height: 28px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: #52677a;
  font-size: 10.5px;
  line-height: 1.45;
}

.login-screen .platform-legal-consent input {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: #00a896;
}

.login-screen .platform-legal-consent a {
  color: #008f86;
  font-weight: 650;
}

.login-screen .wechat-login-action {
  min-height: 44px;
  font-size: 13px;
  border-radius: 6px;
  background: #4eb1a8;
  box-shadow: 0 8px 18px rgba(0, 143, 134, 0.16);
}

.login-screen .wechat-login-action:hover {
  background: #40a89f;
}

.phone-login-entry {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #64748b;
  font-size: 11px;
}

.phone-login-entry::before,
.phone-login-entry::after {
  display: none;
}

.phone-login-toggle {
  width: auto;
  min-height: 0;
  padding: 0;
  color: #008f86;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
  text-align: left;
}

.phone-login-panel {
  gap: 12px;
  padding-top: 4px;
}

.login-screen .auth-form .remember-device {
  min-height: 64px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(0, 143, 134, 0.16);
  border-radius: 10px;
  background: rgba(240, 252, 250, 0.88);
}

.remember-device__mark {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: #4eb1a8;
  font-size: 11px;
  font-weight: 800;
}

.login-screen .auth-form .remember-device strong {
  color: #102a43;
  font-size: 12px;
  font-weight: 700;
}

.login-screen .auth-form .remember-device small {
  margin-top: 3px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.45;
}

.login-screen .auth-panel .auth-form__note {
  margin: 0;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

.reapplication-decision {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.reapplication-decision > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 20px;
}

.reapplication-decision span,
.reapplication-decision strong {
  display: block;
}

.reapplication-decision span {
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 750;
}

.reapplication-decision strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}

.reapplication-decision .primary-action {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.promotion-submission-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.promotion-submission-row {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  background: #ffffff;
}

.promotion-submission-row + .promotion-submission-row {
  border-top: 1px solid var(--line);
}

.promotion-submission-row > div:first-child {
  min-width: 0;
}

.promotion-submission-row__eyebrow,
.promotion-submission-row strong,
.promotion-submission-row a,
.promotion-submission-row p,
.promotion-submission-row > div:last-child > span {
  display: block;
}

.promotion-submission-row__eyebrow {
  margin-bottom: 5px;
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 740;
}

.promotion-submission-row strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.promotion-submission-row a {
  margin-top: 5px;
  overflow: hidden;
  color: var(--brand-deep);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promotion-submission-row p {
  margin: 7px 0 0;
  color: #8a5a20;
  font-size: 12px;
  line-height: 1.55;
}

.promotion-submission-row > div:last-child {
  min-width: 104px;
  text-align: right;
}

.promotion-submission-row > div:last-child > span:first-child {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.submission-status {
  width: fit-content;
  margin-left: auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.submission-status--review {
  color: #8a5a20;
  background: #fff7e6;
}

.submission-status--revise {
  color: #a04f19;
  background: #fff0e5;
}

.submission-status--approved {
  color: #087b70;
  background: #eafaf7;
}

.submission-status--rejected {
  color: #a33b47;
  background: #fff0f2;
}

@media (max-width: 980px) {
  .login-screen .auth-panel {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .login-story__visual {
    display: none;
  }
}

@media (max-width: 640px) {
  .login-screen {
    padding: 16px;
  }

  .login-card {
    width: 100%;
  }

  .login-screen .auth-panel {
    padding: 24px 18px;
  }

  .login-brand {
    width: 96px;
    min-height: 66px;
  }

  .login-brand img {
    width: 96px;
  }

  .login-story__copy {
    margin-top: 20px;
  }

  .login-screen .login-story__copy h1 {
    font-size: 30px;
  }

  .login-screen .auth-form {
    padding: 22px 18px;
  }

  .reapplication-decision > div,
  .promotion-submission-row {
    grid-template-columns: 1fr;
  }

  .reapplication-decision .primary-action {
    grid-column: auto;
    grid-row: auto;
    margin-top: 10px;
  }

  .promotion-submission-row {
    gap: 12px;
  }

  .promotion-submission-row > div:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .promotion-submission-row > div:last-child > span:first-child {
    margin: 0;
  }

  .submission-status {
    margin-left: 0;
  }
}
