/* ==========================================================================
   道威斯顿 · 销售荣耀榜 —— 轮播版样式
   配色对齐官网 www.doweston.cn：
     藏青 #002565 / 深青 #001440 / 品牌红 #e5212a / 信息蓝 #0090e2
     浅底 #f5f7fa / 卡片白 / 细线 #e4e7ee
   画布 1920×1080，由 JS 自动等比缩放适配电视。
   ========================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: #e9edf5;
  color: #1e2230;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

b, strong { font-variant-numeric: tabular-nums; }

/* ---------- 画布 ---------- */
#scaler { width: 100%; height: 100%; overflow: hidden; position: relative; }

#stage {
  width: 1920px; height: 1080px;
  transform-origin: top left;
  position: relative;
  display: flex; flex-direction: column;
  background:
    radial-gradient(1200px 620px at 88% -12%, rgba(0, 37, 101, .10), transparent 62%),
    radial-gradient(900px 520px at -8% 112%, rgba(229, 33, 42, .06), transparent 58%),
    linear-gradient(180deg, #f8fafc 0%, #eef1f7 100%);
}
/* 极浅的网格肌理 */
#stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 37, 101, .032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 37, 101, .032) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ---------- 顶部品牌条 ---------- */
.topline {
  height: 5px; flex: none; position: relative; z-index: 3;
  background: linear-gradient(90deg, #e5212a 0 340px, #002565 340px 100%);
}

.topbar {
  height: 102px; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 56px; position: relative; z-index: 2;
}

.brand { display: flex; align-items: baseline; gap: 20px; }
.brand-logo {
  font-size: 36px; font-weight: 800; color: #002565;
  letter-spacing: 3px; font-family: "Barlow", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.brand-logo .chev { color: #e5212a; font-weight: 900; margin-left: 2px; }
.brand-cn { font-size: 20px; color: #7a8398; letter-spacing: 5px; }
.brand-cn em { font-style: normal; color: #002565; font-weight: 700; }

.page-kind {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #002565, #003a8c);
  color: #fff; font-size: 21px; font-weight: 600; letter-spacing: 4px;
  padding: 13px 36px; border-radius: 999px;
  box-shadow: 0 12px 28px rgba(0, 37, 101, .25);
  max-width: 720px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.page-kind i {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: #00cfff; box-shadow: 0 0 12px #00cfff;
}

.head-right { display: flex; align-items: center; gap: 26px; }

.live {
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 600; color: #3d9e5f; letter-spacing: 2px;
}
.live i {
  width: 10px; height: 10px; border-radius: 50%; background: #5ab14b;
  animation: pulse 1.8s ease-out infinite;
}
.live.err { color: #e5212a; }
.live.err i { background: #e5212a; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(90, 177, 75, .5); }
  70%  { box-shadow: 0 0 0 10px rgba(90, 177, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(90, 177, 75, 0); }
}

.clock { text-align: right; }
.clock b {
  display: block; font-size: 33px; font-weight: 800; color: #002565;
  letter-spacing: 2px; line-height: 1.1;
}
.clock span { font-size: 15px; color: #8a93a6; letter-spacing: 2px; }

/* ---------- 轮播区 ---------- */
.viewport { flex: 1; position: relative; z-index: 1; }

.slide {
  position: absolute; inset: 0;
  padding: 12px 64px 8px;
  display: flex;
  opacity: 0; transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
  pointer-events: none;
}
.slide.on { opacity: 1; transform: none; pointer-events: auto; }

/* ========== 页型 1：全公司总览 ========== */
.s-over {
  flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
}
.over-eyebrow {
  font-size: 21px; color: #e5212a; font-weight: 700; letter-spacing: 7px;
}
.over-h {
  margin-top: 20px;
  font-size: 58px; color: #002565; font-weight: 800; letter-spacing: 8px;
}
.over-h em {
  display: block; font-style: normal; margin-top: 14px;
  font-size: 17px; color: #9aa3b5; letter-spacing: 9px; font-weight: 500;
}
.over-cards { display: flex; gap: 38px; margin-top: 62px; }
.ovc {
  width: 392px; text-align: left;
  background: #fff; border: 1px solid #e7ebf3; border-radius: 20px;
  padding: 38px 38px 32px;
  position: relative;
  box-shadow: 0 22px 48px rgba(0, 37, 101, .08);
}
.ovc::before {
  content: ""; position: absolute; left: 0; top: 36px; bottom: 36px;
  width: 5px; border-radius: 0 99px 99px 0; background: #e5212a;
}
.ovc.c-red::before  { background: #e5212a; }
.ovc.c-navy::before { background: #002565; }
.ovc.c-blue::before { background: #0090e2; }
.ovc-label { font-size: 20px; color: #5b6577; letter-spacing: 4px; font-weight: 600; }
.ovc-num { margin-top: 18px; display: flex; align-items: baseline; gap: 10px; }
.ovc-num b { font-size: 86px; font-weight: 800; color: #002565; line-height: 1; }
.ovc-num em { font-style: normal; font-size: 22px; color: #8a93a6; }
.ovc-today { margin-top: 18px; font-size: 18px; font-weight: 700; color: #3d9e5f; letter-spacing: 1px; }
.ovc-today.zero { color: #9aa3b5; font-weight: 500; }
.over-foot { margin-top: 58px; font-size: 16px; color: #9aa3b5; letter-spacing: 3px; }

/* ========== 页型 2：上月销冠 ========== */
.s-champ { align-items: center; gap: 30px; }
.ch-left { flex: 1; padding-left: 26px; min-width: 0; }
.ch-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 21px; color: #e5212a; font-weight: 700; letter-spacing: 4px;
  background: rgba(229, 33, 42, .07);
  border: 1px solid rgba(229, 33, 42, .28);
  padding: 11px 26px; border-radius: 999px;
}
.ch-h { margin-top: 28px; font-size: 66px; color: #002565; font-weight: 800; letter-spacing: 8px; }
.ch-h em {
  display: block; font-style: normal; margin-top: 12px;
  font-size: 17px; color: #9aa3b5; letter-spacing: 7px; font-weight: 500;
}
.ch-amount { margin-top: 42px; }
.ch-amount label { display: block; font-size: 18px; color: #8a93a6; letter-spacing: 4px; }
.ch-amount b {
  font-size: 100px; font-weight: 800; color: #e5212a; line-height: 1.08;
  letter-spacing: 1px;
}
.ch-meta { margin-top: 12px; font-size: 22px; color: #5b6577; letter-spacing: 3px; }
.ch-runners { margin-top: 44px; display: flex; flex-direction: column; gap: 13px; }
.runner {
  display: flex; align-items: center; gap: 16px;
  width: 500px;
  background: #fff; border: 1px solid #e7ebf3; border-radius: 14px;
  padding: 15px 24px;
  box-shadow: 0 10px 22px rgba(0, 37, 101, .05);
}
.runner .medal { font-size: 24px; }
.runner .r-name { font-size: 20px; color: #1e2230; font-weight: 600; letter-spacing: 2px; }
.runner .r-amt { margin-left: auto; font-size: 23px; color: #002565; font-weight: 800; }

.ch-right {
  width: 560px; flex: none;
  display: flex; flex-direction: column; align-items: center;
}
.ch-ring {
  width: 396px; height: 396px; border-radius: 50%; padding: 9px;
  background: conic-gradient(from 210deg, #e5212a, #002565, #0090e2, #e5212a);
  box-shadow: 0 32px 72px rgba(0, 37, 101, .28);
}
.ch-ava {
  width: 100%; height: 100%; border-radius: 50%;
  background: linear-gradient(160deg, #002565, #003a8c) center/cover no-repeat;
  border: 8px solid #fff;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 126px; font-weight: 800; letter-spacing: 4px;
}
.ch-name { margin-top: 36px; font-size: 54px; font-weight: 800; color: #002565; letter-spacing: 8px; }
.ch-title { margin-top: 12px; font-size: 20px; color: #8a93a6; letter-spacing: 4px; }
.ch-empty {
  margin-top: 60px; font-size: 26px; color: #9aa3b5; letter-spacing: 4px;
  border: 1px dashed #ccd4e6; border-radius: 18px; padding: 50px 40px; text-align: center;
}

/* ========== 页型 3：个人页（每页一个人） ========== */
.s-person { align-items: center; gap: 74px; }

.p-left {
  width: 500px; flex: none;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding-top: 10px;
}
.p-ava-wrap { position: relative; }
.p-ava {
  width: 356px; height: 356px; border-radius: 34px;
  background: linear-gradient(160deg, #002565, #003a8c) center/cover no-repeat;
  border: 1px solid #dfe5ef;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 118px; font-weight: 800; letter-spacing: 4px;
  box-shadow: 0 28px 62px rgba(0, 37, 101, .22);
}
.p-rank {
  position: absolute; left: 50%; bottom: -21px; transform: translateX(-50%);
  white-space: nowrap;
  font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #fff;
  padding: 11px 28px; border-radius: 999px;
}
.p-rank.top    { background: linear-gradient(90deg, #e5212a, #c0161e); box-shadow: 0 14px 30px rgba(229, 33, 42, .38); }
.p-rank.normal { background: linear-gradient(90deg, #002565, #003a8c); box-shadow: 0 14px 30px rgba(0, 37, 101, .32); }
.p-name { margin-top: 48px; font-size: 56px; font-weight: 800; color: #002565; letter-spacing: 6px; }
.p-title { margin-top: 12px; font-size: 20px; color: #8a93a6; letter-spacing: 3px; }

.p-right { flex: 1; min-width: 0; padding-right: 10px; }
.p-teamtag {
  display: inline-block;
  font-size: 17px; font-weight: 700; letter-spacing: 4px;
  padding: 9px 22px; border-radius: 999px;
}
.p-teamtag.domestic { color: #e5212a; border: 1px solid rgba(229, 33, 42, .32); background: rgba(229, 33, 42, .06); }
.p-teamtag.foreign  { color: #0090e2; border: 1px solid rgba(0, 144, 226, .35); background: rgba(0, 144, 226, .07); }

.p-cards { display: flex; gap: 26px; margin-top: 32px; }
.pc {
  flex: 1; position: relative; overflow: hidden;
  background: #fff; border: 1px solid #e7ebf3; border-radius: 18px;
  padding: 32px 28px 30px;
  box-shadow: 0 18px 40px rgba(0, 37, 101, .07);
}
.pc::after {
  content: ""; position: absolute; right: -34px; top: -34px;
  width: 116px; height: 116px; border-radius: 50%;
  background: rgba(0, 37, 101, .045);
}
.pc label { font-size: 18px; color: #5b6577; letter-spacing: 3px; font-weight: 600; }
.pc-num { margin-top: 18px; display: flex; align-items: baseline; gap: 8px; }
.pc-num b { font-size: 66px; font-weight: 800; color: #002565; line-height: 1; }
.pc-num em { font-style: normal; font-size: 18px; color: #8a93a6; }
.pc-today {
  display: inline-block; margin-top: 18px;
  font-size: 16px; font-weight: 700; color: #3d9e5f;
  background: rgba(90, 177, 75, .13);
  padding: 7px 15px; border-radius: 999px; letter-spacing: 1px;
}
.pc-today.zero { color: #9aa3b5; background: rgba(0, 37, 101, .06); font-weight: 500; }

.p-deal {
  margin-top: 30px;
  display: flex; align-items: baseline; gap: 18px;
  background: linear-gradient(92deg, #002565, #003a8c);
  border-radius: 18px; padding: 26px 36px;
  color: #fff;
  box-shadow: 0 20px 44px rgba(0, 37, 101, .28);
}
.p-deal label { font-size: 18px; letter-spacing: 4px; color: rgba(255, 255, 255, .72); }
.p-deal b { font-size: 46px; font-weight: 800; color: #ffd341; letter-spacing: 1px; }
.p-deal span { font-size: 18px; color: rgba(255, 255, 255, .72); letter-spacing: 2px; margin-left: auto; }
.p-deal.empty {
  background: #fff; border: 1px dashed #ccd4e6; box-shadow: none;
  justify-content: center;
  font-size: 18px; color: #9aa3b5; letter-spacing: 3px;
}

/* ---------- 底栏 ---------- */
.botbar {
  height: 62px; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 56px; position: relative; z-index: 2;
  border-top: 1px solid rgba(0, 37, 101, .08);
}
.src { font-size: 15px; color: #8a93a6; letter-spacing: 1px; }
.dots { display: flex; gap: 7px; align-items: center; }
.dots i {
  width: 7px; height: 7px; border-radius: 99px;
  background: #c6cedd; transition: all .3s ease;
}
.dots i.on { width: 26px; background: #e5212a; }
.pager { font-size: 16px; color: #5b6577; letter-spacing: 1px; }

/* ---------- 断网提示 ---------- */
.offline {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%);
  z-index: 50;
  display: flex; align-items: center; gap: 12px;
  background: #002565; color: #fff;
  font-size: 16px; letter-spacing: 1px;
  padding: 14px 30px; border-radius: 999px;
  box-shadow: 0 18px 44px rgba(0, 37, 101, .4);
}
.offline.hidden { display: none; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
