:root{
  --bg:#0b1020;
  --panel:#121933;
  --panel2:#0f1530;
  --text:#eef3ff;
  --muted:#9fb0d3;
  --line:rgba(255,255,255,.08);
  --green:#22c55e;
  --red:#ef4444;
  --yellow:#f59e0b;
  --blue:#60a5fa;
  --shadow:0 10px 30px rgba(0,0,0,.28);
  --radius:18px;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Inter,Arial,sans-serif;
  background:linear-gradient(180deg,#09101f,#0e1730 45%,#0a1224);
  color:var(--text);
}
.wrap{
  max-width:1400px;
  margin:0 auto;
  padding:24px;
}
.hero{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:20px;
  flex-wrap:wrap;
}
.title h1{
  margin:0;
  font-size:32px;
  line-height:1.1;
}
.title p{
  margin:8px 0 0;
  color:var(--muted);
  font-size:14px;
}
.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}
.store-picker{
  display:flex;
  align-items:center;
  gap:8px;
  background:rgba(18,25,51,.88);
  border:1px solid var(--line);
  border-radius:12px;
  padding:8px 12px;
}
.section-title{
  margin:24px 0 12px;
  font-size:20px;
}
.grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:16px;
  margin-bottom:20px;
}
.card{
  background:rgba(18,25,51,.88);
  backdrop-filter:blur(10px);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.stat{ padding:18px; }
.stat .label{
  font-size:13px;
  color:var(--muted);
  margin-bottom:10px;
}
.stat .value{
  font-size:30px;
  font-weight:700;
  letter-spacing:.2px;
}
.stat .value.small{ font-size:18px; }
.toolbar{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  padding:18px;
  margin-bottom:20px;
  flex-wrap:wrap;
}
.toolbar-left, .toolbar-right{
  display:flex;
  gap:14px;
  align-items:center;
  flex-wrap:wrap;
}
.status-panel > div{
  min-width:120px;
}
.switch{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:var(--text);
  font-size:14px;
}
.switch input{display:none}
.slider{
  width:52px;
  height:30px;
  background:#334155;
  border-radius:999px;
  position:relative;
  cursor:pointer;
  transition:.2s;
  border:1px solid rgba(255,255,255,.08);
}
.slider::after{
  content:"";
  width:24px;
  height:24px;
  background:#fff;
  border-radius:50%;
  position:absolute;
  top:2px;
  left:3px;
  transition:.2s;
}
input:checked + .slider{ background:var(--green); }
input:checked + .slider::after{ left:23px; }
select{
  background:var(--panel2);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 14px;
  font-size:14px;
  outline:none;
}
button{
  background:linear-gradient(135deg,#3b82f6,#2563eb);
  color:#fff;
  border:none;
  border-radius:12px;
  padding:10px 16px;
  font-size:14px;
  cursor:pointer;
  font-weight:600;
}
button.secondary{ background:linear-gradient(135deg,#475569,#334155); }
button:hover{ opacity:.94 }
.inline-label{ margin-right:8px; }
.table-card{ overflow:hidden; }
.table-wrap{ overflow:auto; }
table{
  width:100%;
  border-collapse:collapse;
  min-width:1100px;
}
th,td{
  padding:16px 14px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:top;
  font-size:14px;
}
th{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#b7c5e6;
  background:rgba(255,255,255,.02);
  position:sticky;
  top:0;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  color:#fff;
  white-space:nowrap;
}
.chart-card { padding:24px; height:380px; }
.online{background:rgba(34,197,94,.18); color:#86efac; border:1px solid rgba(34,197,94,.25)}
.offline{background:rgba(239,68,68,.16); color:#fca5a5; border:1px solid rgba(239,68,68,.22)}
.disabled{background:rgba(245,158,11,.16); color:#fcd34d; border:1px solid rgba(245,158,11,.24)}
.unknown{background:rgba(96,165,250,.14); color:#bfdbfe; border:1px solid rgba(96,165,250,.2)}
.dot{ width:8px;height:8px;border-radius:50%;background:currentColor;display:inline-block; }
tr.offline-row { background: rgba(239,68,68,0.08); }
.zones{ display:flex; flex-wrap:wrap; gap:8px; }
.zone{
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid var(--line);
  color:#dbe7ff;
  font-size:12px;
}
.muted{ color:var(--muted) }
.error{ color:#fca5a5; font-size:13px; margin-top:14px; }
.success{ color:#86efac; font-size:13px; margin-top:14px; }
@media (max-width: 1100px){
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 640px){
  .grid{grid-template-columns:1fr}
  .title h1{font-size:26px}
}


.checkbox-wrapper input[type="checkbox"] {
  display: none;
  visibility: hidden;
}

.checkbox-wrapper *,
  .checkbox-wrapper *::before,
  .checkbox-wrapper *::after {
  box-sizing: border-box;
}

.checkbox-wrapper .toggleButton {
  cursor: pointer;
  display: block;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  transition: transform 0.14s ease;
}

.checkbox-wrapper .toggleButton:active {
  transform: rotateX(30deg);
}

.checkbox-wrapper .toggleButton input + div {
  border: 3px solid rgba(28, 255, 77, 0.531);
  border-radius: 50%;
  position: relative;
  width: 35px;  
  height: 35px;
}

.checkbox-wrapper .toggleButton input + div svg {
  fill: none;
  stroke-width: 3.6;
  stroke: rgb(52, 179, 97);
  stroke-linecap: round;
  stroke-linejoin: round;
  width: 35px;
  height: 35px;
  display: block;
  position: absolute;
  left: -3px;
  top: -3px;
  right: -3px;
  bottom: -3px;
  z-index: 1;
  stroke-dashoffset: 124.6;
  stroke-dasharray: 0 162.6 133 29.6;
  transition: all 0.4s ease 0s;
}

.checkbox-wrapper .toggleButton input + div:before,
  .checkbox-wrapper .toggleButton input + div:after {
  content: "";
  width: 3px;
  height: 16px;
  background: #ffffffdc;
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 5px;
}

.checkbox-wrapper .toggleButton input + div:before {
  opacity: 0;
  transform: scale(0.3) translate(-50%, -50%) rotate(45deg);
  -webkit-animation: bounceInBefore-44 0.3s linear forwards 0.3s;
  animation: bounceInBefore-44 0.3s linear forwards 0.3s;
}

.checkbox-wrapper .toggleButton input + div:after {
  opacity: 0;
  transform: scale(0.3) translate(-50%, -50%) rotate(-45deg);
  -webkit-animation: bounceInAfter-44 0.3s linear forwards 0.3s;
  animation: bounceInAfter-44 0.3s linear forwards 0.3s;
}

.checkbox-wrapper .toggleButton input:checked + div svg {
  stroke-dashoffset: 162.6;
  stroke-dasharray: 0 162.6 28 134.6;
  transition: all 0.4s ease 0.2s;
}

.checkbox-wrapper .toggleButton input:checked + div:before {
  opacity: 0;
  transform: scale(0.3) translate(-50%, -50%) rotate(45deg);
  -webkit-animation: bounceInBeforeDont-44 0.3s linear forwards 0s;
  animation: bounceInBeforeDont-44 0.3s linear forwards 0s;
}

.checkbox-wrapper .toggleButton input:checked + div:after {
  opacity: 0;
  transform: scale(0.3) translate(-50%, -50%) rotate(-45deg);
  -webkit-animation: bounceInAfterDont-44 0.3s linear forwards 0s;
  animation: bounceInAfterDont-44 0.3s linear forwards 0s;
}

@-webkit-keyframes bounceInBefore-44 {
  0% {
    opacity: 0;
    transform: scale(0.3) translate(-50%, -50%) rotate(45deg);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.1) translate(-50%, -50%) rotate(45deg);
  }

  80% {
    opacity: 1;
    transform: scale(0.89) translate(-50%, -50%) rotate(45deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%) rotate(45deg);
  }
}

@keyframes bounceInBefore-44 {
  0% {
    opacity: 0;
    transform: scale(0.3) translate(-50%, -50%) rotate(45deg);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.1) translate(-50%, -50%) rotate(45deg);
  }

  80% {
    opacity: 1;
    transform: scale(0.89) translate(-50%, -50%) rotate(45deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%) rotate(45deg);
  }
}

@-webkit-keyframes bounceInAfter-44 {
  0% {
    opacity: 0;
    transform: scale(0.3) translate(-50%, -50%) rotate(-45deg);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.1) translate(-50%, -50%) rotate(-45deg);
  }

  80% {
    opacity: 1;
    transform: scale(0.89) translate(-50%, -50%) rotate(-45deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%) rotate(-45deg);
  }
}

@keyframes bounceInAfter-44 {
  0% {
    opacity: 0;
    transform: scale(0.3) translate(-50%, -50%) rotate(-45deg);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.1) translate(-50%, -50%) rotate(-45deg);
  }

  80% {
    opacity: 1;
    transform: scale(0.89) translate(-50%, -50%) rotate(-45deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%) rotate(-45deg);
  }
}

@-webkit-keyframes bounceInBeforeDont-44 {
  0% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%) rotate(45deg);
  }

  100% {
    opacity: 0;
    transform: scale(0.3) translate(-50%, -50%) rotate(45deg);
  }
}

@keyframes bounceInBeforeDont-44 {
  0% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%) rotate(45deg);
  }

  100% {
    opacity: 0;
    transform: scale(0.3) translate(-50%, -50%) rotate(45deg);
  }
}

@-webkit-keyframes bounceInAfterDont-44 {
  0% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%) rotate(-45deg);
  }

  100% {
    opacity: 0;
    transform: scale(0.3) translate(-50%, -50%) rotate(-45deg);
  }
}

@keyframes bounceInAfterDont-44 {
  0% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%) rotate(-45deg);
  }

  100% {
    opacity: 0;
    transform: scale(0.3) translate(-50%, -50%) rotate(-45deg);
  }
}



.toggle-row{
  display:flex;
  align-items:center;
  gap:10px;
}



.store-dropdown {
  position: relative;
    z-index: 1000;
}

.store-button {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  min-width: 140px;
  justify-content: space-between;
}

.store-menu {
  position: absolute;
  top: 110%;
  left: 0;
  width: 150px;
  background: #1e293b;
  border-radius: 16px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: 0.2s;
    z-index: 2000; 

      box-shadow: 0 20px 40px rgba(0,0,0,0.4);

}




.store-menu :hover{
  border-radius: 16px;

}


.store-menu.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.store-item {
  padding: 11px 18px;
  cursor: pointer;
}



.store-item:hover {
  background: rgba(59,130,246,0.2);
}









/* .demo-demography-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
  margin: 24px 0;
} */

.demo-demography-wrap {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
}


.demo-card {
  background: #fff;
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid #eef2f7;

  display: flex;              /* 👈 加这个 */
  flex-direction: column;     /* 👈 垂直布局 */
}

.demo-card-header {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
    margin-bottom: 10px;

}


/* 
.gender-panel {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  gap: 20px;
  min-height: 280px;
}

.gender-item {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fafcff 0%, #f7f9fc 100%);
}

.gender-icon {
  position: relative;
  width: 88px;
  height: 160px;
  margin: 0 auto 16px;
}

.gender-icon .head {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
  margin: 0 auto;
}

.gender-icon .body {
  position: absolute;
  left: 50%;
  top: 42px;
  transform: translateX(-50%);
  width: 34px;
  height: 54px;
  border-radius: 16px;
  background: currentColor;
}

.gender-icon .dress {
  width: 54px;
  height: 62px;
  border-radius: 18px 18px 28px 28px;
  clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
}

.gender-icon .arm {
  position: absolute;
  top: 50px;
  width: 12px;
  height: 56px;
  border-radius: 10px;
  background: currentColor;
}

.gender-icon .arm.left {
  left: 10px;
  transform: rotate(18deg);
}

.gender-icon .arm.right {
  right: 10px;
  transform: rotate(-18deg);
}

.gender-icon .leg {
  position: absolute;
  bottom: 0;
  width: 14px;
  height: 62px;
  border-radius: 10px;
  background: currentColor;
}

.gender-icon .leg.left {
  left: 28px;
}

.gender-icon .leg.right {
  right: 28px;
}

.female-icon {
  color: #ef476f;
}

.male-icon {
  color: #2bb3ff;
}

.gender-value {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.gender-label {
  margin-top: 6px;
  font-size: 16px;
  color: #475569;
  font-weight: 600;
}

.gender-count {
  margin-top: 8px;
  font-size: 13px;
  color: #94a3b8;
} */


.gender-panel.simple {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;

  flex: 1;                    /* 👈 关键 */
  align-items: center;        /* 👈 垂直居中 */
}



.gender-box {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 18px;
  padding: 18px 16px;
  text-align: center;
}

/* 
.gender-box {
  padding: 18px 16px;
} */


.age-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 280px;
  gap: 24px;
  align-items: center;
}

.age-chart-wrap {
  width: 280px;
  height: 280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.simple-person {
  width: 50px;
  height: 70px;
  margin: 0 auto 16px;
  position: relative;
  color: #94a3b8;
}

.sp-head {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: currentColor;
  margin: 0 auto;
}

.sp-body {
  position: absolute;
  left: 50%;
  top: 34px;
  transform: translateX(-50%);
  background: currentColor;
}

.female-person {
  color: #ef476f;
}

.male-person {
  color: #38bdf8;
}

.female-shape {
  width: 42px;
  height: 42px;
  clip-path: polygon(22% 0%, 78% 0%, 100% 100%, 0% 100%);
  border-radius: 8px 8px 14px 14px;
}

.male-shape {
  width: 30px;
  height: 46px;
  border-radius: 12px;
}

.gender-value {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  margin-bottom: 14px;
}

.gender-progress {
  width: 100%;
  height: 12px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.gender-progress-fill {
  height: 100%;
  border-radius: 999px;
}

.female-fill {
  background: linear-gradient(90deg, #fb7185 0%, #ef476f 100%);
}

.male-fill {
  background: linear-gradient(90deg, #67e8f9 0%, #38bdf8 100%);
}

.gender-label {
  font-size: 16px;
  font-weight: 700;
  color: #334155;
}

.gender-count {
  margin-top: 6px;
  font-size: 14px;
  color: #94a3b8;
}

.age-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 0;
}

.age-row {
  display: grid;
  grid-template-columns: 110px 1fr 52px;
  align-items: center;
  gap: 14px;
}

.age-name {
  font-size: 14px;
  color: #334155;
  font-weight: 600;
}

.age-bar {
  height: 14px;
  background: #edf2f7;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.age-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c1c3 0%, #38bdf8 100%);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.28);
}

.age-value {
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

@media (max-width: 900px) {
  .demo-demography-wrap {
    grid-template-columns: 1fr;
  }
}



/* ===== VION mini traffic widget ===== */

.vv-mini-card {
  background: #111a32;
  border-radius: 32px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
  padding: 28px 28px 24px;
  color: #f3f6fa;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}

.vv-mini-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.vv-mini-title {
  font-family: "Inter", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #f3f6fa;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0;
}

.vv-mini-chart {
  position: relative;
  height: 220px;
  width: 100%;
}

.vv-mini-chart canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.22));
}

.vv-mini-footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.vv-mini-desc {
  font-size: 0.95rem;
  color: #b8c0cc;
  line-height: 1.4;
}

.vv-mini-metrics {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.vv-mini-value {
  font-size: 3.2rem;
  line-height: 1;
  font-weight: 700;
  color: #3d8bff;
  letter-spacing: -0.02em;
}

.vv-mini-change {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1ecb6b;
  white-space: nowrap;
}

/* ===== VION menu ===== */

.vv-menu-wrapper {
  position: relative;
  display: inline-block;
  margin-right: 2px;
}

.vv-menu-dots {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  width: 18px;
  align-items: center;
  margin: 0;
  padding-top: 4px;
}

.vv-menu-dots span {
  display: block;
  width: 6px;
  height: 6px;
  background: #778096;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.vv-menu-dots:hover span {
  background: #aeb6c3;
}

.vv-menu-toggle {
  display: none;
}

.vv-menu-select {
  display: none;
  position: absolute;
  right: 0;
  top: 30px;
  min-width: 128px;
  z-index: 20;
  padding: 8px 0;
  border-radius: 18px;
  border: 1px solid rgba(80, 90, 120, 0.18);
  background: rgba(30, 34, 44, 0.86);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transform: scale(0.95) translateY(-8px);
  pointer-events: none;
}

.vv-menu-toggle:checked + .vv-menu-dots + .vv-menu-select {
  display: block;
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.vv-menu-select div {
  padding: 10px 16px;
  color: #f3f6fa;
  cursor: pointer;
  font-size: 14px;
  font-family: "Inter", sans-serif;
  border-left: 3px solid transparent;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-left 0.18s ease;
}

.vv-menu-select div:nth-child(1) {
  border-left: 3px solid #3d8bff;
}

.vv-menu-select div:nth-child(2) {
  border-left: 3px solid #ff6a3d;
}

.vv-menu-select div:nth-child(3) {
  border-left: 3px solid #1ecb6b;
}

.vv-menu-select div:hover {
  background: rgba(61, 139, 255, 0.08);
  color: #3d8bff;
  border-left: 3px solid #3d8bff;
}

.vv-menu-select div:nth-child(2):hover {
  background: rgba(255, 106, 61, 0.08);
  color: #ff6a3d;
  border-left: 3px solid #ff6a3d;
}

.vv-menu-select div:nth-child(3):hover {
  background: rgba(30, 203, 107, 0.08);
  color: #1ecb6b;
  border-left: 3px solid #1ecb6b;
}

/* ===== Responsive ===== */

@media (max-width: 900px) {
  .vv-mini-card {
    padding: 22px 20px 20px;
    border-radius: 24px;
  }

  .vv-mini-chart {
    height: 180px;
  }

  .vv-mini-title {
    font-size: 1rem;
  }

  .vv-mini-value {
    font-size: 2.4rem;
  }

  .vv-mini-change {
    font-size: 1rem;
  }

  .vv-mini-metrics {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}


.vv-mini-chart {
  position: relative;
  height: 240px;
  width: 100%;
}

.vv-mini-chart canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(61, 139, 255, 0.12));
}