/* ================= RESET & BASE ================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: #F8FAFC;
  color: #0F172A;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* ================= CENTER SCREEN (loading / invalid) ================= */

.center-screen {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ================= MESSAGE BOX (invalid link) ================= */

.message-box {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.message-title {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
}

.message-sub {
  font-size: 13px;
  color: #64748B;
  line-height: 1.6;
}

/* ================= BRAND ================= */

.brand {
  font-family: "Shadows Into Light Two", cursive;
  font-size: 26px;
  color: #0F172A;
  letter-spacing: 2px;
}

/* ================= TOPBAR ================= */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid #E2E8F0;
  background: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.influencer-name {
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
}

.partner-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: #DBEAFE;
  color: #2563EB;
  letter-spacing: 0.5px;
}

/* ================= DASH INNER ================= */

.dash-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ================= EARNINGS ================= */

.earnings-box {
  text-align: center;
  padding: 32px 24px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
}

.earnings-box p {
  font-size: 13px;
  color: #64748B;
  font-weight: 500;
  margin-bottom: 8px;
}

.earnings-box h1 {
  font-size: 42px;
  font-weight: 700;
  color: #16A34A;
}

/* ================= METRICS ================= */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: #F8FAFC;
}

.metric p {
  font-size: 11px;
  color: #64748B;
  font-weight: 500;
}

.metric h3 {
  font-size: 17px;
  font-weight: 700;
  color: #0F172A;
}

.metric.warn h3 {
  color: #D97706;
}

/* ================= SECTION TITLE ================= */

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: -12px;
}

/* ================= CONVERSION CARDS ================= */

#convList {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.conv-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.2s ease;
}

.conv-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.conv-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.conv-plan {
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  text-transform: capitalize;
}

.conv-date {
  font-size: 12px;
  color: #64748B;
}

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

.conv-amt {
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
}

/* ================= PILLS ================= */

.pill {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
}

.pill--green {
  background: #DCFCE7;
  color: #16A34A;
}

.pill--orange {
  background: #FEF3C7;
  color: #D97706;
}

/* ================= EMPTY ================= */

.empty {
  text-align: center;
  padding: 32px;
  font-size: 13px;
  color: #94A3B8;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
}

/* ================= LOADER ================= */

.btn-loader {
  position: relative;
  width: 40px;
  height: 20px;
}

.btn-loader div {
  position: absolute;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94A3B8;
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.btn-loader div:nth-child(1) { left: 4px;  animation: dot-scale-in  0.6s infinite; }
.btn-loader div:nth-child(2) { left: 4px;  animation: dot-move       0.6s infinite; }
.btn-loader div:nth-child(3) { left: 16px; animation: dot-move       0.6s infinite; }
.btn-loader div:nth-child(4) { left: 28px; animation: dot-scale-out  0.6s infinite; }

@keyframes dot-scale-in  { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes dot-scale-out { 0% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes dot-move      { 0% { transform: translate(0, 0); } 100% { transform: translate(12px, 0); } }

/* ================= MOBILE ================= */

@media (max-width: 700px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar {
    padding: 16px 20px;
  }

  .dash-inner {
    padding: 24px 16px;
  }
}

@media (max-width: 420px) {
  .earnings-box h1 {
    font-size: 34px;
  }

  .influencer-name {
    display: none;
  }

  .conv-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .conv-right {
    width: 100%;
    justify-content: space-between;
  }

  .message-box {
    padding: 28px 24px;
  }
}