#app:is(.ref-team, .ref-team-members, .ref-team-direct, .ref-team-orders, .ref-team-member) {
  --team-base: #f2f4fd;
  --team-red: #ff4d4f;
  --team-unit: min(.13333333vw, .693333px);
  --team-gutter: calc(var(--team-unit) * 30);
  --team-space: calc(var(--team-unit) * 20);
  --team-shortcut-space: calc(var(--team-unit) * 60);
  background: var(--team-base);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
@supports (width: round(down, 20.5px, 1px)) {
  #app:is(.ref-team, .ref-team-members, .ref-team-direct, .ref-team-orders, .ref-team-member) {
    --team-gutter: round(down, calc(var(--team-unit) * 30), 1px);
    --team-space: round(down, calc(var(--team-unit) * 20), 1px);
    --team-shortcut-space: round(down, calc(var(--team-unit) * 60), 1px);
  }
}
#app:is(.ref-team, .ref-team-members, .ref-team-direct, .ref-team-orders, .ref-team-member) .page { display: block; padding: 0 0 env(safe-area-inset-bottom); }
#app:is(.ref-team, .ref-team-members, .ref-team-direct, .ref-team-orders, .ref-team-member, .ref-team-finance) .topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: calc(44px + env(safe-area-inset-top));
  border: 0;
  color: #000;
}
#app:is(.ref-team, .ref-team-members, .ref-team-direct, .ref-team-orders, .ref-team-member, .ref-team-finance) .topbar .back { left: 0; min-width: 37px; }
#app.ref-team-finance {
  background: #f3f3f3;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
#app.ref-team-finance .warehouse-reference { display: block; padding: 0; }

.team-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: var(--team-shortcut-space) 0;
  background: var(--team-red);
  color: #fff;
}
.team-shortcuts a { display: grid; justify-items: center; gap: 5px; color: inherit; font-size: 12px; line-height: 16px; }
.team-shortcuts img { width: var(--team-shortcut-space); height: var(--team-shortcut-space); object-fit: contain; }
.team-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: var(--team-gutter) 0;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.team-totals > div { display: flex; flex-direction: column-reverse; text-align: center; }
.team-totals dt { color: #666; font-size: 12px; line-height: 16px; }
.team-totals dd { margin: 0 0 5px; color: var(--team-red); font-size: 18px; font-weight: 700; line-height: 24px; }
.team-active { margin: var(--team-space) var(--team-gutter) 0; }
.team-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: var(--team-gutter) var(--team-space);
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.team-section-head strong { font-size: 14px; font-weight: 500; }
.team-filter { position: relative; z-index: 3; }
.team-filter summary {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 31px;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--team-red);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 19px;
  list-style: none;
}
.team-filter summary::-webkit-details-marker { display: none; }
.team-filter summary > span:last-child { font-size: 11px; }
.team-filter[open] summary > span:last-child { transform: rotate(180deg); }
.team-filter > div {
  position: absolute;
  right: 0;
  min-width: 83px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 6px rgb(0 0 0 / 10%);
}
.team-filter a { display: block; padding: 10px 12px; border-bottom: 1px solid #f0f0f0; font-size: 14px; line-height: 21px; text-align: center; }
.team-filter a:last-child { border: 0; }
.team-filter a:active { background: #f5f5f5; }

.team-user { margin-top: 5px; padding: var(--team-space); border-radius: 5px; background: #fff; }
.team-user-head { display: flex; justify-content: space-between; align-items: center; gap: 9px; min-height: 47px; padding-bottom: 10px; border-bottom: 1px solid #eee; color: #191919; font-size: 14px; }
.team-user-head > div { display: flex; align-items: center; min-width: 0; gap: 10px; }
.team-user-head > div span { overflow-wrap: anywhere; }
.team-user-head > span:last-child { flex-shrink: 0; }
.team-avatar { display: block; width: 33px; height: 33px; flex: 0 0 33px; border: 1px solid rgb(107 107 107 / 30%); border-radius: 50%; object-fit: cover; }
.team-user-details { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 0; min-height: 83px; padding: 19px 10px 10px 0; border-bottom: 1px solid #eee; color: #5e5e5e; }
.team-user-details p { width: 40%; min-width: 0; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.team-user-actions { display: flex; justify-content: flex-end; margin-top: 5px; }
.team-user-actions a { display: grid; align-items: center; min-height: 30px; padding: 0 15px; border-radius: 8px; background: var(--team-red); color: #fff; font-size: 12px; }
.team-feed-end { display: block; width: 100%; padding: 20px 0; border: 0; background: transparent; color: #999; font-size: 12px; text-align: center; }
.team-feed-end[hidden] { display: none; }

#app:is(.ref-team-direct, .ref-team-member) { background: #f5f5f5; }
.team-search, .team-order-tools { position: sticky; top: calc(44px + env(safe-area-inset-top)); z-index: 12; }
.team-search {
  display: flex;
  align-items: center;
  min-height: 57px;
  padding: var(--team-space);
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.team-search label { display: flex; align-items: center; flex: 1; min-width: 0; padding: 0 var(--team-space); gap: 7px; }
.team-search input { width: 100%; padding: 0; border: 0; background: transparent; color: #303133; font-size: 14px; }
.team-search input::placeholder { color: #c0c4cc; }
.team-search-icon { position: relative; width: 11px; height: 11px; flex: 0 0 11px; border: 1px solid #999; border-radius: 50%; }
.team-search-icon::after { content: ""; position: absolute; width: 4px; height: 1px; right: -3px; bottom: -1px; background: #999; transform: rotate(45deg); }
.team-search button { margin-inline: var(--team-gutter); padding: 0; border: 0; background: transparent; color: #7e7e7e; font-size: 16px; white-space: nowrap; }
.team-fan-list { padding: var(--team-space); }
.team-fan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  padding: var(--team-space);
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 5px rgb(0 0 0 / 5%);
  color: #666;
  font-size: 16px;
  line-height: 21px;
}
.team-fan > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.team-fan > div:last-child { text-align: end; }
.team-fan span, .team-fan strong { display: block; }
.team-fan strong { margin-bottom: 2px; color: #333; }
.team-fan-direct, .team-fan > div:last-child span:last-child { color: #f56c6c; }
.team-fan-list [data-team-items]:empty ~ p[data-team-end]:not([hidden]) { padding: 52px 0; font-size: 16px; }
:is(.team-fan-list, .team-order-list) [data-team-items]:not(:empty) ~ p[data-team-end] { display: none; }

#app.ref-team-member .page { padding-top: 1px; }
.team-details {
  margin: var(--team-space);
  padding: var(--team-gutter);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 6px rgb(0 0 0 / 5%);
}
.team-details header { display: flex; align-items: center; gap: 18px; height: 41px; margin-bottom: var(--team-gutter); }
.team-details header strong { font-size: 14px; font-weight: 500; }
.team-details-avatar { align-self: start; display: block; width: 33px; height: 36px; object-fit: cover; border: 1px solid rgb(107 107 107 / 30%); border-radius: 50%; }
.team-details dl { margin: 0; font-size: 13px; line-height: 17px; }
.team-details dl > div { display: flex; align-items: baseline; margin-bottom: var(--team-space); }
.team-details dl > div:last-child { margin-bottom: 0; }
.team-details dt { flex: 0 0 calc(var(--team-unit) * 179); color: #666; }
.team-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.team-details dl > div:first-child dd { color: var(--team-red); }

.team-order-tools { color: #666; background: #fff; }
.team-order-date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 42px;
  padding: var(--team-space) 0;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  color: inherit;
  background: transparent;
  font-size: 16px;
  line-height: 21px;
}
.team-order-date i { width: 5px; height: 5px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-1px) rotate(45deg); }
.team-order-tabs { display: grid; grid-template-columns: repeat(2, 1fr); border-bottom: 1px solid #f0f0f0; text-align: center; }
.team-order-tabs a { display: grid; place-items: center; min-height: 32px; border-bottom: 1px solid transparent; font-size: 13px; }
.team-order-tabs a[aria-current="page"] { border-color: #3c9cff; color: #3c9cff; }
.team-order-list { --team-space: 10px; margin: var(--team-space) 20px; }
.team-order-list [data-team-items]:empty ~ p[data-team-end]:not([hidden]) {
  display: grid;
  justify-items: center;
  gap: calc(var(--team-unit) * 100);
  padding-top: calc(var(--team-unit) * 100 + 2px);
  font-size: 16px;
}
.team-order-list [data-team-items]:empty ~ p[data-team-end]:not([hidden])::before {
  content: "";
  width: calc(var(--team-unit) * 200);
  aspect-ratio: 1;
  background: url("./assets/reference/team-order-empty.png") center/contain no-repeat;
}
.team-order { margin-bottom: var(--team-space); padding: var(--team-space) var(--team-space) 0; background: #fff; }
.team-order header { margin-bottom: 7px; color: #000; font-size: 13px; font-weight: 700; line-height: 17px; overflow-wrap: anywhere; }
.team-order-product { display: flex; align-items: flex-start; gap: var(--team-space); margin-bottom: 7px; }
.team-order-image { width: calc(var(--team-unit) * 170); aspect-ratio: 1; flex-shrink: 0; overflow: hidden; border-radius: 5px; background: #f5f5f5; }
.team-order-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.team-order-detail { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.team-order-detail strong { display: block; margin-bottom: 5px; color: #333; font-size: 14px; font-weight: 500; line-height: 19px; }
.team-order-detail p { margin-bottom: 2px; color: #9d6d6d; font-size: 12px; line-height: 16px; }
.team-order-amounts { display: flex; align-items: center; gap: var(--team-space); margin-bottom: 5px; }
.team-order-amounts b {
  box-sizing: content-box;
  width: 35%;
  min-width: 0;
  padding: 2px var(--team-space);
  border-radius: 2px;
  background: #f9eeed;
  color: #ff3e2a;
  font-size: 13px;
  line-height: 17px;
}
.team-order-amounts b:last-child { background: #e4f9f2; color: #00bc7e; }
.team-order footer { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding-top: var(--team-space); border-top: 1px solid #ddd; }
.team-order footer time { color: #999; font-size: 12px; }
.team-order footer span { flex-shrink: 0; padding: 3px 7px; border-radius: 10px 0 0 10px; background: #fc8131; color: #fff; font-size: 12px; line-height: 16px; }
.team-order footer .team-order-sale { background: #00bc82; }

.wh-mine-team > header :is(a, button) { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.team-order-list .team-order { border-radius: 4px; }
.team-order-list .team-order > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.team-order-status { flex-shrink: 0; color: #c72e39; }
.team-order-list .team-order-amounts { flex-wrap: wrap; gap: 4px 8px; }
.team-order-list .team-order-amounts b { box-sizing: border-box; width: auto; max-width: 100%; padding-inline: 7px; color: #c3382c; }
.team-order-list .team-order-amounts b:last-child { color: #00764d; }
.team-order-list .team-order footer { padding: 6px 0; border-color: #eee; }
.team-order-list .team-order-direction { padding-inline: 8px; border-radius: 12px; }
.team-order-direction.is-buyer { background: #008155; }
.team-order-direction.is-seller { background: #bc4b0c; }

.team-calendar[open] {
  position: fixed;
  inset: auto 0 0;
  display: grid;
  grid-template-rows: 42px 40px 35px minmax(0, 1fr) 54px;
  width: min(100%, 520px);
  height: min(446px, 76dvh);
  max-width: none;
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
  border-radius: 0;
  background: #fff;
  color: #303133;
  box-shadow: none;
}
.team-calendar::backdrop { background: rgb(0 0 0 / 50%); }
.team-calendar > header { position: relative; display: grid; place-items: center; color: #000; }
.team-calendar > header h2 { font-size: 16px; }
.team-calendar > header button { position: absolute; right: 12px; padding: 0; border: 0; background: none; color: #909399; }
.team-calendar-heading { display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.team-calendar-week, .team-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.team-calendar-week { align-items: center; border-bottom: 1px solid #d6d7d9; color: #303133; font-size: 14px; }
.team-calendar-body { position: relative; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.team-calendar-body h3 { display: grid; place-items: center; height: 42px; color: #303133; font-size: 14px; }
.team-calendar-grid { position: relative; align-items: center; grid-auto-rows: 52px; }
.team-calendar-watermark { position: absolute; inset: 0; display: grid; place-items: center; color: #ebecef; font-size: clamp(110px, 39vw, 170px); line-height: 1; pointer-events: none; }
.team-calendar-grid button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #303133;
  font-size: 16px;
  line-height: 18px;
}
.team-calendar-grid button:disabled { color: #c0c4cc; }
.team-calendar-grid button[data-range="between"] { background: #f0f7ff; color: #3c9cff; }
.team-calendar-grid button:is([data-range="start"], [data-range="end"]) { border-radius: 3px; background: #3c9cff; color: #fff; font-weight: 700; }
.team-calendar-grid small { color: inherit; font-size: 10px; line-height: 12px; }
.team-calendar-grid small:empty { display: none; }
.team-calendar > footer { display: grid; align-items: center; padding: 0 18px; background: #fff; }
.team-calendar > footer button { height: 40px; border: 0; border-radius: 20px; background: #3c9cff; color: #fff; font-size: 14px; }
.team-calendar > footer button:disabled { opacity: .55; }
