:root {
  --font-gemini: "Google Sans", Arial, Helvetica, sans-serif;
  --bg: #f8f9fa;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --panel-soft: #f0f4fa;
  --panel-soft-2: #f8f9fa;
  --panel-vibrant: linear-gradient(135deg, rgba(49, 134, 255, 0.12), rgba(78, 160, 255, 0.1), rgba(52, 107, 240, 0.08));
  --line: rgba(60, 64, 67, 0.18);
  --text: #202124;
  --muted: #5f6368;
  --accent: #1a73e8;
  --accent-soft: #3186ff;
  --accent-2: #346bf0;
  --accent-2-soft: #4ea0ff;
  --accent-3: #9b72cb;
  --accent-3-soft: #ac87eb;
  --accent-4: #d6645d;
  --card-head-gradient: linear-gradient(92deg, #3186ff 0%, #346bf0 40%, #4ea0ff 72%, #9b72cb 100%);
  --card-head-surface: linear-gradient(135deg, rgba(49, 134, 255, 0.14), rgba(78, 160, 255, 0.08), rgba(155, 114, 203, 0.1));
  --card-head-border: rgba(49, 134, 255, 0.24);
  --shadow: 0 18px 44px rgba(26, 115, 232, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-gemini);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(49, 134, 255, 0.16), transparent 26%),
    radial-gradient(circle at top right, rgba(155, 114, 203, 0.12), transparent 22%),
    linear-gradient(180deg, #ffffff 0%, #f8f9fa 48%, #f0f4fa 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 53, 92, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 53, 92, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent);
}

.page-shell {
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 36px;
}

.top-nav {
  margin-bottom: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(49, 134, 255, 0.24);
  background: linear-gradient(130deg, rgba(49, 134, 255, 0.18), rgba(78, 160, 255, 0.15), rgba(155, 114, 203, 0.16));
  box-shadow: 0 14px 34px rgba(49, 134, 255, 0.14);
  position: relative;
  overflow: hidden;
}

.top-nav::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(89.58deg, #3186ff 0.28%, #346bf0 44.45%, #4ea0ff 75%, #9b72cb 100%);
  opacity: 0.95;
}

.top-nav::after {
  content: "";
  position: absolute;
  right: -44px;
  top: -44px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(251, 188, 4, 0.2), transparent 66%);
  pointer-events: none;
}

.appointment-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.01em;
  background: linear-gradient(90deg, #4285f4 0%, #1a73e8 35%, #346bf0 68%, #4ea0ff 100%);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 14px 30px rgba(66, 133, 244, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.26);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  position: relative;
  z-index: 1;
  overflow: hidden;
  animation: appointmentPulse 2.8s ease-in-out infinite;
}

.appointment-link::before {
  content: "";
  position: absolute;
  top: -28%;
  bottom: -28%;
  left: -36%;
  width: 42%;
  transform: skewX(-24deg) translateX(-180%);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
  pointer-events: none;
  animation: appointmentShine 3.6s ease-in-out infinite;
}

.appointment-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(66, 133, 244, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  filter: saturate(1.08);
}

.appointment-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(49, 134, 255, 0.2), 0 12px 26px rgba(49, 134, 255, 0.3);
}

@keyframes appointmentPulse {
  0%, 100% {
    box-shadow: 0 14px 30px rgba(66, 133, 244, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.26);
  }
  50% {
    box-shadow: 0 20px 38px rgba(66, 133, 244, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.36);
  }
}

@keyframes appointmentShine {
  0%, 65% {
    transform: skewX(-24deg) translateX(-220%);
  }
  100% {
    transform: skewX(-24deg) translateX(420%);
  }
}

.announcement-bar {
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(49, 134, 255, 0.22);
  background: linear-gradient(135deg, rgba(49, 134, 255, 0.14), rgba(78, 160, 255, 0.12), rgba(155, 114, 203, 0.1));
  color: var(--text);
  box-shadow: 0 14px 32px rgba(31, 66, 117, 0.08);
  line-height: 1.6;
  font-size: 0.94rem;
}

.announcement-bar strong {
  margin-right: 8px;
  flex: 0 0 auto;
}

.announce-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(22, 44, 76, 0.08);
  color: var(--text);
  font-size: 0.84rem;
  white-space: normal;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 0.95fr;
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.card,
.footer {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 249, 250, 0.92));
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover,
.hero-copy:hover,
.hero-panel:hover,
.footer:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 60px rgba(26, 115, 232, 0.16);
  border-color: rgba(49, 134, 255, 0.25);
}

.hero-copy {
  padding: 42px;
  border-radius: 30px;
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -48px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(49, 134, 255, 0.22), transparent 68%);
  pointer-events: none;
}

.eyebrow,
.section-label,
.panel-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h4 {
  margin: 18px 0 16px;
  max-width: 10ch;
  font-size: clamp(2.5rem, 5vw, 4.9rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-copy h4 .title-blue {
  color: #1a73e8;
}

.hero-copy h4 .title-black {
  color: #202124;
}

.hero-copy p {
  max-width: 60ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.upload-button,
select {
  border: 0;
  border-radius: 16px;
  font: inherit;
}

.upload-button {
  padding: 14px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.upload-button {
  color: #ffffff;
  background: linear-gradient(89.58deg, #3186ff 0.28%, #346bf0 44.45%, #4ea0ff 99.55%);
  box-shadow: 0 16px 36px rgba(49, 134, 255, 0.34);
}

.upload-button:hover,
select:hover {
  transform: translateY(-2px);
}

.hero-panel {
  padding: 28px;
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

.hero-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  color: #0d2848;
  background: linear-gradient(135deg, #c9f3e5, #fff0cb);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.hero-stats div {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f4f9fe);
  border: 1px solid rgba(22, 44, 76, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 10px 28px rgba(31, 66, 117, 0.06);
}

.hero-stats span,
.panel-note,
#datasetSummary,
.insight-text,
tbody td,
.footer p {
  color: var(--muted);
}

.hero-stats strong {
  display: block;
  margin-top: 8px;
  font-size: 1.3rem;
}

.upload-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

#csvUpload {
  flex: 1 1 auto;
  min-width: 0;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(22, 44, 76, 0.18);
  background: rgba(244, 248, 252, 0.9);
  color: var(--muted);
}

.reset-button {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  min-height: 56px;
  border-radius: 18px;
  border: 1px solid rgba(22, 44, 76, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.9)),
    var(--panel-solid);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 12px 28px rgba(31, 66, 117, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease,
    background 180ms ease, color 180ms ease, opacity 180ms ease;
}

.reset-button > * {
  pointer-events: none;
}

.reset-button .reset-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-4);
  transition: transform 400ms ease, color 180ms ease;
}

.reset-button:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 102, 102, 0.32);
  background: linear-gradient(135deg, rgba(242, 102, 102, 0.12), rgba(255, 176, 46, 0.12));
  box-shadow: 0 16px 32px rgba(242, 102, 102, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.reset-button:hover .reset-icon {
  transform: rotate(-180deg);
  color: var(--accent-4);
}

.reset-button:focus-visible {
  outline: none;
  border-color: rgba(22, 120, 242, 0.38);
  box-shadow: 0 0 0 4px rgba(22, 120, 242, 0.18), 0 12px 28px rgba(31, 66, 117, 0.08);
}

.reset-button:active {
  transform: translateY(0);
}

.reset-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 248, 252, 0.9));
  color: var(--muted);
}

.reset-button:disabled .reset-icon {
  color: var(--muted);
  transform: none;
}

.reset-button.is-flashing {
  animation: resetFlash 500ms ease;
}

.reset-button.is-flashing .reset-icon {
  animation: resetSpin 500ms ease;
}

@keyframes resetFlash {
  0% {
    transform: scale(1);
    box-shadow: 0 12px 28px rgba(31, 66, 117, 0.08);
  }
  40% {
    transform: scale(1.04);
    box-shadow: 0 0 0 6px rgba(52, 168, 83, 0.24), 0 16px 32px rgba(52, 168, 83, 0.22);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 12px 28px rgba(31, 66, 117, 0.08);
  }
}

@keyframes resetSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

.date-range-box {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(22, 120, 242, 0.22);
  background: linear-gradient(135deg, rgba(22, 120, 242, 0.12), rgba(31, 196, 143, 0.1), rgba(255, 176, 46, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 10px 24px rgba(31, 66, 117, 0.08);
}

.date-range-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.date-range-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 3px rgba(22, 120, 242, 0.16);
  flex: 0 0 auto;
}

.date-range-box.is-active .date-range-dot {
  animation: pulseDot 1.8s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(22, 120, 242, 0.16);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(22, 120, 242, 0.08);
  }
}

.date-range-value {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
}

.date-range-box.is-active {
  border-color: rgba(22, 120, 242, 0.38);
  background: linear-gradient(135deg, rgba(22, 120, 242, 0.18), rgba(31, 196, 143, 0.14), rgba(255, 176, 46, 0.14));
}

.panel-note {
  margin: 0;
  font-size: 0.94rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.is-hidden {
  display: none !important;
}

.card {
  grid-column: span 6;
  padding: 26px;
  border-radius: 26px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--card-head-gradient);
  opacity: 0.9;
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  top: -34px;
  right: -34px;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(49, 134, 255, 0.2), transparent 68%);
  pointer-events: none;
}

.wide-card {
  grid-column: 1 / -1;
}

.kpi-section {
  grid-column: span 8;
}

.highlights-card {
  grid-column: 1 / -1;
}

.leaderboard-card {
  grid-column: span 4;
  background: var(--panel-vibrant);
  border-color: rgba(66, 133, 244, 0.14);
}

.insights-card {
  grid-column: span 12;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--card-head-border);
  background: var(--card-head-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.section-head h2 {
  margin: 8px 0 0;
  font-size: 1.45rem;
  line-height: 1.2;
  background-image: var(--card-head-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.section-label {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(49, 134, 255, 0.22);
  background: rgba(255, 255, 255, 0.78);
}

.leaderboard-card .section-head {
  border-color: rgba(251, 188, 4, 0.3);
  background: linear-gradient(135deg, rgba(251, 188, 4, 0.16), rgba(66, 133, 244, 0.14), rgba(52, 168, 83, 0.12));
}

.leaderboard-card .section-head h2 {
  background-image: linear-gradient(90deg, #ea4335 0%, #fbbc04 34%, #34a853 68%, #4285f4 100%);
}

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

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

.kpi-card {
  padding: 18px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.96)),
    var(--panel-solid);
  border: 1px solid rgba(22, 44, 76, 0.06);
  box-shadow: 0 12px 28px rgba(31, 66, 117, 0.08);
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -30px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(66, 133, 244, 0.14), transparent 70%);
}

.kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.kpi-card strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(1.15rem, 1.85vw, 1.65rem);
  letter-spacing: -0.03em;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.kpi-card small {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent-2);
}

.progress-panel {
  display: grid;
  gap: 16px;
}

.progress-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(22, 44, 76, 0.07);
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: 0 12px 28px rgba(31, 66, 117, 0.08);
}

.progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.progress-title {
  font-size: 0.96rem;
  font-weight: 700;
}

.progress-value {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
}

.progress-copy {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(20, 53, 92, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft), var(--accent-2));
  animation: progressGrow 1.1s ease forwards;
  transform-origin: left center;
}

.placeholder-card,
.empty-state {
  border: 1px dashed rgba(22, 44, 76, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(243, 248, 253, 0.9));
}

.placeholder-card strong,
.empty-state h3 {
  color: var(--text);
}

.placeholder-card small,
.empty-state p {
  color: var(--muted);
}

.chart {
  min-height: 340px;
}

.chart-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 220px) 1fr 128px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--panel-soft-2);
  border: 1px solid rgba(22, 44, 76, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.bar-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(31, 66, 117, 0.08);
  border-color: rgba(66, 133, 244, 0.16);
}

.bar-label {
  display: grid;
  gap: 4px;
  font-weight: 700;
  font-size: 0.94rem;
}

.bar-label small {
  color: var(--muted);
  font-weight: 600;
}

.bar-track {
  position: relative;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(20, 53, 92, 0.08);
}

.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft), var(--accent-2));
  animation: progressGrow 1s ease forwards;
  transform-origin: left center;
}

.alt-fill {
  background: linear-gradient(90deg, var(--accent-2), var(--accent-2-soft), var(--accent-3));
}

.warm-fill {
  background: linear-gradient(90deg, var(--accent-3), var(--accent-3-soft), var(--accent-4));
}

.chart-multi {
  display: grid;
  gap: 10px;
}

.chart-stack {
  display: grid;
  gap: 6px;
}

.chart-stack span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.bar-value {
  text-align: right;
  color: var(--muted);
  font-weight: 700;
}

.empty-state {
  min-height: 340px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
}

.empty-state h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.empty-state p {
  margin: 0;
  max-width: 36ch;
  line-height: 1.7;
}

.chart-donut {
  display: grid;
  place-items: center;
}

.donut-wrap {
  display: grid;
  gap: 24px;
  justify-items: center;
}

.donut-svg {
  width: min(320px, 100%);
  height: auto;
  overflow: visible;
}

.donut-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  width: 100%;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.legend-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.9rem;
}

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

select {
  padding: 12px 14px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid rgba(22, 44, 76, 0.12);
}

.table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(22, 44, 76, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.leaderboard-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.96));
}

.leaderboard-list {
  display: grid;
  gap: 12px;
}

.leader-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(22, 44, 76, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.leader-item:hover {
  transform: translateX(4px);
  box-shadow: 0 16px 28px rgba(31, 66, 117, 0.08);
}

.leader-rank {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  box-shadow: 0 8px 18px rgba(66, 133, 244, 0.28);
}

.leader-meta {
  min-width: 0;
}

.leader-meta strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leader-meta span,
.leader-score {
  color: var(--muted);
  font-size: 0.88rem;
}

.leader-score strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
  background: rgba(255, 255, 255, 0.72);
}

thead th {
  padding: 16px 14px;
  text-align: left;
  font-size: 0.84rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(239, 246, 252, 0.9);
}

tbody td {
  padding: 16px 14px;
  border-top: 1px solid rgba(22, 44, 76, 0.06);
  font-size: 0.95rem;
  vertical-align: middle;
}

tbody tr:hover {
  background: rgba(66, 133, 244, 0.06);
}

tbody tr {
  transition: background 180ms ease, transform 180ms ease;
}

.campaign-cell {
  display: grid;
  gap: 5px;
}

.campaign-name {
  font-weight: 800;
  color: var(--text);
}

.campaign-sub {
  color: var(--muted);
  font-size: 0.84rem;
}

.metric-bar-cell {
  min-width: 150px;
}

.mini-track {
  margin-top: 8px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(20, 53, 92, 0.08);
}

.mini-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent), var(--accent-2));
  animation: progressGrow 1s ease forwards;
  transform-origin: left center;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 800;
}

.status-chip.enabled {
  color: #137333;
  background: rgba(52, 168, 83, 0.16);
  border: 1px solid rgba(52, 168, 83, 0.24);
}

.status-chip.other {
  color: #7a5900;
  background: rgba(251, 188, 4, 0.18);
  border: 1px solid rgba(251, 188, 4, 0.28);
}

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

.insight-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.insight {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 253, 0.98));
  border: 1px solid rgba(22, 44, 76, 0.07);
  box-shadow: 0 12px 28px rgba(31, 66, 117, 0.05);
}

.insight.recommendation {
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.14), rgba(234, 67, 53, 0.1), rgba(251, 188, 4, 0.12), rgba(52, 168, 83, 0.12));
  border-color: rgba(66, 133, 244, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

@keyframes progressGrow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.insight-title {
  margin: 0 0 8px;
  font-size: 1rem;
}

.insight-text {
  margin: 0;
  line-height: 1.65;
}

.footer {
  margin-top: 24px;
  padding: 22px 26px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  overflow: hidden;
  border-color: rgba(49, 134, 255, 0.24);
  background: linear-gradient(130deg, rgba(49, 134, 255, 0.18), rgba(78, 160, 255, 0.15), rgba(155, 114, 203, 0.16));
  box-shadow: 0 16px 36px rgba(49, 134, 255, 0.18);
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% -10%, rgba(255, 255, 255, 0.32), transparent 36%);
  pointer-events: none;
}

.footer strong {
  display: block;
  margin-bottom: 6px;
}

.footer-main,
.footer-contact {
  display: grid;
  gap: 6px;
}

.footer-contact {
  justify-items: end;
  text-align: right;
}

.footer p {
  margin: 0;
  color: #202124;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

.footer a {
  color: #202124;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

.footer a:hover {
  color: #000000;
}

.footer-main p {
  color: #202124;
  font-weight: 400;
}

.footer-contact p {
  color: #202124;
}
