/* Stage 37.3 Global Readability & Accessibility Fixes
   Sitewide contrast guard for admin, member and public interfaces. */
:root{
  --ibo-text-primary:#0f172a;
  --ibo-text-heading:#10223f;
  --ibo-text-body:#334155;
  --ibo-text-secondary:#475569;
  --ibo-text-muted:#64748b;
  --ibo-text-soft:#6b7b91;
  --ibo-border-readable:#cfe0f5;
  --ibo-card-bg:#ffffff;
  --ibo-blue-readable:#075bdc;
}
html,body{color:var(--ibo-text-body);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;}
body:not(.home) p,
.app-main p,
.page-content p,
.table-card p,
.form-card p,
.dash-card p,
.payment-card p,
.cms-card p,
.stage37-panel p,
.member-hero p,
.stage37-hero p{color:var(--ibo-text-secondary)!important;opacity:1!important;}
h1,h2,h3,h4,h5,h6,
.app-main h1,.app-main h2,.app-main h3,
.stage37-panel-head h2,.member-hero h2,.stage37-hero h2,
.table-card h2,.form-card h2,.dash-card h2,.cms-card h3{color:var(--ibo-text-heading)!important;opacity:1!important;}
small,.muted,.help-text,.meta,.hint,
.stage37-panel-head p,
.stage37-status-list em,
.member-status-list em,
.member-status-card em,
.member-status-card small,
.credit-flow-row,
.live-feed li,
.activity-row,
.launch-list li,
.empty-state,
.clean-note{color:var(--ibo-text-muted)!important;opacity:1!important;}
strong,b,label,th,
.stage37-operation-list b,
.stage37-status-list b,
.member-status-list b,
.stage37-alert-list strong{color:var(--ibo-text-primary)!important;opacity:1!important;}
/* Keep dark/blue surfaces readable without washed out text */
.stage37-topbar h1,.stage37-topbar h2,.stage37-topbar h3,
.launch-hero h1,.launch-hero h2,.security-hero h1,.security-hero h2,
.cms-hero h1,.cms-hero h2,.api-hero h1,.api-hero h2,
.enterprise-hero h1,.enterprise-hero h2,
.hero h1,.hero h2,.hero h3{color:#ffffff!important;}
.stage37-topbar p,
.launch-hero p,.security-hero p,.cms-hero p,.api-hero p,.enterprise-hero p,.hero p{color:#eaf4ff!important;opacity:1!important;}
.app-sidebar,.admin-sidebar,.stage37-admin-sidebar,.stage37-member-sidebar{color:#eaf2ff!important;}
.app-sidebar a,.admin-sidebar a,.stage37-side-nav a{color:#eaf2ff!important;opacity:1!important;}
.stage37-side-nav .nav-group-title{color:#b9d7ff!important;opacity:1!important;}
.side-user strong,.side-user p,.stage37-logo strong,.stage37-logo-text span{opacity:1!important;}
.side-user p,.stage37-logo-text span{color:#cfe3ff!important;}
/* Cards and panels: readable text and stronger borders */
.stage37-panel,.stage37-metric,.member-status-card,.cms-card,.dash-card,.table-card,.form-card,.payment-card,.support-page-card,.api-card,.security-card,.health-card,.cms-card,.maintenance-box{background:var(--ibo-card-bg)!important;border-color:rgba(7,91,220,.14)!important;}
.stage37-metric p,.stage37-metric h3,
.member-status-card strong,.member-status-card small,
.analytics-bars b,.credit-ring strong,.credit-ring span{opacity:1!important;}
.stage37-metric p{color:var(--ibo-text-secondary)!important;}
.stage37-metric h3,.member-status-card strong,.analytics-bars b,.credit-ring strong{color:var(--ibo-text-primary)!important;}
/* Alert/status rows were too pale */
.stage37-alert-list a,.stage37-operation-list a,.stage37-status-list div,.member-status-list div,.health-check,.security-check,.endpoint-row,.activity-row{background:#f8fbff;border-color:var(--ibo-border-readable)!important;}
.stage37-alert-list strong{color:var(--ibo-text-primary)!important;text-shadow:none!important;}
.stage37-alert-list span,.stage37-operation-list span,.route-ok,.route-warn,.security-ok,.security-warn,.security-danger,.webhook-status{opacity:1!important;}
/* Buttons and links */
a{opacity:1;}
.btn,.ibo-btn,button,.stage37-quick-actions a,.member-hero-actions a,.stage37-actions a{font-weight:900;}
.btn.btn-soft,.stage37-quick-actions a{background:#eaf3ff!important;color:#004fc4!important;border:1px solid #b8d7ff!important;}
.btn.btn-primary,.ibo-btn.blue{color:#fff!important;background:#075bdc!important;}
.stage37-panel-head a,.stage37-actions a,.member-hero-actions a{color:#075bdc!important;}
.stage37-topbar .btn,.stage37-topbar a.btn{color:#08204a!important;background:#ffc941!important;border-color:#ffc941!important;}
/* Forms and placeholders */
input,select,textarea{color:var(--ibo-text-primary)!important;background:#fff!important;border-color:#b8cce6!important;opacity:1!important;}
input::placeholder,textarea::placeholder{color:#687991!important;opacity:1!important;}
input:focus,select:focus,textarea:focus{outline:2px solid rgba(7,91,220,.22)!important;border-color:#075bdc!important;box-shadow:0 0 0 4px rgba(7,91,220,.08)!important;}
/* Tables */
table{color:var(--ibo-text-body)!important;} td{color:var(--ibo-text-secondary)!important;} th{color:var(--ibo-text-primary)!important;background:#f3f8ff;}
tr:nth-child(even) td{background:#fbfdff;}
/* Prevent invisible text caused by old transparent utility styles */
[style*="color:#eaf"],[style*="color: #eaf"],
[style*="color:#dce"],[style*="color: #dce"]{opacity:1!important;}
/* Disabled should still be visible */
[disabled],.disabled,.is-disabled{color:#64748b!important;opacity:.82!important;}
/* Mobile readability */
@media(max-width:780px){
  body{font-size:16px;}
  .stage37-panel,.stage37-metric,.member-status-card,.cms-card{border-radius:18px;}
  .stage37-panel-head{gap:10px;}
  .stage37-panel-head p,.member-hero p,.stage37-hero p{font-size:15px;line-height:1.65;}
  .stage37-side-nav a{font-size:14px;color:#fff!important;}
}
