/* =========================================================
   Project costs modal (Phase 1.4) — minimal + consistent
   ========================================================= */

.pc-modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2147483390;
}

.pc-modal.show{
  display: flex;
}

.pc-modal-content{
  width: min(980px, 94vw);
  max-width: 980px;
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  border: 1px solid #e5e7eb;
}

.pc-modal-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pc-title{
  margin: 0;
  font-weight: 800;
  font-size: 1.05rem;
  color: #111827;
}

.pc-sub{
  margin-top: 4px;
  font-size: 0.85rem;
  color: #6b7280;
}

.pc-close-btn{
  appearance: none;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.pc-close-btn:hover{
  background: #f3f4f6;
}

.pc-summary{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.pc-summary-item{
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
}

.pc-k{
  font-size: 0.8rem;
  color: #6b7280;
}

.pc-v{
  font-size: 1.05rem;
  font-weight: 800;
  color: #111827;
  margin-top: 4px;
}

.pc-ledger-wrap{
  margin-top: 14px;
}

.pc-ledger-title{
  font-weight: 750;
  color: #111827;
}

.pc-ledger-status{
  margin-top: 6px;
  font-size: 0.85rem;
  color: #6b7280;
}

.pc-table-wrap{
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: auto;
  max-height: 52vh;
  background: #fff;
}

.pc-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.pc-table th,
.pc-table td{
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

.pc-table th{
  position: sticky;
  top: 0;
  background: #f9fafb;
  z-index: 1;
  font-weight: 750;
  color: #111827;
}

@media (max-width: 900px){
  .pc-summary{ grid-template-columns: 1fr; }
}



/* Phase C: policy + price sheet + inline estimates */
.pc-policy-wrap{
  margin-top: 14px;
}

.pc-policy-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.pc-policy-item{
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
}

.pc-v-sm{
  font-size: 0.95rem;
  font-weight: 800;
  color: #111827;
  margin-top: 4px;
}

.pc-price-wrap{
  margin-top: 14px;
}

.pc-estimate{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
}

.pc-estimate.good{
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.pc-estimate.bad{
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}

@media (max-width: 900px){
  .pc-policy-grid{ grid-template-columns: 1fr; }
}