/* Equity Coffee visibility rescue patch
   Purpose: remove faint/washed-out/mirrored appearance on workflow, lot record, and ops pages while keeping locked states readable. */
:root{
  --ec-readable-text:#21160f;
  --ec-readable-muted:#5f4c3f;
  --ec-readable-border:#dccbb8;
  --ec-readable-card:#fffaf3;
  --ec-readable-white:#ffffff;
  --ec-readable-brand:#7a421f;
  --ec-readable-dark:#1f140d;
}
html,body{
  opacity:1 !important;
  filter:none !important;
  transform:none !important;
  text-shadow:none !important;
}
body *{
  filter:none !important;
  text-shadow:none !important;
}
/* Prevent accidental mirrored or ghosted rendering */
.wrap,.container,.shell,.workspace,.content,.main,.hero,.card,.panel,.box,.section,
.pipeline-card,.ops-card,.ec-card,.ec-hero,.ec-stage,.ec-alert,.modal,.modalCard,
.topbar,.topbarInner,.nav,.toolbar,.list,.row,table,tbody,tr,td,th{
  opacity:1 !important;
  filter:none !important;
  transform:none !important;
  -webkit-transform:none !important;
}
/* Make normal pages readable even when earlier CSS used white-on-light or low alpha */
body:not(.dark) .wrap,
body:not(.dark) .content,
body:not(.dark) .main,
body:not(.dark) .card,
body:not(.dark) .panel,
body:not(.dark) .box,
body:not(.dark) .section,
body:not(.dark) .ec-card,
body:not(.dark) .ec-hero{
  color:var(--ec-readable-text) !important;
}
h1,h2,h3,h4,h5,h6,.title,.heading,.cardTitle,.ec-title h1,.ec-card h2,.ec-card h3,
strong,b,label,th{
  color:#160e09 !important;
  opacity:1 !important;
}
p,span,div,li,td,.muted,.sub,.small,.hint,.ec-card-sub,.ec-stage-sub,.ec-note,.ec-meta{
  opacity:1 !important;
}
.muted,.sub,.small,.hint,.ec-card-sub,.ec-stage-sub,.ec-note,.ec-meta{
  color:var(--ec-readable-muted) !important;
}
a{
  color:#165bb5 !important;
  opacity:1 !important;
  text-decoration:none;
}
a:hover{text-decoration:underline;}
button,.btn,.ec-btn,input,select,textarea{
  opacity:1 !important;
  filter:none !important;
  transform:none !important;
  pointer-events:auto !important;
  color:var(--ec-readable-text) !important;
}
.btn.primary,.ec-btn.primary,.ec-btn.dark,button.primary{
  color:#fff !important;
}
/* Workflow readability */
.ec-final-workflow,.ec-final-workflow *{
  opacity:1 !important;
  filter:none !important;
  transform:none !important;
}
.ec-final-workflow .ec-card,
.ec-final-workflow .ec-hero,
.ec-final-workflow .ec-stage{
  background:#fffaf3 !important;
  border-color:var(--ec-readable-border) !important;
  box-shadow:0 18px 50px rgba(54,34,18,.14) !important;
}
.ec-final-workflow .ec-stage.locked{
  background:#f2efeb !important;
  border:1px dashed #b7aa9d !important;
}
.ec-final-workflow .ec-stage.active{
  background:#fff3dc !important;
  border-color:#d69338 !important;
}
.ec-final-workflow .ec-stage.done{
  background:#effaf3 !important;
  border-color:#78bf92 !important;
}
.ec-final-workflow .ec-alert{
  display:block !important;
  visibility:visible !important;
  color:#2b1a10 !important;
  background:#fff6df !important;
  border-color:#d69338 !important;
  border-left:6px solid #b96a00 !important;
  font-weight:800 !important;
}
.ec-final-workflow .ec-panel{
  color:var(--ec-readable-text) !important;
}
.ec-final-workflow .ec-empty{
  color:#4f4137 !important;
  background:#fff8ed !important;
}
.ec-pill,.pill,.badge,.tag,.status{
  opacity:1 !important;
  color:#2b1a10 !important;
  background:#f4eadc !important;
  border:1px solid #d8c6b4 !important;
}
.ec-pill.locked,.pill.locked,.badge.locked,.status.locked,.tag.locked{
  color:#53483f !important;
  background:#edeae6 !important;
  border-color:#bdb4aa !important;
}
.ec-pill.active,.pill.active,.badge.active,.status.active,.tag.offered,.tag.warn{
  color:#7a4300 !important;
  background:#fff1d5 !important;
  border-color:#d69338 !important;
}
.ec-pill.done,.pill.done,.badge.done,.status.done,.tag.ok{
  color:#0d6835 !important;
  background:#e7f7ee !important;
  border-color:#77bf92 !important;
}
/* Operations tables: make IDs and rows visible */
table{
  color:var(--ec-readable-text) !important;
  background:#fffaf3 !important;
}
thead,thead tr,th{
  background:#efe0cb !important;
  color:#2b1a10 !important;
}
tbody tr,td{
  color:#2b1a10 !important;
  border-color:#e6d8c9 !important;
}
tbody tr:hover{background:#fff3df !important;}
td a, .dealLink, .uid, .dealUid{
  color:#0f5fb8 !important;
  font-weight:900 !important;
  text-decoration:underline !important;
}
/* Lot record share modal: keep modal readable, but avoid making the page look broken */
.share-modal,.modalOverlay,.overlay{
  opacity:1 !important;
  filter:none !important;
}
.share-modal .modalCard,.modalOverlay .modalCard,.overlay .modalCard{
  color:#fff !important;
  background:#101827 !important;
  border:1px solid rgba(255,255,255,.18) !important;
}
.share-modal .modalCard *,.modalOverlay .modalCard *,.overlay .modalCard *{
  color:inherit;
}
.share-modal input,.modalOverlay input,.overlay input,
.share-modal select,.modalOverlay select,.overlay select{
  background:#fff !important;
  color:#160e09 !important;
}
/* Mobile */
@media(max-width:760px){
  .topbar,.ec-brandbar{
    position:sticky !important;
    top:0 !important;
    z-index:100 !important;
  }
  .nav,.ec-tabs{
    overflow-x:auto !important;
    flex-wrap:nowrap !important;
    justify-content:flex-start !important;
    -webkit-overflow-scrolling:touch;
  }
  .wrap,.ec-wrap{padding-left:12px !important;padding-right:12px !important;}
  .grid,.cards,.layout,.ec-grid{grid-template-columns:1fr !important;}
  .card,.panel,.box,.ec-card{min-width:0 !important;overflow-x:auto !important;}
  table{font-size:13px !important;}
  th,td{padding:10px 8px !important;}
}
@media print{
  body,body *{opacity:1 !important;filter:none !important;transform:none !important;color:#111 !important;text-shadow:none !important;}
  .topbar,.ec-brandbar,.nav,.ec-actions,.btn,.ec-btn{display:none !important;}
}
