:root {
  --bg: #07111f;
  --bg2: #0b1730;
  --panel: rgba(13, 25, 50, 0.82);
  --panel2: rgba(20, 37, 70, 0.92);
  --panel3: rgba(255, 255, 255, 0.075);
  --text: #f8fafc;
  --muted: #9fb0cf;
  --line: rgba(255, 255, 255, 0.13);
  --blue: #38bdf8;
  --green: #34d399;
  --yellow: #fbbf24;
  --red: #fb7185;
  --purple: #a78bfa;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(56, 189, 248, 0.32), transparent 32%),
    radial-gradient(circle at 90% 12%, rgba(52, 211, 153, 0.2), transparent 30%),
    radial-gradient(circle at 30% 100%, rgba(167, 139, 250, 0.2), transparent 34%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  font-family: Arial, Helvetica, sans-serif;
  padding-bottom: 86px;
}

button,
input,
select {
  font-family: inherit;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.app-shell {
  width: min(1320px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  padding: 18px;
  position: relative;
  z-index: 1;
}

.sidebar {
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(4, 12, 28, 0.7);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: #03111f;
  font-weight: 1000;
  font-size: 20px;
}

.brand-kicker {
  color: #bae6fd;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.brand-title {
  font-weight: 1000;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.nav-btn,
.mobile-nav {
  border: 0;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  border-radius: 18px;
  padding: 13px 12px;
  font-weight: 1000;
  text-align: left;
}

.nav-btn.active,
.mobile-nav.active {
  color: white;
  background: linear-gradient(135deg, rgba(56,189,248,0.25), rgba(52,211,153,0.17));
}

.device-card {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  background: var(--panel);
}

.device-card span,
.status-card span,
.control label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  margin-bottom: 5px;
}

.device-card strong {
  display: block;
  font-size: 17px;
}

.main {
  min-width: 0;
}

.hero,
.status-card,
.control-panel,
.favorite-panel,
.stats-grid article,
.card,
.match-card,
.table-card,
.toast {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero {
  border-radius: 32px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.eyebrow {
  color: #bae6fd;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 12px;
  font-weight: 1000;
}

h1 {
  margin: 4px 0 6px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 0.92;
  letter-spacing: -2px;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.hero-actions {
  display: grid;
  gap: 10px;
  min-width: 210px;
}

.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 18px;
  padding: 14px 16px;
  color: white;
  font-weight: 1000;
  cursor: pointer;
}

.primary-btn {
  color: #03111f;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.ghost-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--line);
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 12px;
  margin: 14px 0;
}

.status-card {
  border-radius: 24px;
  padding: 15px;
}

.status-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.control-panel {
  border-radius: 26px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

input,
select {
  width: 100%;
  outline: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(3, 10, 24, 0.8);
  color: white;
  padding: 13px 14px;
  font-size: 15px;
}

input:focus,
select:focus {
  border-color: rgba(56,189,248,0.75);
  box-shadow: 0 0 0 4px rgba(56,189,248,0.12);
}

.favorite-panel {
  border-radius: 28px;
  padding: 18px;
  margin-bottom: 14px;
}

.fav-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.fav-name {
  font-size: 24px;
  font-weight: 1000;
  letter-spacing: -0.6px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 1000;
  color: #dff7ff;
  background: rgba(56,189,248,0.14);
  border: 1px solid rgba(56,189,248,0.28);
}

.badge.green {
  color: #d1fae5;
  background: rgba(52,211,153,0.16);
  border-color: rgba(52,211,153,0.32);
}

.badge.yellow {
  color: #fef3c7;
  background: rgba(251,191,36,0.14);
  border-color: rgba(251,191,36,0.3);
}

.badge.red {
  color: #ffe4e6;
  background: rgba(251,113,133,0.14);
  border-color: rgba(251,113,133,0.3);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.stats-grid article {
  border-radius: 24px;
  padding: 16px 10px;
  text-align: center;
}

.stats-grid strong {
  display: block;
  font-size: 32px;
  letter-spacing: -1px;
}

.stats-grid span {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-size: 12px;
  font-weight: 900;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 18px 0 10px;
  gap: 16px;
}

.view-title h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.7px;
}

.view-title span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.card,
.match-card,
.table-card {
  border-radius: 24px;
  padding: 16px;
  margin-bottom: 12px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.card-head strong {
  display: block;
  font-size: 18px;
  letter-spacing: -0.4px;
}

.meta {
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.4;
}

.live-pulse {
  position: relative;
}

.live-pulse::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
  display: inline-block;
  margin-right: 7px;
}

.favorite-highlight {
  border-color: rgba(251,191,36,0.72);
  box-shadow: 0 0 0 1px rgba(251,191,36,0.18), var(--shadow);
}

.bars {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: 112px 1fr 45px;
  gap: 9px;
  align-items: center;
  font-size: 13px;
}

.bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.12);
}

.fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.fill-yellow {
  background: linear-gradient(90deg, var(--yellow), #fb923c);
}

.fill-red {
  background: linear-gradient(90deg, var(--red), var(--purple));
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 6px;
  text-align: center;
  font-size: 13px;
}

th {
  color: #bae6fd;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.7px;
}

td:first-child,
th:first-child {
  text-align: left;
}

tr:last-child td {
  border-bottom: 0;
}

.ok {
  color: var(--green);
  font-weight: 1000;
}

.maybe {
  color: var(--yellow);
  font-weight: 1000;
}

.empty {
  color: var(--muted);
  line-height: 1.5;
}

.bottom-nav {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  border-radius: 18px;
  padding: 13px 14px;
  z-index: 40;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 980px) {
  body {
    padding-bottom: 92px;
  }

  .app-shell {
    display: block;
    padding: 12px;
  }

  .sidebar {
    display: none;
  }

  .hero {
    display: block;
    padding: 20px;
  }

  .hero-actions {
    margin-top: 16px;
    min-width: 0;
    grid-template-columns: 1fr 1fr;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .control-panel {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }

  .stats-grid strong {
    font-size: 24px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    position: fixed;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    width: min(760px, calc(100% - 16px));
    gap: 5px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 25px;
    background: rgba(2, 8, 23, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    z-index: 30;
  }

  .mobile-nav {
    text-align: center;
    font-size: 11px;
    padding: 12px 2px;
  }
}

@media (max-width: 560px) {
  .hero-actions {
    grid-template-columns: 1fr;
  }

  .control-panel {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fav-top {
    display: block;
  }

  .bar-row {
    grid-template-columns: 86px 1fr 38px;
  }

  h1 {
    font-size: 42px;
  }

  .view-title h2 {
    font-size: 23px;
  }
}

/* wm-clean-mobile-v13 */
.tba-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.compact-card .bars {
  display: none;
}

.compact-card .tba-note {
  display: none;
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

@media (max-width: 560px) {
  .view-title {
    align-items: flex-start;
    gap: 8px;
  }

  .view-title h2 {
    font-size: 24px;
  }

  .view-title span {
    font-size: 13px;
    max-width: 44%;
  }

  .match-card,
  .card,
  .table-card {
    border-radius: 22px;
    padding: 14px;
  }

  .card-head {
    gap: 10px;
  }

  .card-head strong {
    font-size: 18px;
  }

  .meta {
    font-size: 13px;
  }

  .badge {
    padding: 7px 9px;
    font-size: 11px;
    white-space: nowrap;
  }

  .bars {
    gap: 6px;
  }

  .bar-row {
    grid-template-columns: 80px 1fr 34px;
    gap: 8px;
    font-size: 12px;
  }

  .bottom-nav {
    width: calc(100% - 18px);
  }

  .mobile-nav {
    font-size: 11px;
  }
}