:root {
  --bg: #05050a;
  --panel: rgba(11, 12, 18, 0.9);
  --panel-strong: rgba(18, 18, 27, 0.96);
  --text: #f8f4ff;
  --muted: #a9a2b8;
  --soft: #797286;
  --line: rgba(218, 205, 255, 0.14);
  --purple: #a66dff;
  --purple-2: #5630a5;
  --green: #80f2bd;
  --red: #ff6687;
  --amber: #ffc66d;
  --cyan: #7bdcff;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.54);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at 18% -8%, rgba(166, 109, 255, 0.35), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(128, 242, 189, 0.09), transparent 24%),
    linear-gradient(180deg, #06050a 0%, #0b0b12 46%, #040407 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    repeating-radial-gradient(circle at 18% 26%, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 18px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 82%);
  opacity: 0.55;
}

body::after {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.06), transparent 20%, transparent 70%, rgba(166, 109, 255, 0.08)),
    radial-gradient(circle at 50% 108%, rgba(166, 109, 255, 0.18), transparent 38%);
  mix-blend-mode: screen;
  opacity: 0.42;
}

button,
select,
input {
  font: inherit;
}

.good {
  color: var(--green);
}

.risk {
  color: var(--red);
}

.event-shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 48px;
  display: grid;
  gap: 16px;
}

.event-header,
.control-panel,
.hero-panel,
.metric-card,
.trend-panel,
.report-card,
.source-strip {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.event-header {
  border-radius: 30px;
  padding: 18px;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.quick-links a,
.control-panel button,
.control-panel select,
.control-panel input {
  color: var(--text);
  border: 1px solid rgba(218, 205, 255, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.012)),
    rgba(8, 8, 13, 0.94);
  text-decoration: none;
  padding: 10px 13px;
}

.quick-links a:hover,
.control-panel button:hover {
  border-color: rgba(166, 109, 255, 0.5);
  box-shadow: 0 0 24px rgba(166, 109, 255, 0.18);
}

.brand-row,
.hero-panel,
.source-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand-lockup > div {
  min-width: 0;
}

.brand-lockup img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: invert(1) brightness(1.1) drop-shadow(0 0 18px rgba(166, 109, 255, 0.22));
}

.label {
  margin: 0;
  color: #dccdff;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: -0.035em;
}

h1 {
  margin-top: 3px;
  font-size: clamp(1.85rem, 3vw, 3rem);
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
}

.brand-lockup span,
.hero-panel p,
.metric-card p,
.sales-lane p,
.sales-lane li,
.coverage-card small,
.section-heading > span {
  color: var(--muted);
  overflow-wrap: break-word;
}

.coverage-card {
  width: min(360px, 100%);
  border: 1px solid rgba(128, 242, 189, 0.16);
  border-radius: 22px;
  padding: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(128, 242, 189, 0.12), transparent 38%),
    rgba(128, 242, 189, 0.045);
}

.coverage-card span,
.coverage-card small {
  display: block;
}

.coverage-card span {
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
}

.coverage-card strong {
  display: block;
  margin: 6px 0;
  color: #cdfbe6;
  font-size: 1.2rem;
}

.control-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
  border-radius: 24px;
}

.control-panel label {
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
}

.control-panel button {
  cursor: pointer;
  min-height: 45px;
}

.control-panel button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.control-panel input {
  min-width: min(320px, 100%);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 30px;
  min-height: 230px;
  background:
    linear-gradient(90deg, rgba(7, 7, 11, 0.96), rgba(7, 7, 11, 0.54)),
    radial-gradient(circle at 72% 45%, rgba(166, 109, 255, 0.24), transparent 30%),
    var(--panel-strong);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 28px),
    linear-gradient(180deg, transparent, rgba(166, 109, 255, 0.05));
  pointer-events: none;
}

.hero-panel > * {
  position: relative;
}

.hero-panel h2 {
  margin-top: 4px;
  font-size: clamp(2.7rem, 6vw, 5.8rem);
  line-height: 0.88;
}

.signal-visual {
  width: min(470px, 46vw);
  min-height: 150px;
  border: 1px solid rgba(218, 205, 255, 0.14);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent),
    rgba(2, 3, 6, 0.56);
  padding: 18px;
}

.vu-scale {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.vu-scale span {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.18);
}

.signal-bars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 7px;
  height: 96px;
}

.signal-bar {
  min-height: 8px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, var(--green), var(--purple));
  box-shadow: 0 0 18px rgba(166, 109, 255, 0.22);
  opacity: 0.92;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 148px;
  padding: 17px;
  border-radius: 22px;
  display: grid;
  align-content: space-between;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(166, 109, 255, 0.16), transparent 34%);
  pointer-events: none;
}

.metric-card.good::before {
  background: radial-gradient(circle at 100% 0%, rgba(128, 242, 189, 0.14), transparent 34%);
}

.metric-card.risk::before {
  background: radial-gradient(circle at 100% 0%, rgba(255, 102, 135, 0.14), transparent 34%);
}

.metric-card span,
.metric-card strong,
.metric-card p {
  position: relative;
}

.metric-card span {
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.72rem;
  font-weight: 800;
}

.metric-card strong {
  margin-top: 10px;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.72rem, 2.6vw, 2.8rem);
  line-height: 0.96;
}

.metric-card.good strong {
  color: #c8fbe3;
}

.metric-card.risk strong {
  color: #ffc3d0;
}

.trend-panel,
.report-card,
.source-strip {
  border-radius: 26px;
  padding: 20px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading h2 {
  font-size: 1.42rem;
  margin-top: 4px;
}

.trend-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}

.trend-month {
  min-height: 160px;
  display: grid;
  align-content: end;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;
  padding: 12px;
  background: rgba(5, 6, 10, 0.58);
  color: var(--text);
  cursor: pointer;
}

.trend-month.active {
  border-color: rgba(166, 109, 255, 0.58);
  box-shadow: 0 0 24px rgba(166, 109, 255, 0.16);
}

.trend-stem {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 74px;
}

.trend-stem span {
  flex: 1;
  min-height: 5px;
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(180deg, var(--green), var(--purple-2));
}

.trend-month strong {
  color: var(--text);
  font-size: 0.92rem;
}

.trend-month small {
  color: var(--muted);
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  background: rgba(2, 3, 6, 0.44);
}

th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

th {
  color: #dacdff;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

td {
  color: #eeeaf8;
  font-size: 0.89rem;
}

td.numeric {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

td.muted {
  color: var(--muted);
}

td a {
  color: #dfd1ff;
}

.confidence {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(166, 109, 255, 0.09);
  color: #dacdff;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.confidence.medium {
  color: #ffdca0;
  background: rgba(255, 198, 109, 0.1);
}

.empty-row td {
  text-align: center;
  color: var(--soft);
  padding: 30px 14px;
}

.sales-lane {
  display: grid;
  gap: 12px;
  align-content: start;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 102, 135, 0.1), transparent 40%),
    var(--panel);
}

.empty-meter {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 102, 135, 0.18);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 102, 135, 0.055);
}

.empty-meter span {
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.72rem;
  font-weight: 800;
}

.empty-meter strong {
  color: #ffc2cf;
}

.sales-lane ul {
  margin: 0;
  padding-left: 18px;
}

.source-strip {
  flex-wrap: wrap;
}

.source-pill {
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 0.84rem;
  border: 1px solid rgba(218, 205, 255, 0.13);
}

.source-pill.good {
  color: #cdfbe6;
  border-color: rgba(128, 242, 189, 0.2);
  background: rgba(128, 242, 189, 0.06);
}

.source-pill.warn {
  color: #ffe0a7;
  border-color: rgba(255, 198, 109, 0.22);
  background: rgba(255, 198, 109, 0.06);
}

.source-pill.risk {
  color: #ffc3d0;
  border-color: rgba(255, 102, 135, 0.24);
  background: rgba(255, 102, 135, 0.06);
}

@media (max-width: 1120px) {
  .brand-row,
  .hero-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .signal-visual {
    width: 100%;
  }

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

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

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }

  .event-shell {
    width: min(1480px, calc(100% - 24px));
    padding-top: 14px;
    overflow: hidden;
  }

  .brand-lockup {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
    width: 100%;
  }

  .brand-lockup img {
    width: 58px;
    height: 58px;
  }

  h1 {
    font-size: 1.52rem;
    line-height: 1.04;
  }

  h1 span {
    display: block;
  }

  .hero-panel h2 {
    font-size: clamp(2.2rem, 14vw, 3.35rem);
  }

  .brand-lockup span {
    display: block;
  }

  .event-header,
  .control-panel,
  .hero-panel,
  .metric-card,
  .trend-panel,
  .report-card,
  .source-strip {
    border-radius: 22px;
  }

  .control-panel > * {
    width: 100%;
  }

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

  .control-panel button {
    display: block;
    max-width: 100%;
    color: var(--text);
    text-align: center;
  }

  .control-panel select,
  .control-panel input {
    display: block;
    max-width: 100%;
    min-width: 0;
  }

  .signal-bars {
    grid-template-columns: repeat(8, 1fr);
  }

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