/* WUG light-first visual refresh */
.brand-mark,
.mini-avatar {
  background: linear-gradient(145deg, #fff4c8 0%, #dce9ff 48%, #dfd7ff 100%) !important;
  border: 1px solid rgba(119, 98, 183, 0.28) !important;
  color: #17233a !important;
  box-shadow: 0 8px 24px rgba(80, 103, 160, 0.16) !important;
}

.brand-mark {
  width: 46px !important;
  font-size: 11px !important;
  letter-spacing: 0.08em;
}

.service-simple .service-overview > div::after,
.service-simple .service-choice::after {
  display: none !important;
}

.app-shell.light {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --surface-3: #edf1f8;
  --line: rgba(42, 55, 86, 0.13);
  --muted: #718096;
  --text: #17233a;
  --cyan: #3c7dcc;
  --green: #2d9b7d;
  --amber: #b78224;
  --blue: #3975c6;
  --red: #ce5260;
  --violet: #7663c7;
  --pink: #a75d94;
  --grid: rgba(61, 92, 151, 0.055);
  --glow-cyan: rgba(60, 125, 204, 0.13);
  --glow-pink: rgba(118, 99, 199, 0.09);
}

.app-shell.light .main,
.app-shell.light.public-mode {
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    radial-gradient(circle at 12% 4%, rgba(255, 218, 137, 0.24), transparent 26%),
    radial-gradient(circle at 88% 10%, rgba(161, 190, 239, 0.28), transparent 30%),
    #f4f6fb !important;
  background-size: 32px 32px, 32px 32px, auto, auto, auto !important;
}

.app-shell.light .sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%) !important;
  border-color: rgba(51, 67, 103, 0.12) !important;
  box-shadow: 12px 0 36px rgba(54, 70, 105, 0.06) !important;
}

.app-shell.light .topbar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: rgba(51, 67, 103, 0.11) !important;
  box-shadow: 0 10px 32px rgba(54, 70, 105, 0.08) !important;
}

.app-shell.light .panel,
.app-shell.light .service-overview > div,
.app-shell.light .service-choice,
.app-shell.light .executive-chart-card,
.app-shell.light .executive-kpi {
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fd 100%) !important;
  border-color: rgba(69, 91, 138, 0.16) !important;
  box-shadow: 0 14px 34px rgba(50, 67, 105, 0.09), inset 0 1px #ffffff !important;
}

.app-shell.light .service-choice {
  color: #17233a !important;
}

.app-shell.light .service-choice:hover {
  border-color: rgba(74, 111, 183, 0.38) !important;
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(50, 82, 145, 0.14) !important;
}

.app-shell.light .service-choice-create {
  background: linear-gradient(135deg, #fff8e4, #ffffff 55%, #f2f6ff) !important;
}

.app-shell.light .service-choice-lookup {
  background: linear-gradient(135deg, #edf5ff, #ffffff 58%, #f0f8ff) !important;
}

.app-shell.light .service-choice-orders {
  background: linear-gradient(135deg, #f2efff, #ffffff 58%, #f7f4ff) !important;
}

.app-shell.light .service-choice-dashboard {
  background: linear-gradient(135deg, #eaf9f5, #ffffff 58%, #eff8ff) !important;
}

.app-shell.light .service-choice-auth {
  background: linear-gradient(135deg, #fff1f6, #ffffff 58%, #f7f1ff) !important;
}

.app-shell.light .executive-hero {
  background:
    linear-gradient(135deg, rgba(255, 238, 190, 0.64), rgba(227, 237, 255, 0.78) 52%, rgba(238, 232, 255, 0.72)),
    #ffffff !important;
  border-color: rgba(83, 101, 148, 0.16) !important;
  box-shadow: 0 18px 44px rgba(55, 75, 116, 0.1) !important;
}

.app-shell.light .executive-bar-chart,
.app-shell.light .executive-line-chart {
  background:
    linear-gradient(rgba(61, 92, 151, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 92, 151, 0.05) 1px, transparent 1px),
    #fbfcff !important;
  background-size: 36px 36px !important;
  border-color: rgba(69, 91, 138, 0.13) !important;
}

.app-shell.light .executive-bar {
  background: linear-gradient(180deg, #7da8e3 0%, #6d69c6 58%, #c79b4f 100%) !important;
  box-shadow: 0 8px 20px rgba(83, 96, 174, 0.2) !important;
}

.app-shell.light .executive-kpis > div,
.app-shell.light .executive-chart-card,
.app-shell.light .executive-detail-strip {
  border-color: rgba(75, 96, 141, 0.16) !important;
  background: #ffffff !important;
  box-shadow: 0 12px 28px rgba(54, 72, 111, 0.09), inset 0 1px #ffffff !important;
}

.app-shell.light .executive-kpis > div:nth-child(1) {
  background: linear-gradient(135deg, #fff7df, #ffffff 66%) !important;
}

.app-shell.light .executive-kpis > div:nth-child(2) {
  background: linear-gradient(135deg, #ebf4ff, #ffffff 66%) !important;
}

.app-shell.light .executive-kpis > div:nth-child(3) {
  background: linear-gradient(135deg, #f1edff, #ffffff 66%) !important;
}

.app-shell.light .executive-kpis > div:nth-child(4) {
  background: linear-gradient(135deg, #e9faf6, #ffffff 66%) !important;
}

.app-shell.light .executive-kpis > div:nth-child(5) {
  background: linear-gradient(135deg, #fff0f5, #ffffff 66%) !important;
}

.app-shell.light .executive-kpis > div:nth-child(6) {
  background: linear-gradient(135deg, #eef3ff, #ffffff 66%) !important;
}

.app-shell.light .executive-kpis > div::before,
.app-shell.light .executive-chart-card::before {
  background: linear-gradient(90deg, #d4a849, #789fdb, transparent) !important;
  box-shadow: none !important;
}

.app-shell.light .executive-kpis span,
.app-shell.light .executive-kpis small,
.app-shell.light .executive-detail-strip span {
  color: #758197 !important;
}

.app-shell.light .executive-kpis strong,
.app-shell.light .executive-card-head h3,
.app-shell.light .executive-detail-strip strong {
  color: #17233a !important;
}

/* Recharge calculation card: keep the light theme genuinely light. */
.app-shell.light .service-recharge-calculation,
.app-shell.light .service-recharge-calculation > div,
.app-shell.light .service-recharge-calculation > small {
  color: #17233a !important;
  border-color: rgba(114, 126, 166, 0.17) !important;
}

.app-shell.light .service-recharge-calculation {
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 10%, rgba(176, 153, 255, 0.18), transparent 34%),
    linear-gradient(135deg, #fffaf0 0%, #f7f8ff 52%, #f0f8ff 100%) !important;
  box-shadow: 0 16px 36px rgba(64, 76, 118, 0.09) !important;
}

.app-shell.light .service-recharge-calculation > div {
  background: transparent !important;
}

.app-shell.light .service-recharge-calculation span,
.app-shell.light .service-recharge-calculation small {
  color: #778198 !important;
}

.app-shell.light .service-recharge-calculation strong {
  color: #17233a !important;
}

/* Runtime player center and the desktop landing dashboard. */
.wug-runtime-choice svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wug-player-center,
.wug-landing-dashboard {
  width: 100%;
  border: 1px solid rgba(105, 118, 158, 0.14);
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(174, 151, 255, 0.17), transparent 30%),
    linear-gradient(135deg, rgba(255, 250, 239, 0.94), rgba(246, 249, 255, 0.96) 54%, rgba(246, 240, 255, 0.94));
  box-shadow: 0 24px 60px rgba(62, 74, 116, 0.11);
  color: #17233a;
}

.wug-player-center {
  padding: 24px;
}

.wug-section-head,
.wug-dashboard-head,
.wug-chart-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.wug-section-head span,
.wug-dashboard-head span,
.wug-chart-card header span {
  color: #7359cf;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.wug-section-head h2,
.wug-dashboard-head h2,
.wug-chart-card h3 {
  margin: 5px 0 0;
  color: #17233a;
}

.wug-section-head p,
.wug-dashboard-head p {
  margin: 6px 0 0;
  color: #7b8396;
}

.wug-close-panel {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(111, 121, 158, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #5f6680;
  font-size: 27px;
}

.wug-player-kpis,
.wug-dashboard-kpis {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.wug-player-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wug-dashboard-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wug-player-kpis article,
.wug-dashboard-kpis article {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  padding: 20px;
  border: 1px solid rgba(103, 119, 163, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(68, 80, 126, 0.07);
}

.wug-player-kpis article::after,
.wug-dashboard-kpis article::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -42px;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(119, 91, 207, 0.18);
  border-radius: 50%;
}

.wug-player-kpis span,
.wug-dashboard-kpis span {
  display: block;
  color: #7a8499;
  font-size: 13px;
}

.wug-player-kpis strong,
.wug-dashboard-kpis strong {
  display: block;
  margin: 8px 0 2px;
  color: #17233a;
  font-size: clamp(24px, 3vw, 34px);
}

.wug-player-kpis small,
.wug-dashboard-kpis small {
  color: #99a0b1;
}

.wug-player-table {
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid rgba(104, 117, 158, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
}

.wug-player-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.8fr) repeat(3, minmax(90px, 1fr));
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border-top: 1px solid rgba(108, 119, 156, 0.1);
  color: #46516a;
}

.wug-player-row:first-child {
  border-top: 0;
}

.wug-player-row > span:first-child {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
}

.wug-player-row i {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: #f0ebff;
  color: #765bd2;
  font-style: normal;
  font-weight: 800;
}

.wug-player-row b {
  color: #17233a;
}

.wug-player-row small {
  color: #9aa2b4;
}

.wug-player-row-head {
  color: #858da0;
  font-size: 12px;
  font-weight: 800;
}

.wug-player-row-head > span:first-child {
  display: block;
}

.wug-empty {
  padding: 28px;
  color: #8e96a8;
  text-align: center;
}

.wug-landing-dashboard {
  padding: 26px;
}

.wug-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(42, 173, 131, 0.15);
  border-radius: 999px;
  background: rgba(229, 250, 243, 0.82);
  color: #188969;
  font-size: 12px;
  font-weight: 800;
}

.wug-live-dot i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #24b98b;
  box-shadow: 0 0 0 5px rgba(36, 185, 139, 0.12);
}

.wug-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.wug-chart-card {
  min-height: 330px;
  padding: 20px;
  border: 1px solid rgba(104, 117, 158, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(66, 79, 124, 0.08);
}

.wug-chart-card header b {
  color: #7359cf;
  font-size: 17px;
}

.wug-chart-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7d879a;
  font-size: 12px;
}

.wug-chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: linear-gradient(#7e68dc, #9d8beb);
}

.wug-chart-legend i:nth-of-type(2) {
  background: linear-gradient(#e2bd67, #f3dba2);
}

.wug-bars {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: 240px;
  margin-top: 22px;
  padding: 18px 8px 0;
  border-bottom: 1px solid rgba(112, 124, 161, 0.15);
  background: repeating-linear-gradient(to bottom, rgba(112, 124, 161, 0.08) 0 1px, transparent 1px 56px);
}

.wug-bar-group {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 30px;
}

.wug-bar-columns {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 190px;
}

.wug-bar-columns i {
  display: block;
  width: clamp(8px, 1.3vw, 18px);
  min-height: 3px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #8c75eb, #bbaefa);
}

.wug-bar-columns i:nth-child(2) {
  background: linear-gradient(180deg, #e3bd67, #f4dfa8);
}

.wug-bar-group > span,
.wug-axis-labels span {
  margin-top: 9px;
  color: #929aad;
  font-size: 10px;
}

.wug-line-chart {
  height: 220px;
  margin-top: 16px;
}

.wug-line-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.wug-grid-line {
  fill: none;
  stroke: rgba(108, 120, 159, 0.12);
  stroke-width: 1;
}

.wug-line-area {
  fill: url(#wugLineArea);
}

.wug-line-path {
  fill: none;
  stroke: #7a62d2;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wug-line-chart circle {
  fill: #fff;
  stroke: #7a62d2;
  stroke-width: 3;
}

.wug-axis-labels {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.wug-rank-bars {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.wug-rank-bars > div {
  display: grid;
  grid-template-columns: 125px minmax(80px, 1fr) 64px;
  align-items: center;
  gap: 12px;
  color: #687289;
}

.wug-rank-bars > div > i {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef0f7;
}

.wug-rank-bars > div > i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #77a8ed, #9d83e7);
}

.wug-rank-bars strong {
  color: #17233a;
  font-size: 12px;
  text-align: right;
}

.wug-quality-ring {
  --quality: 0;
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  margin: 28px auto 18px;
  border-radius: 50%;
  background: conic-gradient(#7d67d9 calc(var(--quality) * 1%), #edf0f7 0);
  box-shadow: inset 0 0 0 1px rgba(99, 111, 151, 0.08);
}

.wug-quality-ring::before {
  content: "";
  grid-area: 1 / 1;
  width: 146px;
  height: 146px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 12px 30px rgba(72, 83, 128, 0.1);
}

.wug-quality-ring > div {
  z-index: 1;
  grid-area: 1 / 1;
  text-align: center;
}

.wug-quality-ring strong {
  display: block;
  color: #17233a;
  font-size: 34px;
}

.wug-quality-ring span,
.wug-quality-stats {
  color: #8a92a5;
}

.wug-quality-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 13px;
}

.wug-quality-stats b {
  color: #17233a;
}

.app-shell.dark .wug-player-center,
.app-shell.dark .wug-landing-dashboard {
  border-color: rgba(158, 178, 218, 0.14);
  background:
    radial-gradient(circle at 100% 0%, rgba(137, 105, 234, 0.17), transparent 34%),
    linear-gradient(145deg, #111a2a, #0c1422);
  color: #f5f7ff;
}

.app-shell.dark .wug-player-kpis article,
.app-shell.dark .wug-dashboard-kpis article,
.app-shell.dark .wug-player-table,
.app-shell.dark .wug-chart-card {
  border-color: rgba(158, 178, 218, 0.13);
  background: rgba(25, 35, 52, 0.88);
}

.app-shell.dark .wug-section-head h2,
.app-shell.dark .wug-dashboard-head h2,
.app-shell.dark .wug-chart-card h3,
.app-shell.dark .wug-player-kpis strong,
.app-shell.dark .wug-dashboard-kpis strong,
.app-shell.dark .wug-player-row b,
.app-shell.dark .wug-rank-bars strong,
.app-shell.dark .wug-quality-ring strong,
.app-shell.dark .wug-quality-stats b {
  color: #f6f7ff;
}

.app-shell.dark .wug-player-row {
  border-color: rgba(158, 178, 218, 0.1);
  color: #cbd3e2;
}

.app-shell.dark .wug-quality-ring::before {
  background: #172133;
}

@media (min-width: 901px) {
  .app-shell:has(.service-simple) .wug-landing-dashboard {
    margin-top: 22px;
  }

  .app-shell:has(.service-simple) .service-simple {
    max-width: none;
    padding-right: 20px;
  }
}

@media (max-width: 900px) {
  .wug-player-center,
  .wug-landing-dashboard {
    margin-top: 16px;
    padding: 18px;
    border-radius: 22px;
  }

  .wug-player-kpis,
  .wug-dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wug-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .wug-chart-card {
    min-height: 300px;
  }

  .wug-player-row {
    grid-template-columns: minmax(130px, 1.6fr) repeat(2, minmax(70px, 1fr));
  }

  .wug-player-row > span:nth-child(4) {
    display: none;
  }
}

@media (max-width: 560px) {
  .wug-player-kpis article,
  .wug-dashboard-kpis article {
    min-height: 104px;
    padding: 15px;
  }

  .wug-section-head,
  .wug-dashboard-head {
    align-items: flex-start;
  }

  .wug-dashboard-head .wug-live-dot {
    flex: 0 0 auto;
  }

  .wug-rank-bars > div {
    grid-template-columns: 92px minmax(70px, 1fr) 54px;
    gap: 8px;
    font-size: 12px;
  }
}

.app-shell.dark {
  --bg: #080d17;
  --surface: #111827;
  --surface-2: #172132;
  --surface-3: #1c2940;
  --line: rgba(167, 190, 226, 0.14);
  --text: #f2f5fa;
  --muted: #9aa9be;
}

.app-shell.dark .main,
.app-shell.dark.public-mode {
  background:
    linear-gradient(rgba(105, 140, 194, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 140, 194, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 12% 0%, rgba(55, 111, 183, 0.16), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(118, 92, 174, 0.12), transparent 28%),
    #080d17 !important;
  background-size: 34px 34px, 34px 34px, auto, auto, auto !important;
}

.app-shell.dark .service-choice,
.app-shell.dark .panel {
  background: linear-gradient(145deg, rgba(30, 42, 63, 0.96), rgba(17, 25, 40, 0.98)) !important;
  border-color: rgba(156, 181, 220, 0.14) !important;
}

.app-shell.light .entry-hero h1 {
  color: #17233a !important;
  text-shadow: 0 5px 20px rgba(73, 91, 131, 0.12) !important;
}

.app-shell.light .entry-hero .eyebrow {
  color: #654fb0 !important;
  font-weight: 900;
}

.brand-mark {
  width: 94px !important;
  padding-inline: 8px;
  letter-spacing: 0.06em;
}

@media (min-width: 901px) {
  .app-shell:has(.service-simple) .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%) !important;
    border-color: rgba(51, 67, 103, 0.12) !important;
  }

  .app-shell.dark:has(.service-simple) .sidebar {
    background: linear-gradient(180deg, #111a2a 0%, #0d1421 100%) !important;
  }

  .app-shell:has(.service-simple) .sidebar nav,
  .app-shell:has(.service-simple) .side-card {
    display: none !important;
  }

  .app-shell:has(.service-simple) .panel:has(.service-choice-list) {
    display: contents;
  }

  .app-shell:has(.service-simple) .service-choice-list {
    position: fixed;
    z-index: 30;
    top: 98px;
    bottom: 12px;
    left: 12px;
    width: 224px;
    max-height: none;
    overflow-y: auto;
    align-content: start;
    scrollbar-width: thin;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(72, 91, 130, 0.13);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow: 0 16px 36px rgba(45, 63, 101, 0.1);
  }

  .app-shell.dark:has(.service-simple) .service-choice-list {
    background: rgba(12, 19, 31, 0.9);
    border-color: rgba(164, 186, 221, 0.13);
  }

  .app-shell:has(.service-simple) .service-choice {
    min-height: 56px;
    padding: 8px 9px !important;
    gap: 8px !important;
    border-left-width: 3px !important;
    border-radius: 12px !important;
    box-shadow: none !important;
  }

  .app-shell:has(.service-simple) .service-choice > svg {
    width: 18px !important;
    height: 18px !important;
    padding: 7px !important;
  }

  .app-shell:has(.service-simple) .service-choice strong {
    font-size: 13px !important;
  }

  .app-shell:has(.service-simple) .service-choice small {
    font-size: 10px !important;
    line-height: 1.35;
  }
}
