:root{
  --bg: #16151E;
  --bg2:#0f1017;
  --line: rgba(255,255,255,.08);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.55);
  --muted2: rgba(255,255,255,.35);

  --seg:#3E3D45;
  --seg2:#2E2D35;

  --lime:#BDE66B;
  --limePill:#D7ED73;

  --lav:#BBB3F4;

  --shadow: 0 30px 100px rgba(0,0,0,.55);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: #bdb7ff;
}

.scene{
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px 14px;
}

.phone{
  width: min(390px, 96vw);
  height: min(844px, 94vh);
  border-radius: 44px;
  background:
    radial-gradient(900px 520px at 55% -10%, rgba(255,255,255,.06), transparent 55%),
    radial-gradient(600px 420px at 90% 10%, rgba(189,230,107,.08), transparent 55%),
    linear-gradient(180deg, #1a1923, var(--bg));
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.10);
  overflow:hidden;
  position:relative;
  display:flex;
  flex-direction:column;
}

@media (max-width: 520px){
  body{background: var(--bg);}
  .scene{padding:0;}
  .phone{
    width:100vw; height:100vh;
    border-radius: 0;
    border:none;
    box-shadow:none;
  }
}

.toprow{
  padding: 14px 18px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  color: var(--text);
}
.top-ic{
  width: 36px; height: 36px;
  display:grid; place-items:center;
  border-radius: 14px;
  text-decoration:none;
}
.top-ic svg{
  width: 20px; height: 20px;
  fill: rgba(255,255,255,.85);
}
.top-mid{
  display:flex; align-items:center; gap: 8px;
  font-weight: 600;
  color: rgba(255,255,255,.78);
}
.top-name{font-size: 14px}
.top-caret{width:16px;height:16px; fill:none; stroke: rgba(255,255,255,.55); stroke-width:2; stroke-linecap:round; stroke-linejoin:round}
.top-right{display:flex; align-items:center; gap: 10px}

.top-avatar{
  width: 36px; height: 36px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.10);
  position:relative;
  overflow:hidden;
}
.ava-face{
  position:absolute; inset: 0;
  background:
    radial-gradient(12px 12px at 40% 35%, rgba(255,255,255,.55), rgba(255,255,255,.10)),
    radial-gradient(18px 18px at 55% 55%, rgba(187,179,244,.35), rgba(0,0,0,0));
}
.ava-dot{
  position:absolute; right:2px; bottom:2px;
  width:8px;height:8px;border-radius:999px;
  background: var(--lime);
  border: 2px solid rgba(22,21,30,.95);
  box-shadow: 0 0 12px rgba(189,230,107,.75);
}

.content{
  padding: 10px 18px 0;
  flex:1;
  overflow:auto;
}

.toast{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  margin-bottom: 10px;
}
.toast-ok{border-color: rgba(189,230,107,.22)}
.toast-danger{border-color: rgba(255,86,110,.25)}

.titleRow{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 10px;
  padding: 6px 0 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.h1{
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -.6px;
  color: rgba(255,255,255,.92);
}
.dateRange{
  display:flex; align-items:center; gap: 8px;
  color: rgba(255,255,255,.55);
  font-size: 12px;
  font-weight: 600;
}
.dateRange svg{width:16px;height:16px; fill: rgba(255,255,255,.45)}

.segment{
  margin-top: 14px;
  display:flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(62,61,69,.85);
}
.segment a{
  flex:1;
  text-align:center;
  text-decoration:none;
  color: rgba(255,255,255,.70);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 999px;
}
.segment a.active{
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.90);
}

.metric{
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.metric:last-of-type{border-bottom:none}

.mlabel{
  font-size: 12px;
  color: rgba(255,255,255,.55);
  font-weight: 600;
  margin-bottom: 6px;
}
.mrow{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 12px;
}
.mvalue{
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -.6px;
}
.mvalue .dec{
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,.55);
  margin-left: 2px;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  color: rgba(22,21,30,.95);
  white-space:nowrap;
}
.pill.lime{background: var(--limePill)}
.pill.lav{background: var(--lav)}
.pill svg{width:12px;height:12px; fill: rgba(22,21,30,.90)}

.ringWrap{
  padding: 18px 0 10px;
  display:flex;
  justify-content:center;
}
.donut{
  width: 270px;
  height: 270px;
  border-radius: 999px;
  position:relative;
  background: conic-gradient(
    var(--lime) 0deg var(--limeDeg),
    rgba(255,255,255,.08) var(--limeDeg) var(--gapDeg),
    var(--lav) var(--gapDeg) var(--lavDeg),
    rgba(255,255,255,.10) var(--lavDeg) 360deg
  );
  filter: drop-shadow(0 18px 36px rgba(0,0,0,.45));
}
.donut::before{
  content:"";
  position:absolute; inset: 28px;
  border-radius: 999px;
  background: radial-gradient(220px 220px at 50% 30%, rgba(255,255,255,.04), transparent 60%),
              linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,0));
  box-shadow: inset 0 0 0 18px rgba(0,0,0,.38);
}
.donut::after{
  content:"";
  position:absolute; inset: 64px;
  border-radius: 999px;
  background: radial-gradient(200px 200px at 50% 30%, rgba(255,255,255,.08), rgba(22,21,30,.98));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

.bolt{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  pointer-events:none;
  z-index:2;
}
.bolt svg{
  width: 120px;
  height: 120px;
  transform: translateY(4px);
  filter: drop-shadow(0 18px 26px rgba(0,0,0,.55));
}

.legend{
  display:flex;
  justify-content:center;
  gap: 18px;
  align-items:center;
  padding-bottom: 10px;
}
.dot{
  width:8px;height:8px;border-radius:999px;
  display:inline-block;
}
.dot.lime{background: var(--lime)}
.dot.lav{background: var(--lav)}
.leg{
  display:flex;
  gap:8px;
  align-items:center;
  font-size: 12px;
  color: rgba(255,255,255,.62);
  font-weight: 700;
}

.bottomnav{
  margin-top:auto;
  background: var(--lime);
  padding: 12px 16px 16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 8px;
}
.bn{
  width: 44px; height: 44px;
  display:grid; place-items:center;
  border-radius: 18px;
  text-decoration:none;
}
.bn svg{width: 20px; height: 20px; fill: rgba(0,0,0,.78)}
.bn-active .bn-bubble{
  width: 44px; height: 44px;
  border-radius: 999px;
  background: rgba(0,0,0,.12);
  display:grid; place-items:center;
}
.bn-active svg{fill: rgba(0,0,0,.92)}

@media (prefers-reduced-motion: no-preference){
  .ava-dot{animation: pulse 2.2s ease-in-out infinite}
  @keyframes pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.3)}}
  .donut{animation: floaty 2.8s ease-in-out infinite}
  @keyframes floaty{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
}

.input{width:100%;padding:14px 14px;border-radius:18px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.04);color:rgba(255,255,255,.92);outline:none}
label{display:block;margin:10px 0 6px;color:rgba(255,255,255,.55);font-size:12px;font-weight:600}
