/* TEMVIO v0.8.7 — Contract & Milestone Experience
   Additive only. No scroll / viewport locking. */

.contract-flow-strip{
  margin:10px 0 14px;
}
.contract-current-stage{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  margin:12px 0;
  padding:12px 13px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(99,91,255,.04);
}
.contract-current-stage strong{
  display:block;
  margin-bottom:3px;
}
.contract-current-stage small{
  display:block;
  color:var(--muted);
  line-height:1.7;
}
.contract-stage-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:92px;
  padding:6px 9px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--paper);
  font-size:10px;
  font-weight:900;
}
.contract-stage-badge.review{
  background:rgba(193,132,23,.08);
  color:#a56e10;
}
.contract-stage-badge.active{
  background:rgba(99,91,255,.07);
  color:var(--accent-strong);
}
.contract-stage-badge.done{
  background:rgba(15,159,147,.07);
  color:var(--teal);
}
.contract-overview-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
  margin-top:12px;
}
.contract-overview-stat{
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  background:var(--paper);
}
.contract-overview-stat b{
  display:block;
  font-size:18px;
  margin-bottom:2px;
}
.contract-overview-stat span{
  color:var(--muted);
  font-size:10px;
}
.milestone-flow-index{
  width:24px;
  height:24px;
  border-radius:50%;
  border:1px solid var(--line);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  font-size:10px;
  font-weight:900;
  background:var(--paper);
}
.milestone-row.active .milestone-flow-index,
.milestone-row.submitted .milestone-flow-index{
  color:var(--accent-strong);
  border-color:rgba(99,91,255,.3);
  background:var(--accent-soft);
}
.milestone-row.approved .milestone-flow-index{
  color:var(--teal);
  border-color:rgba(15,159,147,.25);
  background:rgba(15,159,147,.07);
}
.workspace-source-note{
  width:100%;
  margin-top:8px;
  font-size:10px;
  line-height:1.7;
  color:var(--muted);
}
.contract-actions .btn[data-contract-workspace]{
  min-width:150px;
}
@media(max-width:760px){
  .contract-current-stage{
    grid-template-columns:1fr;
  }
  .contract-stage-badge{
    justify-self:start;
  }
  .contract-overview-stats{
    grid-template-columns:1fr;
  }
}
