/* Stage 39.5 Final CSS Override Lock
   This file is intentionally loaded LAST and uses high-contrast colors with !important.
   Purpose: make text visible across surf rewards, cards, sponsors, forms and dark/light panels no matter what older CSS says. */
:root{
  --ibotext-dark:#061127;
  --ibotext-main:#07152f;
  --ibotext-body:#10213f;
  --ibotext-muted:#263b5f;
  --iboblue:#075bdc;
  --iboblue-dark:#0444b6;
  --ibogreen:#047857;
  --ibowhite:#ffffff;
  --ibodark-readable:#f8fbff;
  --ibodark-muted:#dbeafe;
}

/* Universal safety lock for normal light surfaces */
.stage38-reward-panel,
.stage38-reward-panel *,
.stage38-reward-head,
.stage38-reward-head *,
.stage38-milestone-row,
.stage38-milestone-row *,
.stage38-milestone,
.stage38-milestone *,
.surf-stat,
.surf-stat *,
.surf-bottom-grid,
.surf-bottom-grid *,
.surf-rules-card,
.surf-rules-card *,
.surf-empty-production,
.surf-empty-production *,
.sponsor-slot,
.sponsor-slot *,
.surf-ad-top,
.surf-ad-top *,
.surf-ad-bottom,
.surf-ad-bottom *,
.visit-mode-help,
.visit-mode-help *,
.surf-campaign-meta,
.surf-campaign-meta *,
.surf-mode-banner,
.surf-mode-banner *,
.surf-frame-top,
.surf-frame-top *{
  color:var(--ibotext-main) !important;
  opacity:1 !important;
  text-shadow:none !important;
  filter:none !important;
  -webkit-text-fill-color:currentColor !important;
}

/* Today rewards panel must always be readable */
.stage38-reward-panel{
  background:#ffffff !important;
  border:1px solid #b7d6ff !important;
  box-shadow:0 16px 48px rgba(15,35,80,.10) !important;
}
.stage38-reward-panel h1,
.stage38-reward-panel h2,
.stage38-reward-panel h3,
.stage38-reward-panel h4,
.stage38-reward-panel strong,
.stage38-reward-panel b{
  color:#061127 !important;
  font-weight:900 !important;
}
.stage38-reward-panel p,
.stage38-reward-panel small,
.stage38-reward-panel span,
.stage38-reward-panel label{
  color:#152b4d !important;
  font-weight:700 !important;
}
.stage38-reward-panel .surf-badge{
  background:#fff3bf !important;
  color:#5b3b00 !important;
  border:1px solid #f3c742 !important;
  font-weight:900 !important;
}
.stage38-progress{
  background:#e7eef8 !important;
  border:1px solid #b7d6ff !important;
  min-height:12px !important;
}
.stage38-progress span{
  background:linear-gradient(90deg,#075bdc,#16a34a) !important;
  min-height:10px !important;
  display:block !important;
}
.stage38-milestone{
  background:#ffffff !important;
  border:1px solid #b7d6ff !important;
  box-shadow:0 8px 24px rgba(15,35,80,.06) !important;
}
.stage38-milestone span,
.stage38-milestone small{
  color:#10213f !important;
  font-weight:800 !important;
}
.stage38-milestone strong{
  color:#075bdc !important;
  font-weight:950 !important;
  font-size:1.25rem !important;
}
.stage38-milestone.locked,
.stage38-milestone.streak{
  background:#ffffff !important;
  border-color:#c7dbf5 !important;
}
.stage38-milestone.claimable{
  background:#ecfdf5 !important;
  border:2px solid #16a34a !important;
}
.stage38-milestone.claimable strong{color:#047857 !important;}
.stage38-milestone.claimed{
  background:#f1f5f9 !important;
  border-color:#94a3b8 !important;
}
.stage38-milestone .btn,
.stage38-reward-panel .btn{
  color:#ffffff !important;
  background:#075bdc !important;
  border-color:#075bdc !important;
  font-weight:900 !important;
}
.stage38-reward-panel .btn-soft{
  color:#075bdc !important;
  background:#eef6ff !important;
  border-color:#b7d6ff !important;
}

/* Dark panels: force white text on blue/navy surfaces */
.surf-hero,
.surf-hero *,
.surf-viewer-card,
.surf-viewer-card > .surf-toolbar,
.surf-viewer-card > .surf-toolbar *,
.stage378-surf-shell,
.stage378-surf-shell > .surf-toolbar,
.stage378-surf-shell > .surf-toolbar *,
.readable-dark-panel,
.readable-dark-panel *{
  color:var(--ibodark-readable) !important;
  opacity:1 !important;
  text-shadow:none !important;
  -webkit-text-fill-color:currentColor !important;
}
.surf-hero p,
.surf-toolbar p,
.readable-dark-panel p{
  color:var(--ibodark-muted) !important;
  font-weight:700 !important;
}
.surf-hero .surf-badge,
.surf-toolbar .surf-rules-mini span,
.surf-toolbar .surf-rules-mini b{
  color:#061127 !important;
  -webkit-text-fill-color:#061127 !important;
  opacity:1 !important;
}

/* White cards inside dark surf panel stay dark/readable */
.surf-session-side,
.surf-session-side *,
.surf-check,
.surf-check *,
.surf-frame-wrap,
.surf-frame-wrap *,
.surf-frame-top,
.surf-frame-top *,
.surf-mode-banner,
.surf-mode-banner *{
  color:#061127 !important;
  opacity:1 !important;
  text-shadow:none !important;
  -webkit-text-fill-color:currentColor !important;
}
.surf-frame-top a,
.open-visit-mode-btn,
.surf-session-side .btn-primary,
.surf-complete-form .btn-primary{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  background:#075bdc !important;
  border-color:#075bdc !important;
  font-weight:900 !important;
}
.surf-session-side .btn-soft,
.surf-complete-form .btn-soft{
  color:#075bdc !important;
  -webkit-text-fill-color:#075bdc !important;
  background:#eef6ff !important;
  border-color:#b7d6ff !important;
  font-weight:900 !important;
}

/* Sidebars and footer remain readable */
.app-sidebar,
.app-sidebar *,
.site-footer,
.site-footer *,
.footer,
.footer *{
  opacity:1 !important;
  text-shadow:none !important;
}
.app-sidebar a,
.app-sidebar button,
.app-sidebar strong,
.app-sidebar span,
.app-sidebar p{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
.app-sidebar .active{background:#1683ff !important;color:#ffffff !important;}
.site-footer a,
.footer a{color:#eaf2ff !important;font-weight:800 !important;}
.site-footer p,.site-footer li,.footer p,.footer li{color:#dbeafe !important;}

/* Inputs/placeholders anywhere */
input,textarea,select{color:#061127 !important;opacity:1 !important;-webkit-text-fill-color:#061127 !important;}
input::placeholder,textarea::placeholder{color:#334155 !important;opacity:1 !important;}

/* Homepage/live cards readability lock */
.live-activity-card,
.live-activity-card *,
.home-activity-card,
.home-activity-card *,
.trust-card,
.trust-card *,
.feature-card,
.feature-card *{
  opacity:1 !important;
  text-shadow:none !important;
}
.live-activity-card,.home-activity-card,.trust-card,.feature-card{background:#ffffff !important;}
.live-activity-card *, .home-activity-card *, .trust-card *, .feature-card *{color:#07152f !important;}

@media(max-width:760px){
  .stage38-reward-panel{padding:16px !important;}
  .stage38-reward-head{gap:14px !important;align-items:flex-start !important;}
  .stage38-milestone strong{font-size:1.15rem !important;}
  .stage38-milestone-row{grid-template-columns:1fr !important;}
}
