:root {
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --navy: #0B1220;
  --muted: #64748B;
  --bg: #F6F8FC;
  --card: #FFFFFF;
  --border: #E5E9F2;
  --green: #16A34A;
  --amber: #D97706;
  --primary-color: #2563EB;
  --primary-color-dark: #1D4ED8;
  --font-family-base: 'Source Sans Pro', sans-serif;
}

* {
  box-sizing: border-box
}

body {
  font-family: 'Source Sans Pro', sans-serif;
  background: var(--bg);
  color: var(--navy);
  margin: 0
}

a {
  text-decoration: none
}

body:not(.hero) {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: .6rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  height: 68px;
}

.brand img {
  height: 44px;
  max-height: 46px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.brand:hover {
  transform: scale(1.02);
}

.top-icons {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.top-icons > i {
  color: #556987;
  font-size: 1.05rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f4f8fe;
  border: 1px solid #e1ebf8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.top-icons .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-menu {
  display: flex;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
  padding: .25rem .5rem .25rem .25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
}

.profile-menu:hover {
  background: #F8FAFC;
}

.profile-menu i {
  font-size: .7rem;
  color: var(--muted);
}

.layout {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
    width: 250px;
    /* background: #fff; */
    border-right: 1px solid var(--border);
    padding: 1.2rem .9rem;
    flex-shrink: 0;
    background: linear-gradient(180deg, #f7faff 0%, #f1f6fe 100%);
    overflow-y: auto;
}

/* .sidebar .tag {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .03em;
  margin: .2rem 0 .8rem .5rem
} */

.sidebar .tag {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .03em;
  margin: .2rem 0 .8rem .5rem;

  position: relative;
  padding-left: 20px;
}

.sidebar .tag::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 10px;
    height: 10px;
    background: #2f80ed;
    border-radius: 50%;
    transform: translateY(-50%);
    
    animation: livePulse 1.5s infinite ease-out;
}

@keyframes livePulse {
    0% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(47, 128, 237, 0.45);
    }

    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.15);
    }

    100% {
        opacity: 1;
        box-shadow: 0 0 0 7px rgba(47, 128, 237, 0);
    }
}

.sidebar a {
  /* display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--navy);
  border-radius: 10px;
  padding: .6rem .8rem;
  font-weight: 600;
  margin-bottom: 4px */
  display: flex
;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 0.9rem;
    color: #334155 !important;
    font-size: 0.92rem;
    font-weight: 600 !important;
    /* font-weight: 600 !important; */
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 2px;
}

.sidebar a i {
  width: 18px;
  text-align: center;
  color: var(--muted)
}

body[data-page="dashboard"] .sidebar a[href*="dashboard"],
body[data-page="earnings"] .sidebar a[href*="earnings"],
body[data-page="profile"] .sidebar a[href*="profile"],
.sidebar a.active {
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%) !important;
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.28);
  transform: none;
}

body[data-page="dashboard"] .sidebar a[href*="dashboard"] i,
body[data-page="earnings"] .sidebar a[href*="earnings"] i,
body[data-page="profile"] .sidebar a[href*="profile"] i,
.sidebar a.active i {
  color: #fff !important;
}

body[data-page="dashboard"] .sidebar a[href*="dashboard"] img,
body[data-page="earnings"] .sidebar a[href*="earnings"] img,
body[data-page="profile"] .sidebar a[href*="profile"] img,
.sidebar a.active img {
  filter: brightness(0) invert(1) !important;
}

.sidebar a:not(.active):hover {
    background-color: #e5effe;
    color: #0066ff;
    transform: translateX(3px);
}

.main {
  flex: 1;
  padding: 1.6rem;
  min-width: 0;
  overflow-y: auto;
  height: 100%;
  background-color: #f8fafc;
}

.link-ico {
   width: 35px;
  height: 35px;
  border-radius: 8px;
  background: #DBEAFE;
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
}

.card-soft {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem
}

.card-shadow {
  box-shadow: 0 20px 45px -15px rgba(15, 23, 42, .12);
  border: 1px solid #EEF1F6
}

.btn {
  border: none;
  border-radius: 8px;
  padding: .5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: .95rem
}

.btn-primary {
  background: var(--blue);
  color: #fff
}

.btn-primary:hover {
  background: var(--blue-dark)
}

.btn-outline {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--navy)
}

.btn-outline:hover {
  background: #F8FAFC
}

input,
select,
textarea {
  width: 100%;
  padding: .5rem .85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: .93rem
}

label {
  font-weight: 600;
  font-size: .88rem;
  display: block;
  margin-bottom: .3rem
}

.field {
  position: relative
}

.field .fico {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: .82rem;
  pointer-events: none
}

.field .fico-r {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: .82rem;
  cursor: pointer
}

.field input,
.field select {
  padding-left: 2.2rem
}

.field input.has-r {
  padding-right: 2.2rem
}

.phone-field {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff
}

.phone-field .flag {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: 0 .6rem;
  border-right: 1px solid var(--border);
  font-size: .85rem;
  color: var(--navy);
  white-space: nowrap
}

.phone-field input {
  border: none;
  border-radius: 0;
  flex: 1;
  min-width: 0
}

.phone-field input:focus {
  outline: none
}

.grid {
  display: grid;
  gap: 1rem
}

.g2 {
  grid-template-columns: 1fr 1fr
}
/* changes card code */
.stat {
  display: flex;
  flex-direction: column;
  gap: .3rem
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
}

.spark {
    width: 65px;
    height: 35px;
    flex-shrink: 0;
    margin-top: 6.1rem;
}

.stat-ico {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  margin-bottom: .4rem
}



/* end card design */

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: .15rem .65rem;
  font-size: .76rem;
  font-weight: 700
}

.pill-paid {
  background: #DCFCE7;
  color: var(--green)
}

.pill-pending {
  background: #FEF3C7;
  color: var(--amber)
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem
}

th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  padding: .5rem;
  border-bottom: 1px solid var(--border)
}

td {
  padding: .6rem .5rem;
  border-bottom: 1px solid var(--border)
}

.text-muted {
  color: var(--muted)
}

.small {
  font-size: .85rem
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .2rem;
}

.hero {
  background: #EFF5FE;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  margin: 0
}

.hero-wave {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0
}

.feature {
  display: flex;
  gap: .75rem;
  margin-bottom: .6rem;
  align-items: flex-start
}

.feature-ico {
     width: 48px;
    height: 48px;
    min-width: 48px;
    background-color: #e3efff;
    color: var(--blue);
    border-radius: 12px;
    display: flex
;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 2px 6px rgba(0, 102, 255, 0.06);
}

.feature b {font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.15rem;
}

.feature .small {
     font-size: 0.92rem;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

.badge-soft {
  background: #cce2ff;
  color: var(--blue);
  font-weight: 700;
  border-radius: 999px;
  padding: .22rem .6rem;
  font-size: .72rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  letter-spacing: .02em;
}

.affiliate-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EBF4FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 6px;
  line-height: 1.2;
}

.affiliate-badge img {
  width: 14px;
  height: 12px;
  object-fit: contain;
}

.checkbox-row {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  font-size: .88rem;
  margin-bottom: .35rem
}

.checkbox-row input {
  width: auto;
  margin-top: .2rem
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1rem
}

.modal-overlay.open {
  display: flex
}

.modal-box {
  background: #fff;
  border-radius: 14px;
  max-width: 520px;
  width: 100%;
  padding: 1.2rem;
  max-height: 90vh;
  overflow: auto
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--navy);
  cursor: pointer
}

@media (max-width:860px) {
  .sidebar {
    position: fixed;
    left: -250px;
    top: 56px;
    bottom: 0;
    z-index: 40;
    transition: left .2s;
    box-shadow: 0 0 20px rgba(0, 0, 0, .1)
  }

  .sidebar.open {
    left: 0
  }

  .hamburger {
    display: block
  }

  .main {
    padding: 1rem
  }

  table {
    font-size: .8rem
  }

  th,
  td {
    padding: .4rem
  }
}

@media (max-width:900px) {
  .signup-grid {
    grid-template-columns: 1fr !important
  }

  .g2 {
    grid-template-columns: 1fr
  }
}

/* ===== Signup form: inputs ===== */
.form-control {
  display: block;
  width: 100%;
  padding: .375rem .75rem;
  font-weight: 400;
  line-height: 1.5;
  -moz-appearance: none;
  appearance: none;
  background-clip: padding-box;
}

.input-icon-group .form-control {
  padding-left: 2.75rem;
  padding-right: 2.75rem;
  height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: var(--font-family-base);
  color: #1e293b;
  background-color: #ffffff;
  transition: all 0.2s ease;
}

.input-icon-group .form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

/* appearance:none hides the native arrow, so add a custom chevron on selects */
.input-icon-group select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

/* phone field to match */
.phone-field {
  height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.2s ease;
}
.phone-field:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.phone-field .form-control {
  border: none;
  border-radius: 0;
  height: 100%;
  padding: 0 .75rem;
  font-size: 0.95rem;
  color: #1e293b;
  font-family: var(--font-family-base);
}

/* ===== Signup button ===== */
.btn-signup {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  height: 44px;
  border-radius: 10px;
  width: 100%;
  margin-top: .7rem;
  transition: all 0.2s ease;
}
.btn-signup:hover {
  background-color: var(--primary-color-dark);
  border-color: var(--primary-color-dark);
}


/* required asterisk */
.req {
  color: #DC2626;
  font-weight: 700;
}


/* compact spacing for signup card */
.card-soft label { margin-bottom: .2rem; }
.checkbox-row { margin-bottom: .2rem; font-size: .84rem; }

/* social buttons */
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  height: 42px;
}


/* hero background: always fill full height */
html { min-height: 100%; background: #EFF5FE; }
.hero-wave { overflow: hidden; }
.hero-wave svg { display: block; }

/* ===== Profile dropdown ===== */
.profile-dd { position: relative; }
.profile-dd .dd-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, .18);
  padding: .4rem;
  z-index: 100;
}
.profile-dd.open .dd-panel { display: block; }
.profile-dd.open .profile-menu i { transform: rotate(180deg); }
.dd-head { display: flex; flex-direction: column; padding: .6rem .7rem .7rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; }
.dd-head b { font-size: .95rem; color: var(--navy); }
.dd-head span { font-size: .82rem; color: var(--muted); }
.dd-panel a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 8px; color: #334155; font-weight: 600; font-size: .93rem; }
.dd-panel a i { width: 16px; text-align: center; color: var(--muted); }
.dd-panel a:hover { background: #F1F6FE; color: var(--blue); }
.dd-panel a:hover i { color: var(--blue); }
.dd-sep { height: 1px; background: var(--border); margin: .3rem 0; }
.dd-panel a.dd-danger, .dd-panel a.dd-danger i { color: #DC2626; }
.dd-panel a.dd-danger:hover { background: #FEF2F2; }

/* ===== Profile page: same input design as signup ===== */
input.form-control,
select.form-control,
textarea.form-control {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: var(--font-family-base);
  color: #1e293b;
  background-color: #ffffff;
  transition: all 0.2s ease;
}

input.form-control,
select.form-control {
  height: 42px;
  padding: .375rem .75rem;
}

textarea.form-control {
  padding: .6rem .75rem;
  resize: vertical;
}

input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

input.form-control:disabled {
  background-color: #F8FAFC;
  color: #94A3B8;
  cursor: not-allowed;
}

select.form-control {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}


/* outline button (same look family as .btn-signup) */
.btn-outline-soft {
  background-color: #ffffff;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 600;
  font-size: .95rem;
  height: 38px;
  padding: 0 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.btn-outline-soft:hover {
  background-color: #EFF6FF;
  border-color: var(--primary-color-dark);
  color: var(--primary-color-dark);
}

.custom-label {
  font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    /* margin-bottom: 0.5rem; */
    display: block;
    margin-bottom: 0.7rem !important;
}
/* ===== 40% Lifetime Commission checklist ===== */
.check-list { display: flex; flex-direction: column; gap: .65rem; }
.check-item { display: flex; align-items: center; gap: .65rem; font-size: .95rem; color: #1e293b; }
.check-dot {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
}

/* ===== Commission card background (gradient + blob) ===== */
.commission-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #EFF6FF 0%, #E4EEFC 100%);
  border-color: #DCE9FB;
}
.commission-blob {
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.10) 0%, rgba(37,99,235,0) 70%);
  pointer-events: none;
}

/* ===== New stat card design (icon left | label + value right) ===== */
.stat-card {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .85rem 1rem;
  border-radius: 16px;
  min-width: 0;
}
.stat-card .stat-ico {
  margin: 0;              /* icon size stays as original (42px / inline img size) */
  flex-shrink: 0;
  align-self: flex-start;
}
.stat-info {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.stat-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}
.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.6;
}
.stat-trend {
  font-size: .78rem;
  font-weight: 600;
  color: var(--green);
  margin-top: .1rem;
}
.stat-note {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.35;
  margin-top: .1rem;
}

@media (max-width:1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width:560px) {
  .stat-grid { grid-template-columns: 1fr !important; }
}